Lecture 2: MLL/MALL/MELL, Lafont menu, Negative encoding

Teacher: Michele Pagani

  • Classical logic is about truth
  • Constructive logic is about proofs
  • Linear Logic is about ressources

Linear Logic (LL)

Recall:

Multiplicative Linear Logic (MLL)

\cfrac{Γ ⊢ A, Δ}{Γ, A^⊥ ⊢ Δ}⊥\text{L} \quad \cfrac{Γ, A ⊢ Δ}{Γ ⊢ A^⊥, Δ}⊥\text{R}
\cfrac{}{A ⊢ A}\text{ax} \qquad \cfrac{Γ' ⊢ A, Δ' \qquad Γ'', A ⊢ Δ''}{Γ', Γ'' ⊢ Δ', Δ''}\text{ cut}
\cfrac{}{⊢ 1}1\text{L} \quad \cfrac{Γ ⊢ Δ}{Γ, 1 ⊢ Δ}1\text{L} \qquad \cfrac{}{⊥ ⊢ }⊥\text{L} \quad \cfrac{Γ ⊢ Δ}{Γ ⊢ ⊥, Δ}⊥\text{R}
\cfrac{Γ, A, B ⊢ Δ}{Γ, A ⊗ B ⊢ Δ} ⊗\text{L} \qquad \cfrac{Γ' ⊢ A, Δ' \qquad Γ'' ⊢ B, Δ''}{Γ', Γ'' ⊢ A ⊗ B, Δ',Δ''}⊗\text{R}
\cfrac{Γ',A ⊢ Δ' \qquad Γ'',B ⊢ Δ''}{Γ', Γ'', A ⅋ B ⊢ Δ',Δ''}⅋\text{L}\qquad \cfrac{Γ ⊢ A, B, Δ}{Γ ⊢ A ⅋ B, Δ} ⅋\text{R}
\cfrac{Γ' ⊢ A, Δ' \qquad Γ'', B ⊢ Δ''}{Γ', Γ'', A ⊸ B ⊢ Δ',Δ''}⊸\text{L}\qquad \cfrac{Γ,A ⊢ B, Δ}{Γ ⊢ A ⊸ B, Δ} ⊸\text{R}

Additive Linear Logic (ALL)

\cfrac{}{Γ ⊢ ⊤, Δ}⊤\text{R} \quad \cfrac{}{Γ, 0 ⊢ Δ}0\text{L}
\cfrac{Γ, A ⊢ Δ}{Γ, A \& B ⊢ Δ}\&\text{L}_1 \quad \cfrac{Γ, B ⊢ Δ}{Γ, A \& B ⊢ Δ}\&\text{L}_2 \qquad \cfrac{Γ ⊢ A, Δ \qquad Γ ⊢ B, Δ}{Γ ⊢ A \& B, Δ}\&\text{R}
\cfrac{Γ, A ⊢ Δ \qquad Γ, B ⊢ Δ}{Γ, A ⊕ B ⊢ Δ}⊕\text{L}
\cfrac{Γ ⊢ A, Δ}{Γ ⊢ A ⊕ B, Δ}⊕\text{R}_1 \quad \cfrac{Γ ⊢ B, Δ}{Γ ⊢ A ⊕ B, Δ}⊕\text{R}_2

Exponentials

Structural rules (weakening, contraction) promotion, dereliction:

\cfrac{Γ, A ⊢ Δ}{Γ, !A ⊢ Δ}!\text{derel.}\qquad \cfrac{!Γ ⊢ A, ?Δ}{!Γ ⊢ !A, ?Δ}!\text{promotion}
\cfrac{!Γ, A ⊢ ?Δ}{!Γ, ?A ⊢ ?Δ}?\text{promot.}\qquad \cfrac{Γ ⊢ A, Δ}{Γ ⊢ ?A, Δ}?\text{derel.}
\cfrac{Γ ⊢ Δ}{Γ, !A ⊢ Δ}\text{left-weaken.}\qquad \cfrac{Γ, !A, !A ⊢ Δ}{Γ, !A ⊢ Δ}?\text{left-contraction}
\cfrac{Γ ⊢ Δ}{Γ ⊢ ?A, Δ}\text{right-weaken.}\qquad \cfrac{Γ ⊢ ?A, ?A, Δ}{Γ ⊢ ?A, Δ}?\text{right-contr.}

