Intuitionistic.Formula: the language of ILL
Why linear logic?
Γ, A, A ⊢ C Γ ⊢ C
------------- contraction ------------ weakening
Γ, A ⊢ C Γ, A ⊢ C
- A ⊗ B ("times"): an A and a B, side by side. Both get used.
- A & B ("with"): a choice of A or B. The consumer picks one, and the other is never produced.
- 𝟙 ("one") is the unit of ⊗, the empty resource. ⊤ ("top") is the unit of &, a sink that accepts anything.
- A ⊕ B ("plus"): an A or a B. The producer chose which. Its unit is 𝟘 ("zero").
- A ⊸ B ("lollipop") turns one A into one B.
- !A ("of course") is an unlimited supply of A. It brings contraction and weakening back in a controlled way.
- ⊥ ("bottom"). In ILL it is a propositional constant with no rules of its own. It lets us define the (non-involutive) negation ∼A := A ⊸ ⊥.
Why "intuitionistic"?
- the multiplicative disjunction A ⅋ B ("par"), whose right rule needs two conclusions Γ ⊢ A, B;
- the exponential ? A ("why not"), whose contraction rule needs two copies ? A, ? A on the right;
- an involutive negation A^⊥, with A^⊥^⊥ ⊣⊢ A.
euro ⊸ coffee & tea one euro buys your choice of drink
Syntax
Inductive iformula : Type :=
| IAtom (p : nat) (* propositional variable *)
| IOne (* 𝟙 unit of ⊗ *)
| IBot (* ⊥ a constant: "the answer" *)
| ITop (* ⊤ unit of & *)
| IZero (* 𝟘 unit of ⊕ *)
| ITensor (A B : iformula) (* A ⊗ B times *)
| ILolli (A B : iformula) (* A ⊸ B linear implication *)
| IWith (A B : iformula) (* A & B with *)
| IPlus (A B : iformula) (* A ⊕ B plus *)
| IBang (A : iformula). (* !A of course *)Notations
∼ ! prefix
⊗ & (left associative)
⊕ (left associative)
⊸ (right associative)
Declare Scope ill_scope. Delimit Scope ill_scope with ill. Bind Scope ill_scope with iformula. Notation "$ p" := (IAtom p) (at level 1, format "$ p") : ill_scope. Notation "𝟙" := IOne : ill_scope. Notation "⊥" := IBot : ill_scope. Notation "⊤" := ITop : ill_scope. Notation "𝟘" := IZero : ill_scope. Notation "! A" := (IBang A) (at level 30, right associativity, format "! A") : ill_scope. Infix "⊗" := ITensor (at level 40, left associativity) : ill_scope. Infix "&" := IWith (at level 40, left associativity) : ill_scope. Infix "⊕" := IPlus (at level 50, left associativity) : ill_scope. Infix "⊸" := ILolli (at level 55, right associativity) : ill_scope.
Intuitionistic linear negation is defined as A ⊸ ⊥. Unlike
classical A^⊥, it is not involutive: A ⊢ ∼∼A holds, but
∼∼A ⊢ A does not.
Notation "∼ A" := (ILolli A IBot) (at level 30, right associativity,
format "∼ A") : ill_scope.
‼Γ puts a ! on every formula of the context Γ:
‼[A; B] = [!A; !B].
Notation "‼ Γ" := (map IBang Γ) (at level 30, format "‼ Γ") : ill_scope. Open Scope ill_scope.
Sanity checks of the notations.
The coffee example from the introduction.
Definition euro := $0. Definition coffee := $1. Definition tea := $2.