Logic
The logic for Stroscot is based on a two-sided linear logic sequent calculus.
Jumbo connectives
Common connectives
All of the standard operators 01⊕⊗⊤⊥&⅋⊸⧟ in linear logic can be expressed using
Operator |
Girard Notation |
Name |
Type |
---|---|---|---|
False (Zero) |
|||
One |
|||
Plus (coproduct, or) |
|||
Times (tensor product) |
|||
Positive Negation |
|||
Up shift |
|||
True (Top) |
|||
Bottom (contradiction) |
|||
With (product, and) |
|||
Par (“unless”, classical or, parallel product, dual of tensor) |
|||
Par power |
|||
Lollipop (implication, internal hom) |
|||
Equivalence |
|||
Negative Negation |
|||
Down shift |
The negations and shifts have identical derivation rules for each polarity, so we write
The specific derivation rules can be derived from the jumbo connective rules and the above definitions. For ease of reference, here are the derivation rules for the common connectives:
Programming types
We can also write some types common from programming:
Operator |
Name |
Type |
---|---|---|
Booleans |
||
32-bit integers |
||
Linked list of A |
||
Arbitrarily-sized tuple of A |
In general
Exponentials
Promotion
Dereliction
Weakening
Contraction
Admissible rules
The following rules are derivable from the four rules above.
Weak promotion, implied by promotion and dereliction:
Digging is simply the theorems
Weak promotion and digging together imply promotion.
Absorption is implied by contraction and dereliction:
Multiplexing is implied by absorption and dereliction:
Structural rules
Exchange
Cut
Identity
Higher-order logic
Predicates
Terms consist of variables
If the term is a predicate (set) then it may be used as an atomic formula. Such an atomic formula
Interpreted predicates may be defined using other rules so long as the identity rule is derivable and the rules are consistent.
Substitution
Quantifiers
For these the variable
Definitions
If we define some notation
The notation and rules are valid only if there is a finite proof of the identity sequent
Infinite proof structures
These have “use” and “def” rules (“def” is short for definition). The use is a “hole” that plugs in the derivation tree from the definition. The type of the use rule can performs a substitution on the free variables of the type of the assignment.
Set theory
We define
So for example
We can also define set-builder notation
We define
We can prove the axiom schema of comprehension
Equality
Equality on sets is defined as follows:
We can easily prove that this equality is an equivalence relation:
For substitution, we can prove