Most important types of LL

  • LL: linear logic as a whole (everything)
    • LL2: second-order linear logic
  • MLL: Multiplicative LL
    • useful for proof nets
  • MALL: Multiplicative and additive LL (without exponentials)
    • useful for logics with linear ressources (quantum, etc…)
  • MELL: Multiplicative and exponential (without additives) LL
    • useful to encode $λ$-calculus

Properties

$⊢ A ⟺ B \; ≝ \; ⊢ A ⊸ B \text{ and } ⊢ B ⊸ A$ $\not ⊢ A ⟺ B \; ≝ \; \not ⊢ A ⊸ B \text{ and } \not ⊢ B ⊸ A$

Or another way to define it (because of the multiplicative nature of the sequents (or even: the cuts are multiplicative (necessary to have the cut-elimination property))):

⊢ A ⟺ B \text{ iff } ⊢ (A ⊸ B) ⊗ (B ⊸ A)

⊢ A ⟺ A \& A
\infer{⊢ \, A ⊸ A \& A}{ \infer{A ⊢ A \& A}{ A ⊢ A & A ⊢ A} }
\not ⊢ A ⟺ A ⊗ A

Indeed, if there were a proof, by the cut elimination theorem: there would be a cut-free proof.

But then:

\infer{⊢ \, A ⊸ A ⊗ A}{ \infer{A ⊢ A ⊗ A}{ A ⊢ A & \overbrace{⊢ A}^{\text{not provable!}}} }

But if $A ≝ 1$, $⊢ 1$ is provable, and the property holds. But we did a choice between the left and the right sequent: not canonical.

⊢ !A ⟺ !A ⊗ !A
\infer{⊢ (!A ⊸ !A ⊗ !A) ⊗ (!A ⊗ !A ⊸ !A)}{ \infer{⊢ !A ⊸ !A ⊗ !A}{ \infer{!A ⊢ !A ⊗ !A }{ \infer{!A, !A ⊢ !A ⊗ !A}{ !A ⊢ !A & !A ⊢ !A} }} & \infer{⊢ !A ⊗ !A ⊸ !A}{ \infer{!A ⊗ !A ⊢ !A}{ \infer{!A , !A ⊢ !A}{ !A ⊢ !A } } } }

Two formulas $A$ and $B$ are isomorphic:

iff there exist proofs $π$ and $π’$ such that $π, A ⊢ B$ and $π’, B ⊢ A$ are provable, and if you cut the two: you get the $η$-extension of the identity.

Meaning

$A ⊗ B$:

means that you have both $A$ and $B$

$A \& B$:

means that you have a possibility of choosing between $A$ and $B$ (cartesian product).

$A ⊕ B$:

is an already fixed choice (you don’t decide) between $A$ and $B$ (coproduct).

$A ⅋ B$:

is a trade between $A$ and $B$

NB: $A ⅋ B ≡ A^⊥ ⊸ B$: the more $A$ you have, the less $B$ you have.

Other properties:

⊢ A \& B ⊸ A \\ ⊢ A \& B ⊸ B \\ \; \\ \not ⊢ A ⊗ B ⊸ A \\ \not ⊢ A ⊗ B ⊸ B

and

⊢ A ⊸ A ⊕ B\\ ⊢ B ⊸ A ⊕ B \\ \; \\ \not ⊢ A ⊸ A ⅋ B \\ \not ⊢ B ⊸ A ⅋ B

Lafont menu

def Menu(for 30 ):
    "Quiche" or "Salad"
    and
    "Chicken" or "Fish"
    and
    "Banana" or "Surprise from the Chef (tiramisu or crème brûlée)"
    and
    "Beer" or "Wine" as much as you want

can be thought of as:

\begin{align*} 30 € ⊸ & \,\quad (Q \& S)\\ & ⊗ (C \& F)\\ & ⊗ (B \& (T ⊕ Cr))\\ & ⊗ (!B \& !W) \end{align*}

Linear logic has nothing to do with computation at the beginning (it comes from cut-elimination), but it turns out it has such a meaning (ressource-based).

Exponential

⊢ !(A \& B) ⟺ !A ⊗ !B

