Analytic Calculi for Substructural Logics: Theory and Applications
Agata Ciabattoni
Vienna University of Technology agata@logic.at
Proof Theory & Universal Algebra Computation
Analytic Calculi for Substructural Logics: Theory and Applications - - PowerPoint PPT Presentation
Analytic Calculi for Substructural Logics: Theory and Applications Agata Ciabattoni Vienna University of Technology agata@logic.at Proof Theory & Universal Algebra Computation Introduction Chapter I Curry-Howard Correspondence Chapter II
Analytic Calculi for Substructural Logics: Theory and Applications
Agata Ciabattoni
Vienna University of Technology agata@logic.at
Proof Theory & Universal Algebra Computation
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Substructural logics
include
▸ intuitionistic logic, ▸ intermediate logics, ▸ relevance logics, ▸ linear logic, ▸ fuzzy logics, ▸ ...
lack the properties expressed by sequent calculus structural rules useful for reasoning about natural language, vagueness, resources, dynamic data structures, algebraic varieties, concurrency ...
1 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
This Talk
Theory Systematic and automated introduction of sequent and hypersequent calculi with Kazushige Terui & Nikolaos Galatos
(LICS 2008, Algebra Universalis 2011, APAL 2012, APAL 2017)
2 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
This Talk
Theory Systematic and automated introduction of sequent and hypersequent calculi with Kazushige Terui & Nikolaos Galatos
(LICS 2008, Algebra Universalis 2011, APAL 2012, APAL 2017)
Applications Extraction of concurrent λ-calculi with Federico Aschieri & Francesco A. Genco
(LICS 2017, Submitted 2018)
From hypersequent calculi to natural deduction systems with Francesco A. Genco
(TOCL 2018)
3 / 51
Chapter I Chapter III Chapter II
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Substructural Logics
Substructural logics
Defined as axiomatic extensions of Full Lambek calculus FL subvarieties of (pointed) residuated lattices RL Algebraization For any set A ∪ {A,B} of formulas, A ⊢FL+B A iff ε[A] ⊧RL+ε(B) ε(A) where ε(−) is the equation corresponding to −.
Example: G¨
(α → β) ∨ (β → α) to intuitionistic logic (FL + exchange, weakening and contraction)
1 ≤ (x → y) ∨ (y → x)
4 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Substructural Logics
Substructural logics
Defined as axiomatic extensions of Full Lambek calculus FL subvarieties of (pointed) residuated lattices RL
Example: G¨
(α → β) ∨ (β → α) to intuitionistic logic (FL + exchange, weakening and contraction)
1 ≤ (x → y) ∨ (y → x) to Heyting algebras (RL + commutativity, integrality and idempotency)
4 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Why analytic calculi?
Substructural logics
Defined as axiomatic extensions of Full Lambek calculus FL subvarieties of (pointed) residuated lattices RL Their applicability/usefulness strongly depends on the availability of Analytic calculi useful for establishing various properties of logics key for developing automated reasoning methods
5 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Sequent Calculus
Sequents (Gentzen 1934)
A1,...,An ⇒ B1,...,Bm Axioms: E.g. A ⇒ A, ⇒ A Rules: Structural E.g. Γ,B,A ⇒ Π Γ,A,B ⇒ Π (e,l) Γ,A,A ⇒ Π Γ,A ⇒ Π (c,l) Γ ⇒ Π Γ,A ⇒ Π (w,l) Logical (left and right) Cut Γ ⇒ A Σ,A ⇒ Π Γ,Σ ⇒ Π Cut
6 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Sequent Calculus
Sequents (Gentzen 1934)
A1,...,An ⇒ B Axioms: E.g. A ⇒ A, ⇒ A Rules: Structural E.g. Γ,B,A ⇒ Π Γ,A,B ⇒ Π (e,l) Γ,A,A ⇒ Π Γ,A ⇒ Π (c,l) Γ ⇒ Π Γ,A ⇒ Π (w,l) Logical (left and right) Cut Γ ⇒ A Σ,A ⇒ Π Γ,Σ ⇒ Π Cut
6 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Sequent Calculus – the cut rule
Γ ⇒ A A ⇒ Π Γ,Σ ⇒ Π Cut key to prove completeness w.r.t. Hilbert systems modus ponens A A → B B bad for proof search
Cut-elimination theorem
Each proof using Cut can be transformed into a proof without Cut.
7 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Sequent Calculus – state of the art
Cut-free sequent calculi have been successfully used to prove consistency, decidability, interpolation, . . . to give syntactic proofs of algebraic properties for which (in particular cases) semantic methods are not known or do not work well Many useful and interesting logics have no cut-free sequent calculus
8 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Some extensions of the sequent calculus
A large range of generalizations of sequent calculus have been introduced hypersequent calculus (Avron, Mints, Pottinger) display calculus (Belnap) nested sequents (Br¨ unnler, Fitting) deep inference (Guglielmi) bunched calculi (Dunn, Mints, . . . ) labelled systems (Gabbay, Negri, Vigan´
systems of rules (Negri) many placed sequents (TU Vienna) ...
9 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Defining analytic calculi: state of the art
The definition of analytic calculi is usually logic-tailored. Steps: (i) choosing a framework (ii) looking for the “right” inference rule(s) (iii) proving cut-elimination
10 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Systematic introduction of (hyper)sequent calculi
11 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
The base logic: FLe
FLe ≈ commutative Full Lambek calculus FLe ≈ intuitionistic logic without weakening and contraction FLe ≈ intuitionistic Linear Logic without exponentials Algebraic semantics: A (bounded pointed) commutative residuated lattice is P = ⟨P,∧,∨,⊗,→,⊺,0,1,⟩
1 ⟨P,∧,∨⟩ is a lattice with ⊺ greatest and least 2 ⟨P,⊗,1⟩ is a commutative monoid. 3 For any x,y,z ∈ P, x ⊗ y ≤ z ⇐
⇒ y ≤ x → z
4 0 ∈ P. 12 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Sequent calculus for commutative FL
FLe
A,B,Γ ⇒ Π A ⊗ B,Γ ⇒ Π ⊗l Γ ⇒ A ∆ ⇒ B Γ,∆ ⇒ A ⊗ B ⊗r Γ ⇒ A B,∆ ⇒ Π Γ,A → B,∆ ⇒ Π → l A,Γ ⇒ B Γ ⇒ A → B → r A,Γ ⇒ Π B,Γ ⇒ Π A ∨ B,Γ ⇒ Π ∨l Γ ⇒ Ai Γ ⇒ A1 ∨ A2 ∨r 0 ⇒ 0l Ai,Γ ⇒ Π A1 ∧ A2,Γ ⇒ Π ∧l Γ ⇒ A Γ ⇒ B Γ ⇒ A ∧ B ∧r Γ ⇒ ⊺ ⊺r Γ ⇒ Γ ⇒ 0 0r ⇒ 1 1r ,Γ ⇒ Π l Γ ⇒ Π 1,Γ ⇒ Π 1l
13 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
(Commutative) Substructural Logics
defined by adding Hilbert axioms to the sequent calculus FLe (or algebraic equations to commutative residuated lattices). From axioms to rules: example Contraction: α → α ⊗ α A,A,Γ ⇒ Π A,Γ ⇒ Π (c) Weakening l: α → 1 Γ ⇒ Π Γ,A ⇒ Π (w,l) Weakening r: 0 → α Γ ⇒ Γ ⇒ A (w,r)
Equivalence between rules and axioms
14 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
(Commutative) Substructural Logics
defined by adding Hilbert axioms to the sequent calculus FLe (or algebraic equations to commutative residuated lattices). From axioms to rules: example Contraction: α → α ⊗ α A,A,Γ ⇒ Π A,Γ ⇒ Π (c) Weakening l: α → 1 Γ ⇒ Π Γ,A ⇒ Π (w,l) Weakening r: 0 → α Γ ⇒ Γ ⇒ A (w,r)
Equivalence between rules and axioms
⊢FLe+(axiom) = ⊢FLe+(rule) For which axioms can we do it?
14 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Algebraic Proof Theory
(AC, N. Galatos and K. Terui – APAL 2012, APAL 2017) Which Hilbert axioms can be transformed into rules that preserve cut-elimination? Which algebraic equations over residuated lattices are preserved by algebraic completions? A completion of an algebra A is a complete algebra B (i.e. it has arbitrary ⋁ and ⋀) such that A ⊆ B.
15 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Classification
Formulas are classified according to the polarity of their connectives w.r.t. a calculus (e.g., FLe) (J.-M. Andreoli, 1992) Positive polarity: rule introducing the connective on the left is invertible E.g. Γ,A ⇒ Π Γ,B ⇒ Π Γ,A ∨ B → Π ∨l Negative polarity: rule introducing the connective/quantifier on the right is invertible E.g. A,Γ ⇒ B Γ ⇒ A → B → r
16 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Substructural Hierarchy
Definition (AC, Galatos and Terui, LICS 2008)
The classes Pn,Nn of positive and negative axioms/equations are: P0 ∶∶= N0 ∶∶= atomic formulas Pn+1 ∶∶= Nn ∣ Pn+1 ∨ Pn+1 ∣ Pn+1 ⊗ Pn+1 ∣ 1 ∣ Nn+1 ∶∶= Pn ∣ Pn+1 → Nn+1 ∣ Nn+1 ∧ Nn+1 ∣ 0 ∣ ⊺
17 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Examples
Class Axiom Name N2 α → 1, → α weakening α → α ⊗ α contraction α ⊗ α → α expansion ⊗αn → ⊗αm knotted axioms ¬(α ∧ ¬α) weak contraction P2 α ∨ ¬α excluded middle (α → β) ∨ (β → α) prelinearity P3 ¬α ∨ ¬¬α weak excluded middle ¬(α ⊗ β) ∨ (α ∧ β → α ⊗ β) (wnm) N3 ((α → β) → β) → ((β → α) → α)
(α ∧ β) → α ⊗ (α → β) divisibility The hierarchy collapses to the class N3 (Jerabek 2016, commutative case)
18 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Algorithm: from axioms to rules
Ingredient 1
The use of the invertible logical rules of FLe
Ingredient 2: Ackermann Lemma
An algebraic equation t ≤ u is equivalent to a quasiequation u ≤ x ⇒ t ≤ x, and also to x ≤ t ⇒ x ≤ u, where x is a fresh variable not occurring in t,u. Example: the sequent A ⇒ B is equivalent to Γ ⇒ A Γ ⇒ B Γ,B ⇒ ∆ Γ,A ⇒ ∆ (Γ(∆) fresh metavariable for multisets of formulas (at most one))
19 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Axioms to Sequent Rules
Algorithm to transform axioms/equations up to the class N2: into ”good” structural rules in sequent calculus into ”good” quasiequations t1 ≤ u1 and..and tm ≤ um ⇒ tm+1 ≤ um+1
20 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Axioms to Sequent Rules
Algorithm to transform axioms/equations up to the class N2: into ”good” structural rules in sequent calculus into ”good” quasiequations t1 ≤ u1 and..and tm ≤ um ⇒ tm+1 ≤ um+1 Dedekind Completion of Rationals For any X ⊆ Q,
X ⊳ = {y ∈ Q ∶ ∀x ∈ X.x ≤ y} X ⊲ = {y ∈ Q ∶ ∀x ∈ X.y ≤ x} X is closed if X = X ⊳⊲ (Q, +, ⋅) can be embedded into (C(Q), +, ⋅) with C(Q) = {X ⊆ Q ∶ X is closed}
20 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Axioms to Sequent Rules
Algorithm to transform axioms/equations up to the class N2: into ”good” structural rules in sequent calculus into ”good” quasiequations t1 ≤ u1 and..and tm ≤ um ⇒ tm+1 ≤ um+1 Beyond N2? Ex. (α → β) ∨ (β → α)
Limitative Result
Analytic sequent calculi ⇒ Dedekind-MacNeille completion (AC, N. Galatos and K. Terui. APAL 2012)
20 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Hypersequent calculus
Axioms within the class P3 have the form N2 ∨ N2 ∨ ⋅⋅⋅ ∨ N2 Hypersequents Γ1 ⇒ Π1 ∣ ... ∣Γn ⇒ Πn where for all i = 1,...n, Γi ⇒ Πi is a sequent.
21 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Hypersequent calculus
Axioms within the class P3 have the form N2 ∨ N2 ∨ ⋅⋅⋅ ∨ N2 Hypersequents Γ1 ⇒ Π1 ∣ ... ∣Γn ⇒ Πn where for all i = 1,...n, Γi ⇒ Πi is a sequent.
21 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Hypersequent calculus
It is obtained embedding sequents into hypersequents Γ1 ⇒ Π1 ∣ ... ∣Γn ⇒ Πn where for all i = 1,...n, Γi ⇒ Πi is a sequent. G ∣Γ ⇒ A G ∣A,∆ ⇒ Π G ∣Γ,∆ ⇒ Π Cut G ∣A ⇒ A Identity G ∣Γ ⇒ A G ∣B,∆ ⇒ Π G ∣Γ,A → B,∆ ⇒ Π → l G ∣A,Γ ⇒ B G ∣Γ ⇒ A → B → r and adding suitable rules to manipulate the additional layer of structure. G ∣Σ ⇒ B ∣Γ ⇒ A∣G′ G ∣Γ ⇒ A∣Σ ⇒ B ∣G′ (ee) G G ∣Γ ⇒ A (ew) G ∣Γ ⇒ A∣Γ ⇒ A G ∣Γ ⇒ A (ec)
22 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Hypersequent calculus
It is obtained embedding sequents into hypersequents Γ1 ⇒ Π1 ∣ ... ∣Γn ⇒ Πn where for all i = 1,...n, Γi ⇒ Πi is a sequent. G ∣Γ ⇒ A G ∣A,∆ ⇒ Π G ∣Γ,∆ ⇒ Π Cut G ∣A ⇒ A Identity G ∣Γ ⇒ A G ∣B,∆ ⇒ Π G ∣Γ,A → B,∆ ⇒ Π → l G ∣A,Γ ⇒ B G ∣Γ ⇒ A → B → r and adding suitable rules to manipulate the additional layer of structure. G ∣Σ ⇒ B ∣Γ ⇒ A∣G′ G ∣Γ ⇒ A∣Σ ⇒ B ∣G′ (ee) G G ∣Γ ⇒ A (ew) G ∣Γ ⇒ A∣Γ ⇒ A G ∣Γ ⇒ A (ec)
22 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Hypersequent calculus: an example
G¨
G ∣Γ,Σ′ ⇒ ∆′ G ∣Γ′,Σ ⇒ ∆ G ∣Γ,Σ ⇒ ∆∣Γ′,Σ′ ⇒ ∆′ (com) (Avron, Annals of Math and art. Intell. 1991)
β ⇒ β α ⇒ α
(com)
α ⇒ β ∣β ⇒ α
(→,r),(→,r)
⇒ α → β ∣ ⇒ β → α
(∨i,r),(∨i,r)
⇒ (α → β) ∨ (β → α)∣ ⇒ (α → β) ∨ (β → α)
(EC)
⇒ (α → β) ∨ (β → α)
23 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Axioms to Hypersequent Rules
Algorithm to transform axioms/equations up to the class P3: into ”good” structural rules in hypersequent calculus into ”good” analytic clauses t1 ≤ u1 and..and tm ≤ um ⇒ tm+1 ≤ um+1 or..or tn ≤ un
Limitative Result
Analytic hypersequent calculi ⇒ hyperDedekind-MacNeille completion Example ((α → β) → β) → ((β → α) → α)
24 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Axioms to Hypersequent Rules
Algorithm to transform axioms/equations up to the class P3: into ”good” structural rules in hypersequent calculus into ”good” analytic clauses t1 ≤ u1 and..and tm ≤ um ⇒ tm+1 ≤ um+1 or..or tn ≤ un
Limitative Result
Analytic hypersequent calculi ⇒ hyperDedekind-MacNeille completion Example ((α → β) → β) → ((β → α) → α)
24 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From axioms to rules – our tool
https://www.logic.at/tinc/webaxiomcalc Input: Hilbert axioms
25 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
“Applications”
closure under algebraic completions of large classes of equations decidability results standard completeness proofs (i.e. completeness of axiomatic systems w.r.t. algebras whose lattice reduct is the real unit interval [0,1]) ...
26 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Proof Theory to Computation
“We believe that logics with a cut-free hypersequent calculus could serve as bases for parallel λ-calculi.” (Avron 1991) Γ1 ⇒ Π1 ∣ ... ∣Γn ⇒ Πn
27 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Curry–Howard correspondence
Logic { Formulae Proofs Computation{ Types Programs correspond to correspond to Making proofs analytic ⇐ ⇒ evaluating programs
28 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Curry–Howard correspondence
Logic { Formulae Proofs Computation{ Types Programs correspond to correspond to Making proofs analytic ⇐ ⇒ evaluating programs
28 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Curry–Howard correspondence II
Introduced for Intuitionistic logic and simply typed lambda calculus using Natural Deduction systems . . . . t ∶ A → B . . . . u ∶ A tu ∶ B [x ∶ A] . . . . t ∶ B λx t ∶ A → B Proof Transformation ↦ β-reduction in λ-calculus Âă [x ∶ A]1 . . . . u ∶ B λx.u ∶ A → B
1
Γ1 P t ∶ A (λx.u)t ∶ B ↦ Γ1 P t ∶ A . . . . u[t/x] ∶ B
29 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Curry–Howard correspondence II
Introduced for Intuitionistic logic and simply typed lambda calculus using Natural Deduction systems . . . . t ∶ A → B . . . . u ∶ A tu ∶ B [x ∶ A] . . . . t ∶ B λx t ∶ A → B Proof Transformation ↦ β-reduction in λ-calculus Âă [x ∶ A]1 . . . . u ∶ B λx.u ∶ A → B
1
Γ1 P t ∶ A (λx.u)t ∶ B ↦ Γ1 P t ∶ A . . . . u[t/x] ∶ B
29 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Different logics, different models of computation
classical logic (Griffin 1990, Parigot 1997 ..) linear logic modal logics ...
30 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Different logics, different models of computation
classical logic (Griffin 1990, Parigot 1997 ..) linear logic modal logics ...
30 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Proof Theory to Computation
Curry–Howard for Intermediate Logics
Natural Deduction
[A] . . . . B A → B
Hypersequents
Γ1 ⇒ ∆1 ∣ ... ∣ Γn ⇒ ∆n
Concurrent λ-calculi
λn λm a(nm) ∥a λp λf f (pf (ax))
31 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Hypersequents to Natural Deduction
32 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Via ... Systems of rules
(S. Negri, JLC 2016) Defined on labelled sequents (e.g., “xRy,Γ ⇒ ∆,y ∶ A”) to capture all normal modal logics formalised by Sahlqvist formulae Sets of rules connected by:
formula matching constraints two-levels: Γ1
1 ⇒ ∆1 1 ... Γn1 1 ⇒ ∆n1 1
Γ1 ⇒ ∆1 (top1) . . . . Γ ⇒ ∆ ... Γ1
k ⇒ ∆1 k ... Γnk k ⇒ ∆nk k
Γk ⇒ ∆k (topk) . . . . Γ ⇒ ∆ Γ ⇒ ∆ (bottom)
33 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Two-systems of rules: an example
G¨
B,Γ1 ⇒ ∆1 A,Γ1 ⇒ ∆1 (com1) . . . . Γ ⇒ ∆ A,Γ2 ⇒ ∆2 B,Γ2 ⇒ ∆2 (com2) . . . . Γ ⇒ ∆ Γ ⇒ ∆ (ec) B ⇒ B init. A ⇒ B (com1) ⇒ A → B (→ r) ⇒ (A → B) ∨ (B → A) (∨r) A ⇒ A init. B ⇒ A (com2) ⇒ B → A (→ r) ⇒ (A → B) ∨ (B → A) (∨r) ⇒ (A → B) ∨ (B → A) (ec)
34 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Embedding two-systems and hypersequents
(AC, Genco – TOCL 2018) Any hypersequent derivation can be transformed into a derivation using two systems of rules Any hypersequent rule can be rewritten as a two systems of rules, and viceversa G ∣ Γ′
1 ⇒ ∆′ 1
... G ∣ Γ′
k ⇒ ∆′ k
G ∣ Γ1 ⇒ ∆1 ∣ ... ∣ Γn ⇒ ∆n
S1, . . . , Sn sets of sequents
⇑⇓
S1 ∪ ⋅ ⋅ ⋅ ∪ Sn = {Γ′
i ⇒ ∆′ i}1≤i≤k
S1 Γ1 ⇒ ∆1 . . . . Γ ⇒ ∆ ⋯ Sn Γn ⇒ ∆n . . . . Γ ⇒ ∆ Γ ⇒ ∆
35 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Hypersequents to Natural Deduction
as a corollary of the embedding Example: G¨
B,Γ1 ⇒ ∆1 A,Γ2 ⇒ ∆2 A,Γ1 ⇒ ∆1 ∣ B,Γ2 ⇒ ∆2 B,Γ1 ⇒ ∆1 A,Γ1 ⇒ ∆1 . . . . Γ ⇒ ∆ A,Γ2 ⇒ ∆2 B,Γ2 ⇒ ∆2 . . . . Γ ⇒ ∆ Γ ⇒ ∆
A B . . . . F B A . . . . F F
embedding 36 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Hypersequents to Natural Deduction
as a corollary of the embedding Example: G¨
B,Γ1 ⇒ ∆1 A,Γ2 ⇒ ∆2 A,Γ1 ⇒ ∆1 ∣ B,Γ2 ⇒ ∆2 B,Γ1 ⇒ ∆1 A,Γ1 ⇒ ∆1 . . . . Γ ⇒ ∆ A,Γ2 ⇒ ∆2 B,Γ2 ⇒ ∆2 . . . . Γ ⇒ ∆ Γ ⇒ ∆
A B . . . . F B A . . . . F F
embedding 36 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From hypersequents to Natural Deduction
Example II: Classical Logic
Γ1,A ⇒ ∆1 Γ1 ⇒ ∆1 ∣ A ⇒ Γ1,A ⇒ ∆1 Γ1 ⇒ ∆1 . . . . Γ ⇒ ∆ A ⇒ . . . . Γ ⇒ ∆ Γ ⇒ ∆
A
. . . F [A] . . . . F F
embedding 37 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
From Hypersequents to Concurrent λ-calculi
38 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
A case study: G¨
(Aschieri, AC and Genco – LICS 2017) Natural deduction calculus NG:= NI +
A B . . . . F B A . . . . F F
39 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
The calculus λG
xA ∶ A [xA ∶ A] . . . . u ∶ B λxAu ∶ A → B t ∶ A → B u ∶ A tu ∶ B u ∶ A t ∶ B ⟨u,t⟩ ∶ A ∧ B u ∶ A ∧ B u π0 ∶ A u ∶ A ∧ B u π1 ∶ B Γ ⊢ u ∶ Γ ⊢ efqP(u) ∶ P with P atomic, P ≠ . u ∶ A au ∶ B . . . . w1 ∶ F v ∶ B av ∶ A . . . . w2 ∶ F w1 ∥a w2 ∶ F
w1 ∥a w2 has the role of νa(W1 ∣ W2) in π-calculus
40 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
The calculus λG
xA ∶ A [xA ∶ A] . . . . u ∶ B λxAu ∶ A → B t ∶ A → B u ∶ A tu ∶ B u ∶ A t ∶ B ⟨u,t⟩ ∶ A ∧ B u ∶ A ∧ B u π0 ∶ A u ∶ A ∧ B u π1 ∶ B Γ ⊢ u ∶ Γ ⊢ efqP(u) ∶ P with P atomic, P ≠ . u ∶ A au ∶ B . . . . w1 ∶ F v ∶ B av ∶ A . . . . w2 ∶ F w1 ∥a w2 ∶ F
w1 ∥a w2 has the role of νa(W1 ∣ W2) in π-calculus
40 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Making proofs analytic: Cross reductions & Code Mobility
[y] u A B . . . . C [x] v B A . . . . C C a
41 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Making proofs analytic: Cross reductions & Code Mobility
[y] u A B . . . . C [x] v B A . . . . C C a x v B . . . . C y u A . . . . C C
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Making proofs analytic: Cross reductions & Code Mobility
[y] u A B . . . . C [x] v B A . . . . C C a [x] y u A . . . . C [y] x v B . . . . C C b
41 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Analytic proofs and Computation
Normalization: ideas from Embedding of hypersequents into systems of rules Hypersequent cut-elimination
1 Transform the term in parallel form
t1 ∥a1 t2 ∥a2 ... ∥an tn+1
2 By permutations, isolate the redex u ∥a v, where a violates the
subformula property with maximal complexity
3 Normalize in parallel u and v
(Simply-typed λ-calculus reductions)
4 Apply cross reductions to u ∥a v
Every proof term reduces to an analytic proof
42 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Analytic proofs and Computation
1 Transform the term in parallel form
t1 ∥a1 t2 ∥a2 ... ∥an tn+1
2 By permutations, isolate the redex u ∥a v, where a violates the
subformula property with maximal complexity
3 Normalize in parallel u and v
(Simply-typed λ-calculus reductions)
4 Apply cross reductions to u ∥a v
Every proof term reduces to an analytic proof
42 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Computing with λG
more expressive than simply typed λ calculus enhanced efficiency via code mobility
43 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
It’s more powerful than λ-calculus
Example: Parallel disjunction, i.e. a term O s.t. ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ OuT ↦∗ T OTu ↦∗ T OFF ↦∗ F Not expressible in λ-calculus (by Berry’s sequentiality theorem) In λG O ∶= λxBool λyBool(if x then(λz λk z)else(λz λk k))T(ax) ∥a (if y then(λz λk z)else(λz λk k))T(ay)
44 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Further example: Classical logic
(F. Aschieri, AC and F. A. Genco, Submitted 2018) Logic IL + A ∨ ¬A λ-calculus λCL [aA ∶ A] . . . . s ∶ F u ∶ A a¬A u ∶ . . . . t ∶ F s ∥a t ∶ F (em) Communication schema (sending data)
45 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Classical logic and code mobility
IL + A ∨ ¬A [y] u A
. . . γ F [A] . . . . F F a y
. . . γ F [y] u A . . . . F F b C[au] ∥a D → (C[b y] ∥a D) ∥b D[uy/b/a]
46 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Logic-based concurrent λ-calculi
How far can we go?
47 / 51
CL Gödel logic
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Logic-based concurrent λ-calculi
How far can we go?
47 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Logic-based concurrent λ-calculi
For any axiom Ax ∈ P′
3, let λAx be the concurrent λ-calculus corresponding
to the logic IL + Ax.
Our Results (F. Aschieri, AC and F. A. Genco, Submitted 2018)
Every proof term in λAx reduces to a normal proof term satisfying the subformula property λAx is more powerful than the λ-calculus λAx allows to send open processes Example: for Ax ∶= (A1 → A2) ∨ (A2 → A3) ∨ (A3 → A1)
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Logic-based concurrent λ-calculi
For any axiom Ax ∈ P′
3, let λAx be the concurrent λ-calculus corresponding
to the logic IL + Ax.
Our Results (F. Aschieri, AC and F. A. Genco, Submitted 2018)
Every proof term in λAx reduces to a normal proof term satisfying the subformula property λAx is more powerful than the λ-calculus λAx allows to send open processes Example: for Ax ∶= (A1 → A2) ∨ (A2 → A3) ∨ (A3 → A1)
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Process-oriented programming
Graphs as specification for communication topologies Encoded as axioms of the shape ⋁(Ai → ⋀Bj) ∈ P3 Example: 4 3 2 1 encoded as (A1 → A1∧A2∧A4)∨(A2 → A2∧A1)∨(A3 → A3∧A1∧A2)∨(A4 → A4∧)
49 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Open questions – a selection
Climbing up the hierarchy Addition of quantifiers Logics without contraction Strong normalization Expressive power of the introduced concurrent λ-calculi Their use (i) to formalize and reason about concurrent systems (ii) as bases for concurrent functional programming languages Relationships with other typed process models
50 / 51
Introduction Chapter I Curry-Howard Correspondence Chapter II Chapter III
Open questions – a selection
Climbing up the hierarchy Addition of quantifiers Logics without contraction Strong normalization Expressive power of the introduced concurrent λ-calculi Their use (i) to formalize and reason about concurrent systems (ii) as bases for concurrent functional programming languages Relationships with other typed process models
50 / 51
Permutation Reductions (u ∥a v)w ↦ uw ∥a vw, if a does not occur free in w w(u ∥a v) ↦ wu ∥a wv, if a does not occur free in w efqP(w1 ∥a w2) ↦ efqP(w1) ∥a efqP(w2) (u ∥a v) πi ↦ u πi ∥a v πi λxA (u ∥a v) ↦ λxA u ∥a λxA v ⟨u ∥a v, w⟩ ↦ ⟨u, w⟩ ∥a ⟨v, w⟩, if a does not occur free in w ⟨w, u ∥a v⟩ ↦ ⟨w, u⟩ ∥a ⟨w, v⟩, if a does not occur free in w (u ∥a v) ∥b w ↦ (u ∥b w) ∥a (v ∥b w), if the communication complexity of b is greater than 0 w ∥b (u ∥a v) ↦ (w ∥b u) ∥a (w ∥b v), if the communication complexity of b is greater than 0 Cross Reductions Basic Cross Reductions C[a u] ∥a D ↦ D[u/a] where a ∶ ¬A, a ∶ A, C[a u], D are normal simply typed λ-terms and C, D simple contexts; the sequence of free variables of u is empty; a does not occur in u; b is fresh Cross Reductions u ∥a v ↦ u, if a does not occur in u and u ∥a v ↦ v, if a does not occur in v C[a u] ∥a D ↦ (C[b ⟨y⟩] ∥a D) ∥b D[ub/y/a] where a ∶ ¬A, a ∶ A, C[a u], D are normal simply typed λ-terms and C, D simple contexts; y is the (non-empty) sequence of the free variables of u which are bound in C[a u]; B is the conjunction of the types of the variables in y; a is rightmost; b is fresh and b ∶ ¬B, b ∶ B
Intuitionistic Reductions (λxA u)t ↦ u[t/xA] ⟨u0, u1⟩ πi ↦ ui, for i = 0, 1 Permutation Reductions (u ∥a v)w ↦ uw ∥a vw, if a does not occur free in w w(u ∥a v) ↦ wu ∥a wv, if a does not occur free in w efqP(w1 ∥a w2) ↦ efqP(w1) ∥a efqP(w2) (u ∥a v) πi ↦ u πi ∥a v πi λxA (u ∥a v) ↦ λxA u ∥a λxA v ⟨u ∥a v, w⟩ ↦ ⟨u, w⟩ ∥a ⟨v, w⟩, if a does not occur free in w ⟨w, u ∥a v⟩ ↦ ⟨w, u⟩ ∥a ⟨w, v⟩, if a does not occur free in w (u ∥a v) ∥b w ↦ (u ∥b w) ∥a (v ∥b w), if the communication complexity of b is greater than 0 w ∥b (u ∥a v) ↦ (w ∥b u) ∥a (w ∥b v), if the communication complexity of b is greater than 0 Cross Reductions u ∥a v ↦ u if a does not occur in u u ∥a v ↦ v if a does not occur in v C[aA→B u] ∥a D[aB→A v] ↦ (D[ubC→D⟨z⟩/y] ∥a C[aA→B u]) ∥b (C[vbD→C ⟨y⟩/z] ∥a D[aB→A v]) where C[a u], D[a v] are normal simply typed λ-terms and C, D simple contexts; y is the sequence of the free variables of u which are bound in C[a u]; z is the sequence of the free variables of v which are bound in D[a v]; C and D are the conjunctions of the types of the variables in z and y, respectively; the displayed occurrences of a are the rightmost both in C[a u] and in D[a v]; b is fresh; and the communication complexity of a is greater than 0