A Fibrational Framework for Substructural and Modal Logics Dan Licata Michael Shulman Wesleyan University University of San Diego Mitchell Riley Wesleyan University 1
Substructural Logic Γ ⊢ B Weakening Γ ,x:A ⊢ B Γ ,y:B,x:A ⊢ B Exchange Γ ,x:A,y:B ⊢ C Γ ,x:A,y:A ⊢ B Contraction Γ ,x:A ⊢ B 2
Modal Logic ∅ ⊢ A A ⊢ ♢ C Γ ⊢ ☐ A ♢ A ⊢ ♢ C
Modal Logic ∅ ⊢ A A ⊢ ♢ C Γ ⊢ ☐ A ♢ A ⊢ ♢ C ( ♢ A) × B vs. ♢ (A × B)
Intuitionistic substructural and modal logics/type systems Linear/a ffi ne: use once (state, sessions) Relevant: strictness annotations Ordered: linguistics Bunched : separation logic Comonads: staging, metavariables, coe ff ects Monads: e ff ects Interactions between products and modalities 4
Homotopy type theory dependent type theory higher homotopy theory category theory 5
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ ∫ # ⊣ ⊣ 6
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ A ⊢ B ♭ ∫ # ⊣ ⊣ A ⊢ # B 6
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ A ⊢ B ♭ ∫ # ⊣ ⊣ A ⊢ # B monad ♢ 6
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ A ⊢ B ♭ ∫ # ⊣ ⊣ A ⊢ # B comonad monad ☐ ♢ 6
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ A ⊢ B ♭ ∫ # ⊣ ⊣ A ⊢ # B monad comonad monad ☐ ♢ 6
Cohesive HoTT [Shulman,Schreiber] Dependent type theory with modalities ∫ A, ♭ A, #A ♭ A ⊢ B ♭ ∫ # ⊣ ⊣ A ⊢ # B monad (idempotent) comonad monad ☐ ♢ ♭♭ A ≅ ♭ A 6
♮ ♮ 𝕋 -Cohesion [Finster,L.,Morehouse,Riley] ⊣ comonad monad 7
♮ ♮ 𝕋 -Cohesion [Finster,L.,Morehouse,Riley] ⊣ comonad monad A ⊢ ♮ A ⊢ A 7
♮ ♮ 𝕋 -Cohesion [Finster,L.,Morehouse,Riley] ⊣ comonad monad A ⊢ ♮ A ⊢ A ♮ (A ⋀ B) ≅ ♮ A × ♮ B 7
Differential Cohesion [Schreiber; Gross,L.,New,Paykin,Riley,Shulman,Wellen] ♭ ∫ # ⊣ ⊣ 8
Differential Cohesion [Schreiber; Gross,L.,New,Paykin,Riley,Shulman,Wellen] 𝖪 R & ⊣ ⊣ ♭ ∫ # ⊣ ⊣ 8
Differential Cohesion [Schreiber; Gross,L.,New,Paykin,Riley,Shulman,Wellen] 𝖪 R & ⊣ ⊣ HoTT/UF Saturday! ♭ ∫ # ⊣ ⊣ 8
What are the common patterns in substructural and modal logics? 9
S4 ☐ Γ ; Δ ⊢ C Γ ,A; Δ ,A ⊢ C Γ ,A; Δ ⊢ C Γ ; ⋅ ⊢ A Γ ,A ; Δ , ☐ A ⊢ C Γ ; Δ ⊢☐ A Γ ; Δ , ☐ A ⊢ C
S4 ☐ Γ ; Δ ⊢ C morally ☐ Γ × Δ → C Γ ,A; Δ ,A ⊢ C Γ ,A; Δ ⊢ C Γ ; ⋅ ⊢ A Γ ,A ; Δ , ☐ A ⊢ C Γ ; Δ ⊢☐ A Γ ; Δ , ☐ A ⊢ C
S4 ☐ Γ ; Δ ⊢ C morally ☐ Γ × Δ → C Γ ,A; Δ ,A ⊢ C Γ ,A; Δ ⊢ C Γ ; ⋅ ⊢ A Γ ,A ; Δ , ☐ A ⊢ C Γ ; Δ ⊢☐ A Γ ; Δ , ☐ A ⊢ C context is all boxed formulae (up to weakening)
S4 ☐ Γ ; Δ ⊢ C morally ☐ Γ × Δ → C Γ ,A; Δ ,A ⊢ C because ☐ A → A Γ ,A; Δ ⊢ C Γ ; ⋅ ⊢ A Γ ,A ; Δ , ☐ A ⊢ C Γ ; Δ ⊢☐ A Γ ; Δ , ☐ A ⊢ C context is all boxed formulae (up to weakening)
Linear Logic ! linear cartesian/ Γ ,A; Δ ,A ⊢ C structural Γ ,A; Δ ⊢ C Γ ; ⋅ ⊢ A Γ ,A ; Δ ⊢ C Γ ; ⋅ ⊢ ! A Γ ; Δ ,!A ⊢ C context is all !’ed formulae (no weakening)
Linear Logic ⊗ Γ ⊢ A Δ ⊢ B Γ ,A,B ⊢ C Γ , Δ ⊢ A ⊗ B Γ ,A ⊗ B ⊢ C
Linear Logic ⊗ Γ ⊢ A Δ ⊢ B Γ ,A,B ⊢ C Γ , Δ ⊢ A ⊗ B Γ ,A ⊗ B ⊢ C context “is” a ⊗
Linear Logic ⊗ Γ ⊢ A Δ ⊢ B Γ ,A,B ⊢ C Γ , Δ ⊢ A ⊗ B Γ ,A ⊗ B ⊢ C context “is” a ⊗ Γ ⊢ A Δ ⊢ B Γ 0 ≡ Γ , Δ Γ 0 ⊢ A ⊗ B context is a ⊗ , up to some structural rules
Types inherit properties A,B ≡ B,A B ⊢ B A ⊢ A A,B ⊢ B ⊗ A A ⊗ B ⊢ B ⊗ A
Types inherit properties A,B; ⋅ ⊢ A ⊗ B A,B ; ⋅ ⊢ ! (A ⊗ B) A ; ! B ⊢ ! (A ⊗ B) ⋅ ; ! A, ! B ⊢ ! (A ⊗ B) ⋅ ; ! A ⊗ ! B ⊢ ! (A ⊗ B) 14
Pattern for ☐ ! ⊗ Operation on contexts, with explicit or admissible structural properties Type constructor that “internalizes” the context operation, inherits the structural properties 15
This paper A framework that abstracts the common aspects of many intuitionistic substructural and modal logics Products and left-adjoints ( ⊗ ,F) all one connective Negatives and right adjoints ( ⊸ ,U) another Cut elimination for all instances at once Equational theory: di ff er by structural rules Categorical semantics 16
Examples Non-assoc, ordered, linear, a ffi ne, relevant, cartesian, bunched products and implications N-linear variables [Reed,Abel,McBride] Monoidal, lax, non- left adjoints Non-strong, strong, ☐ -strong monads Cohesion 17
Examples Non-assoc, ordered, linear, a ffi ne, relevant, cartesian, bunched products and implications N-linear variables [Reed,Abel,McBride] Monoidal, lax, non- left adjoints Non-strong, strong, ☐ -strong monads Cohesion Logical adequacy: sequent is provable iff its encoding is 17
Closely Related Work 18
Closely Related Work Display logic, Lambek calculus, resource semantics 18
Closely Related Work Display logic, Lambek calculus, resource semantics Adjoint linear logic [Benton&Wadler,95] 18
Closely Related Work Display logic, Lambek calculus, resource semantics Adjoint linear logic [Benton&Wadler,95] linear U F ⊣ cartesian 18
Closely Related Work Display logic, Lambek calculus, resource semantics Adjoint linear logic [Benton&Wadler,95] linear A ::= F C | A ⊗ B | … C ::= U A | C × D | … U F ⊣ cartesian 18
Closely Related Work Display logic, Lambek calculus, resource semantics Adjoint linear logic [Benton&Wadler,95] linear A ::= F C | A ⊗ B | … C ::= U A | C × D | … U F ⊣ !A := FU A cartesian 18
Closely Related Work Display logic, Lambek calculus, resource semantics Adjoint linear logic [Benton&Wadler,95] linear A ::= F C | A ⊗ B | … C ::= U A | C × D | … U F ⊣ !A := FU A cartesian λ -calculus for Resource Separation [Atkey,2004] Adjoint logic [Reed,2009] 18
Technique A substructural/modal typing judgement is an ordinary structural judgement, annotated with a term that describes the tree structure of the context Γ ⊢ α A Sequent Context descriptor ψ ⊢ α : p 19
Sequent Calculus 20
Mode Theory Modes p,q,… Context Descriptors x 1 :p 1 , … , x n :p n ⊢ α : q Structural Properties α ⇒ β 21
Mode Theory Modes p,q,… Context Descriptors x 1 :p 1 , … , x n :p n ⊢ α : q Structural Properties α ⇒ β Types p,q are “modes” of types/contexts 21
Mode Theory Modes p,q,… Context Descriptors x 1 :p 1 , … , x n :p n ⊢ α : q Structural Properties α ⇒ β Types p,q are “modes” of types/contexts Terms α are descriptions of the context 21
Mode Theory Modes p,q,… Context Descriptors x 1 :p 1 , … , x n :p n ⊢ α : q Structural Properties α ⇒ β Types p,q are “modes” of types/contexts Terms α are descriptions of the context “Transformations” α ⇒ β are structural properties 21
Mode Theory cartesian/ Modes p,q,… structural Context Descriptors x 1 :p 1 , … , x n :p n ⊢ α : q Structural Properties α ⇒ β Types p,q are “modes” of types/contexts Terms α are descriptions of the context “Transformations” α ⇒ β are structural properties 21
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations Ordered logic: (a ⊗ b) ⊗ c = a ⊗ (b ⊗ c) 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations Ordered logic: (a ⊗ b) ⊗ c = a ⊗ (b ⊗ c) Linear logic: a ⊗ b = b ⊗ a 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations Ordered logic: (a ⊗ b) ⊗ c = a ⊗ (b ⊗ c) Linear logic: a ⊗ b = b ⊗ a Relevant logic: a ⟹ a ⊗ a 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations Ordered logic: (a ⊗ b) ⊗ c = a ⊗ (b ⊗ c) Linear logic: a ⊗ b = b ⊗ a Relevant logic: a ⟹ a ⊗ a A ffi ne logic: a ⟹ 1 22
a:A,b:B,c:C,d:D ⊢ (a ⊗ b) ⊗ (c ⊗ d) X Non-associative logic: no equations/transformations Ordered logic: (a ⊗ b) ⊗ c = a ⊗ (b ⊗ c) Linear logic: a ⊗ b = b ⊗ a Relevant logic: a ⟹ a ⊗ a A ffi ne logic: a ⟹ 1 BI: two function symbols ✻ and ⋀ : (a ✻ b) ⋀ (c ✻ d) 22
Recommend
More recommend