NB: analogous to $\exp(n+m) = \exp(n)\exp(m)$ in real analysis

\infer{⊢ !(A \& B)⊸ !A ⊗ !B}{ \infer{!(A \& B) ⊢ !A ⊗ !B}{ \infer{!(A \& B), !(A \& B) ⊢ !A ⊗ !B}{ \infer[!\text{promotion}]{!(A \& B) ⊢ !A}{ \infer[!\text{derel.}]{!(A \& B) ⊢ A}{ \infer{A \& B ⊢ A}{A ⊢ A} } } & \infer[!\text{promotion}]{!(A \& B) ⊢ !A}{ \infer[!\text{derel.}]{!(A \& B) ⊢ B}{ \infer{A \& B ⊢ B}{B ⊢ B} } } } } }

Complexity

Provability complexity

Provability problem of a proof system $S$:

given a formula $A$, is it provable in $S$?

Classical logic:

  • with units only (formulas don’t use atoms): linear
  • propositional logic: NP-complete
  • first-order logic: undecidable (Gödel’s second incompleteness theorem)

Units only in LL: no atoms: $1, ⊥, ⊤, 0$ + rules only

  MLL MALL MELL LL  
units only       undecidable (Lincoln, 95)  
propositional NP-c (Kanovich) PSPACE-c (Lincoln, 92) ?    
1st-order   NEXPTIME-c (Lincoln, 94) undecidable    
2nd-order undecidable        

Cut-elimination complexity

Given two proofs $π$ and $π’$, can you reduce both of them to the same cut-free proof?

NB: This problem is trivial in classical logic, because the equivalence induced by cut-elimination in classical logic makes every proofs equivalent:

