2.84k likes | 2.86k Views
This study explores the computational aspect of classical logical connectives, focusing on implication, conjunction, disjunction, and negation. It delves into term assignments and the Curry-Howard Correspondence.
E N D
On the Computational Representation of Classical Logical Connectives Jayshan Raghunandan and Alexander Summers Department of Computing Imperial College London
Introduction • Curry-Howard Correspondence for Classical Logic • Originally: notice calculi have a correspondence • Recently: design calculi to correspond to a logic • “Inhabitation” of the proof rules • Term assignments for Classical Sequent Calculi • Different logical connectives may be chosen • Implication is most common • Conjunction, disjunction, negation • How easy is it to add and remove connectives? • Are there any which are not understood computationally?
Overview • Sequent Calculi & Inhabitation • E.g. the X calculus (van Bakel, Lengrand, Lescanne) • Binary Boolean Connectives • Identify related classes of connectives • “Once you know one, you know them all..” • ↔ is not well-known computationally • Develop a term calculus based on ↔ • What can be expressed computationally?
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ A Sequent Calculus for Implication
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ A Sequent Calculus for Implication P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ A Sequent Calculus for Implication P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A ⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ A Sequent Calculus for Implication P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : . Γ, x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : . Γ, x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : . Γ, x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α›: . Γ, x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: .Γ⊢Δ,α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α›: . Γ, x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
(Ax) ‹x·α› : .Γ,x:A⊢α:A, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS P: . Γ⊢Δ, α:A Q: . x:A, Γ⊢Δ (cut) Pα̂†x̂Q: . Γ⊢Δ Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: .Γ,x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢ α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢ α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢ α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢ α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A P: . Γ, x:A ⊢ α:B, Δ (→L) (→R) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ x̂Pα̂·δ: .Γ⊢δ:A→B, Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: . x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: . x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : . z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: . x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : . z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α› : .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: . x:B, Γ⊢Δ P: . Γ⊢Δ, α:A (→L) Pα̂[z]x̂Q : . z:A→B, Γ⊢ Δ
P: .Γ⊢Δ, α:A Q: .x:A, Γ⊢Δ (Ax) (cut) ‹x·α›: .Γ,x:A⊢α:A, Δ Pα̂†x̂Q: .Γ⊢Δ P: .Γ,x:A⊢α:B, Δ (→R) x̂Pα̂·δ: .Γ⊢δ:A→B, Δ Inhabitation (X Calculus) x, y, … INPUTS P, Q, … TERMS ^ BINDER α, δ, … OUTPUTS Q: .x:B, Γ⊢Δ P: .Γ⊢Δ,α:A (→L) Pα̂[z]x̂Q : .z:A→B, Γ⊢ Δ
Sequent-style term calculi • Symmetry: outputs are treated as explicitly as inputs • Basic building blocks: one input and one output • In X, these are capsules, ‹x·α› • Redexes are explicitly represented by cuts, • Connect output of one term to input of another • In X, these are written as Pα̂†x̂Q • c.f. applicative style: redexes defined by pattern matching
Sequent-style term calculi • Remaining syntax constructs come in pairs • One describes the most general situation for using the other • e.g. build functions and ‘function contexts’ • In X: • functions are built with exports: x̂Pα̂·δ • ‘contexts’ are built with mediators: Pα̂[z]x̂Q • For each logical connective, one pair is required • Corresponds to left and right introduction rules
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q)
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q)
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q)
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q)
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q) ] [ x̂Q Pα̂ z
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q) ] [ x̂Q Pα̂ z ŷRγ̂·δ
Cut-Elimination • Only one reduction rule is significant per connective • Defines how the two syntactic constructs interact • For example: implication (ŷRγ̂·δ) δ̂†ẑ(Pα̂[z]x̂Q) ] [ x̂Q Pα̂ z ŷRγ̂·δ