\infer{⊢ Γ}{ \infer{⊢ Γ, A }{ \infer{⊢ Γ }{ π } } & \infer{A ⊢ Γ }{ \infer{⊢ Γ }{ π' } }}

the equivalence identifies $π$ and $π’$.

This trick doesn’t work in:

  • LL, because you have: \infer{⊢ Γ}{ \infer{⊢ Γ, ?A }{ ⋯ } & \infer{!A ⊢ Γ }{ ⋯ }}

  • intuitionistic logic, because you can’t do weakening on the right of the sequent (at most one formula on the right of a sequent)

  MLL MALL MELL LL
propositional P-c (Marson & Tervi, 2003/6) CoNP-c (Lincoln, 92) decidable (cut-elimination), not elementary recursive not elementary recursive

Call-by-name/Negative encoding

Hilbert calculus:

  • (K): $A ⇒ B ⇒ A$
  • (S): $(A ⇒ B ⇒ C) ⇒ (A ⇒ B) ⇒ (A ⇒ C)$

    • (K) and (S): LJ
  • (P(ierce law)): $((A ⇒ B) ⇒ A) ⇒ A$
    • (K), (S) and (P): LK

Translation in LL

K:

\infer{⊢ A → B → A}{ \infer{A ⊢ B → A}{ \infer{A, B ⊢ A}{ \infer{A ⊢ A}{} } } }

So in LL, it could be encoded as

A ⊸ !B ⊸ A

S:

\infer{⊢ (A → B → C) → (A → B) → A → C)} { \infer[c]{(A → B → C),(A → B), A ⊢ C}{ \infer{(A → B → C),(A → B), A, A ⊢ C}{ \infer{A→B→C, B, A ⊢ C}{ \infer{B → C, B ⊢ C}{ \infer{B ⊢ B}{} & \infer{C ⊢ C}{} } & \infer{A ⊢ A}{} } & \infer{A ⊢ A}{} } } }

can be translated in LL as

(A ⊸ B ⊸ C) ⊸ (!A ⊸ B) ⊸ !A ⊸ C

So from LJ to LL:

A ⇒ B \; \leadsto \; !A ⊸ B

Pierce law:

\infer{⊢ ((A → B) → A) → A}{ \infer[c]{(A → B) → A ⊢ A}{ \infer{(A → B) → A ⊢ A, A}{ \infer{⊢ A, A → B }{ \infer[w]{A ⊢ A, B}{ A ⊢ A } } & \infer{A ⊢ A}{} } } }
  • Intuitionistic: structural rules on the left
  • Classical: structural rules on the right

So from LK to LL:

A ⇒ B \; \leadsto \; !?A ⊸ ?B

NB: Dual translation: call-by-value/positive translation

Negative translation: $(\bullet)^{\rm n}$ (from LJ to LL)

X^{\rm n} \; ≝ \; X\\ (A ⇒ B)^{\rm n} \; ≝ \; !A^{\rm n} ⊸ B^{\rm n}\\ (A ∧ B)^{\rm n} \; ≝ \; A^{\rm n} \& B^{\rm n}\\ True^{\rm n} \; ≝ \; ⊤\\ (A ∨ B)^{\rm n} \; ≝ \; !A^{\rm n} ⊕ !B^{\rm n}\\ False^{\rm n} \; ≝ \; 0\\ (Γ ⊢ A)^{\rm n} \; ≝ \; !Γ^{\rm n} ⊢ A^{\rm n}

Ex:

\cfrac{}{A ⊢ A} \leadsto \cfrac{\cfrac{}{A^{\rm n} ⊢ A^{\rm n}}}{!A^{\rm n} ⊢ A^{\rm n}} \quad \text{der. then ax.}
\cfrac{Γ, A ⊢ B}{Γ ⊢ A → B} \leadsto \cfrac{!Γ^{\rm n}, !A^{\rm n} ⊢ B^{\rm n}}{!Γ^{\rm n} ⊢ !A^{\rm n} → B^{\rm n}}

But there are some problems (cf pictures):

\cfrac{Γ ⊢ A \qquad Δ, B ⊢ C}{Γ, Δ, A→B ⊢ C} \leadsto \text{ ?}

You need a cut:

\infer[cut]{!Γ^{\rm n}, !Δ^{\rm n}, !(!A^{\rm n} ⊸ B^{\rm n}) ⊢ C^{\rm n}}{ \infer[!p]{!Γ^{\rm n}, !(!A^{\rm n} ⊸ B^{\rm n}) ⊢ !B^{\rm n}}{ \infer{ !Γ^{\rm n}, !(!A^{\rm n} ⊸ B^{\rm n}) ⊢ B^{\rm n} }{ \infer{!Γ^{\rm n}, !A^{\rm n} ⊸ B^{\rm n} ⊢ B^{\rm n}}{ \infer{B^{\rm n} ⊢ B^{\rm n}}{\phantom{B^{\rm n} ⊢ B^{\rm n}}} & \infer{!Γ^{\rm n} ⊢ !A^{\rm n}}{\infer{!Γ^{\rm n} ⊢ A^{\rm n}}{\phantom{!Γ^{\rm n} ⊢ A^{\rm n}}}} } } } & \infer{!Δ^{\rm n}, !B^{\rm n} ⊢ C^{\rm n}}{\phantom{!Δ^{\rm n}, !B^{\rm n} ⊢ C^{\rm n}}} }

T-translation: $(\bullet)^{\rm T}$ (from LK to LL)

X^{\rm T} \; ≝ \; X\\ (A ⇒ B)^{\rm T} \; ≝ \; !?A^{\rm T} ⊸ ?B^{\rm T}\\ (A ∧ B)^{\rm T} \; ≝ \; ?A^{\rm T} \& ?B^{\rm T}\\ True^{\rm T} \; ≝ \; ⊤\\ (A ∨ B)^{\rm T} \; ≝ \; ?A^{\rm T} ⅋ ?B^{\rm T}\\ False^{\rm T} \; ≝ \; ⊥\\ (¬ A)^{\rm T} \; ≝ \; !?(A^{\rm T})^⊥\\ (Γ ⊢ Δ)^{\rm T} \; ≝ \; !?Γ^{\rm T} ⊢ ?Δ^{\rm T}

NB: In linear logic: $A ⊸ B ≡ A^⊥ ⅋ B$, and not $A^⊥ ⊕ B$, so having $A$ false is not sufficient to have $A → B$ true, contrary to classical logic. The $⅋$ means that $B$ is true as much as $A$ is false ⟶ this is a form of strict implication, the premise and the conclusion are related (contrary to extensional/non-strict implication (given by its truth table, as in linear logic: $A → B$ as soon as $A$ is false, whatever $B$)).

Leave a comment