Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

32
Intuitionistic First-Order Logic Categorical semantics via the Curry-Howard isomorphism Marco Benini [email protected] Department of Pure Mathematics University of Leeds 14 th November 2012

description

A novel approach to giving an interpretation of logic inside category theory. This work has been developed as part of my sabbatical Marie Curie fellowship in Leeds. Presented at the Logic Seminar, School of Mathematics, University of Leeds (2012).

Transcript of Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Page 1: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Intuitionistic First-Order Logic

Categorical semantics via the Curry-Howard isomorphism

Marco Benini

[email protected]

Department of Pure MathematicsUniversity of Leeds

14th November 2012

Page 2: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Introduction

An observation: in part D of P. Johnstone’s Sketches of an Elephant, thereis a categorical semantics for the simply typed λ-calculus. In the very sameclass of models, one can give a semantics to the corresponding fragment ofpropositional logic.

The problem:is it possible to do the same for full first-order intuitionistic logic?

2 of 32

Page 3: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Introduction

Johstone’s account comes from Lambek and Scott’s Introduction toHigher-Order Categorical Logic. The considered propositional logic isminimal logic limited to conjunction and implication.

In Taylor, Practical Foundation of Mathematics, one finds that the treatmentof disjunction requires distributive categories in order to follow the samepattern as the previous works.

To my knowledge, no categorical semantics appears in literature whichmodels the full first-order intuitionistic logic AND the correspondingλ-calculus.

3 of 32

Page 4: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

Definition 1 (Lambda signature)A λ-signature Σ= ⟨S,F ,R,Ax⟩ is a structure where

1. ⟨S,F ,R⟩ is a logical signature, i.e.,1.1 a set S of sort symbols;1.2 a set F of function symbols, each one decorated as f : s1 ×·· ·×sn → s0,

with s0, . . . ,sn ∈S;1.3 a set R of relation symbols, each one decorated as r : s1 ×·· ·×sn, with

s1, . . . ,sn ∈S;

2. Ax is the set of axiom symbols, each one decorated as a :A→B whereA,B ∈λTypes(Σ) and FV(A→B)=;.

We call LTerms(Σ) the collection of logical terms constructed from thesignature Σ, assuming to have a denumerable set of variables Vs for eachs ∈S.

4 of 32

Page 5: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

Definition 2 (Lambda type)Fixed a λ-signature Σ, the λ-types on Σ are inductively defined along withtheir free variables as follows:

1. 0,1 ∈λTypes(Σ) and FV(0)= FV(1)=;;

2. if p :s1 ×·· ·×sn ∈R and t1 :s1, . . . , tn :sn ∈ LTerms(Σ), thenp(t1, . . . , tn) ∈λTypes(Σ) and FV(p(t1, . . . , tn))=⋃n

i=1 FV(ti :si);

3. if A,B ∈λTypes(Σ) then A×B,A+B,A→B ∈λTypes(Σ) andFV(A×B)= FV(A+B)= FV(A→B)= FV(A)∪FV(B);

4. if x ∈Vs and A ∈λTypes(Σ) then ∀x :s.A,∃x :s.A ∈λTypes(Σ) andFV(∀x :s.A)= FV(∃x :s.A)= FV(A)\ {x :s}.

5 of 32

Page 6: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

Definition 3 (Lambda term)Fixed a λ-signature Σ= ⟨S,F ,R,Ax⟩, for each type t ∈λTypes(Σ), weassume there is a denumerable set Wt of (typed) variables.A λ-term is inductively defined together with its free variables as:

1. if x ∈Wt then x : t ∈λTerms(Σ) and FV(x : t)= {x : t};

2. if f :A→B ∈Ax and t :A ∈λTerms(Σ) then f (t):B ∈λTerms(Σ) andFV(f (t):B)= FV(t :A);

3. if s :A, t :B ∈λTerms(Σ) then ⟨s, t⟩ :A×B ∈λTerms(Σ) andFV(⟨s, t⟩ :A×B)= FV(s :A)∪FV(t :B);

4. if t :A×B ∈λTypes(Σ) then fst(t):A ∈λTerms(Σ),snd(t):B ∈λTerms(Σ) andFV(fst(t):A)= FV(snd(t):B)= FV(t :A×B); ,→

6 of 32

Page 7: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

,→ (Lambda term)

5. if t :A ∈λTerms(Σ) then inlB(t):A+B ∈λTerms(Σ),inrB(t):B+A ∈λTerms(Σ) andFV(inlB(t):A+B)= FV(inrB(t):B+A)= FV(t :A);

6. if s :A+B, t :A→C, r :B →C ∈λTerms(Σ) thenwhen(s, t , r):C ∈λTerms(Σ) andFV(when(s, t , r):C)= FV(s :A+B)∪FV(t :A→C)∪FV(r :B →C);

7. if x ∈WA and t :B ∈λTerms(Σ) then (λx :A. t):A→B ∈λTerms(Σ) andFV((λx :A. t):A→B)= FV(t :B)\ {x :A};

8. if s :A→B, t :A ∈λTerms(Σ) then s · t :B ∈λTerms(Σ) andFV(s · t :B)= FV(s :A→B)∪FV(t :A);

9. ∗ :1 ∈λTerms(Σ) and FV(∗ :1)=;;

10. FA :0→A ∈λTerms(Σ) and FV(FA :0→A)=;; ,→

7 of 32

Page 8: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus,→ (Lambda term)

11. if x ∈Vs and t :A ∈λTerms(Σ) where x :s 6∈ FV∗(t :A), thenallI(λx :s. t):(∀x :s.A) ∈λTerms(Σ) andFV(allI(λx :s. t):(∀x :s.A))= FV(t :A);

12. if t :(∀x :s.A) ∈λTerms(Σ) and r :s ∈ LTerms(Σ) thenallE(t , r):(A[r/x]) ∈λTerms(Σ) andFV(allE(t , r):(A[r/x]))= FV(t :(∀x :s.A));

13. if x ∈Vs, r :s ∈ LTerms(Σ) and t :(A[r/x]) ∈λTerms(Σ) thenexIx(t):(∃x :s.A) ∈λTerms(Σ) andFV(exIx(t):(∃x :s.A))= FV(t :(A[r/x]));

14. if t :(∃x :s.A),∈λTerms(Σ) and r :A→B ∈λTerms(Σ) wherex :s 6∈ FV∗(r :A→B), then exE(t ,(λx :s. r)):B ∈λTerms(Σ) andFV(exE(t ,(λx :s. r)):B)= FV(t :(∃x :s.A))∪FV(r :A→B).

In the previous definition, x :s ∈ FV∗(t :A) if and only if there isr ∈λTypes(Σ) and y ∈Wr such that x :s ∈ FV(r) and y : r ∈ FV(t :A).

8 of 32

Page 9: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

Definition 4 (Lambda calculus)A derivation is inductively defined by the following inference rules, whoseantecedents and consequents are equalities-in-context within a fixedλ-signature Σ:

(eq0) ~x :~A.s =C t `~y :~B.s[r1/x1, . . . , rn/xn]=C t[r1/x1, . . . , rn/xn] where, forany 1≤ i ≤ n,~y :~B. ri :Ai is a term-in-context;

(eq1)

(~x :~A.s1 =B1 t1)...

(~x :~A.sm =Bm tm)

`~x :~A. r [~s/~y ]=C r [~t/~y ];

(eq2) ` x :A.x =A x ;

(eq3) x :A,y :A.x =A y ` x :A,y :A.y =A x ;

(eq4)(x :A,y :A,z :A.x =A y)(x :A,y :A,z :A.y =A z)

}` x :A,y :A,z :A.x =A z;

,→9 of 32

Page 10: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

,→ (Lambda calculus)

(eq5) ~x :~A.s =C t `~x :~A.(λy :B.s)=B→C (λy :B. t);

(eq6) ~x :~A. r =C t `~x :~A. allI(λy :s. r)=(∀y :s.C) allI(λy :s. t);

(eq7) ~x :~A.u =C v `~x :~A. exE(t ,(λy :s.u))=C exE(t ,(λy :s.v));

(×0) ` x :1.x =1 ∗;

(×1) ` x :A,y :B. fst(⟨x ,y⟩)=A x ;

(×2) ` x :A,y :B. snd(⟨x ,y⟩)=B y ;

(×3) ` z :A×B.⟨fst(z),snd(z)⟩ =A×B z;

(+0) `~x :~A. when(inlB(a), t ,s)=C t ·a;

(+1) `~x :~A. when(inrD(b), t ,s)=C s ·b;

,→

10 of 32

Page 11: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus,→ (Lambda calculus)

(+2) when y :A1 6∈ FV(x1 :A1 +A2)∪FV(x3 :B1 →C)∪FV(x4 :B2 →C) andy :A2 6∈ FV(x2 :A1 +A2)∪FV(x3 :B1 →C)∪FV(x4 :B2 →C)

`x0 :A1 +A2,x1 :A1 → (B1 +B2),x2 :A2 → (B1 +B2),

x3 :B1 →C,x4 :B2 →C.

when(when(x0,x1,x2),x3,x4)=C

=C when(x0,(λy :A1. when(x1 ·y ,x3,x4)),

(λy :A2. when(x2 ·y ,x3,x4))) ;

(+3) ` x :A,y :0. FA ·y =A x ;(→0) `~x :~A.(λy :C.s) · t =B s[t/y ];(→1) `~x :~A.(λy :C. t ·y)=C→B t where y :C 6∈ FV(t :C →B);(∀0) `~x :~A. allE(allI(λz :s. t), r)=B[r/z] t[r/z];

(∀1){~x :~A. allE(u, r)=B allE(v , r)

}r :s∈LTerms(Σ) `~x :~A.u =(∀z :s.B) v ;

,→11 of 32

Page 12: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The λ-calculus

,→ (Lambda calculus)

(∃0) `~x :~A. exE(exIz(t),(λz :s.v))=B (v [r/z]) · t ;(∃1) ~x :~A. exE(u,(λz :s. r))=B exE(u,(λz :s. t))`~x :~A. r =C→B t where

FV(r :C →B)= FV(t :C →B);

(∃2) ` v :(∃y :s.A).w =B exE(v ,(λy :s.(λz :A.w[exIy(z)/v ]))) withz :A 6∈ FV(w :B);

(∃3) `~x :~A.exE(exE(a,(λy :s.(λz :D.b))),(λy :s.c))=C

=C exE(a,(λy :s.(λz :D. exE(b,(λy :s.c)))));

(∃4) `~x :~A. exE(a,(λy :s.(λz :C.b[exIy(z)/w])))=B b[a/w] withz :C 6∈ FV(b :B).

12 of 32

Page 13: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

Definition 5 (Logically distributive category)Fixed a λ-signature Σ= ⟨S,F ,R,Ax⟩, a category C together with a mapM : λTypes(Σ)→ObjC is said to be logically distributive if it satisfies thefollowing seven conditions:

1. C has finite products;

2. C has finite co-products;

3. C has exponentiation;

4. C is distributive, i.e., for every A,B,C ∈ObjC, the arrow∆= [1A× ι1,1A× ι2] : (A×B)+ (A×C)→A× (B+C) has an inverse,where [_,_] is the co-universal arrow of the (A×B)+(A×C) co-product,_×_ is the product arrow, 1A is the identity arrow on A, andι1 : B →B+C, ι2 : C →B+C are the canonical injections of the B+Cco-product.

,→13 of 32

Page 14: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (Logically distributive category)For every s ∈S, A ∈λTypes(Σ), and x ∈Vs, letΣA(x :s): LTerms(Σ)(s)→C be the functor from the discrete categoryLTerms(Σ)(s)= {

t :s | t :s ∈ LTerms(Σ)}

to C defined by t :s 7→M(A[t/x]).

Also, for every s ∈S, A ∈λTypes(Σ), and x ∈Vs, let C(∀x :s.A) be thesubcategory of C whose objects are the vertices of the cones on ΣA(x :s)such that they are of the form MB for some B ∈λTypes(Σ) andx :s 6∈ FV(B). Moreover, the arrows of C(∀x :s.A), apart identities, are thearrows in the category of cones over ΣA(x :s) having the objects ofC(∀x :s.A) as domain and M(∀x :s.A) as co-domain. ,→

14 of 32

Page 15: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (Logically distributive category)Finally, for every s ∈S, A ∈λTypes(Σ), and x ∈Vs, let C(∃x :s.A) be thesubcategory of C whose objects are the vertices of the co-cones onΣA(x :s) such that they are of the form MB for some B ∈λTypes(Σ) andx :s 6∈ FV(B). Moreover, the arrows of C(∃x :s.A), apart identities, are thearrows in the category of co-cones over ΣA(x :s) having the objects ofC(∃x :s.A) as co-domain and M(∃x :s.A) as domain.

5. All the subcategories C(∀x :s.A) have terminal objects, and all thesubcategories C(∃x :s.A) have initial objects;

,→

15 of 32

Page 16: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (Logically distributive category)

6. The M map is such that6.1 M(0)= 0, the initial object of C;6.2 M(1)= 1, the terminal object of C;6.3 M(A×B)=MA×MB, the binary product in C;6.4 M(A+B)=MA+MB, the binary co-prooduct in C;6.5 M(A→B)=MBMA, the exponential object in C;6.6 M(∀x :s.A) is the terminal object in the subcategory C(∀x :s.A);6.7 M(∃x :s.A) is the initial object in the subcategory C(∃x :s.A);

7. For every x ∈Vs, A,B ∈λTypes(Σ) with x :s 6∈ FV(A), MA×M(∃x :s.B)is an object of C(∃x :s.A×B) since, if

(M(∃x :s.B), {δt }t :s∈LTerms(Σ)

)is a

co-cone over ΣB(x :s), and there is one by condition (5), then(MA×M(∃x :s.B), {1MA×δt }t :s∈LTerms(Σ)

)is a co-cone over ΣA×B(x :s).

Thus, there is a unique arrow ! : M(∃x :s.A×B)→MA×M(∃x :s.B) inC(∃x :s.A×B). Our last condition requires that the arrow ! has an inverse.

16 of 32

Page 17: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

Definition 6 (Σ-structure)Given a λ-signature Σ= ⟨S,F ,R,Ax⟩, a Σ-structure is a triple ⟨C,M,MAx⟩such that C together with M forms a logically distributive category and MAx

is a map from Ax such that MAx(a :A→B) ∈HomC(MA,MB).

17 of 32

Page 18: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

Definition 7 (λ-terms semantics)Fixed a Σ-structure ⟨C,M,MAx⟩, let A≡A1 ×·· ·An, and let~x ≡ x1 :A1, . . . ,xn :An be a context. The semantics of a term-in-context~x . t :B, notation J~x . t :BK, is an arrow in HomC(MA,MB) inductively definedas follows:

1. J~x .xi :AiK=πi , the i-th projector of the product MA=MA1 ×·· ·×MAn;

2. if a :C →B ∈Ax then J~x .a(t):BK=MAxa◦ J~x . t :CK;

3. J~x .⟨s, t⟩ :B×CK= (J~x .s :BK,J~x . t :CK) where (_,_) is the universal arrowof the product MB×MC;

4. J~x . fst(t):BK=π1 ◦ J~x . t :B×CK where π1 is the first canonical projectorof the product MA×MB;

5. J~x . snd(t):CK=π2 ◦ J~x . t :B×CK where π2 is the second canonicalprojector of the product MA×MB;

,→18 of 32

Page 19: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (λ-terms semantics)

6. J~x .(λz :C. t):C →BK is the exponential transpose ofJ~x ,z :C. t :BK : MA×MC →MB;

7. J~x .s · t :BK= ev◦(J~x .s :C →BK,J~x . t :CK) where ev is the exponentialevaluation arrow;

8. J~x . inlB(t):C+BK= ι1 ◦J~x . t :CK with ι1 the first canonical injection of theco-product MC+MB;

9. J~x . inrC(t):C+BK= ι2 ◦J~x . t :BK with ι2 the second canonical injection ofthe co-product MC+MB;

,→

19 of 32

Page 20: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (λ-terms semantics)

10. calling [_,_] the co-universal arrow of (MA×MC1)+ (MA×MC2), (_,_)the universal arrow of MA× (MC1 +MC2), and noticing that the arrow∆ : (MA×MC1)+ (MA×MC2)→MA× (MC1 +MC2) has an inversebecause C with M is logically distributive

J~x . when(t ,u,v):BK= [ev◦(J~x .u :C1 →BK×1MC1) ,

ev◦(J~x .v :C2 →BK×1MC2)]◦◦∆−1 ◦ (1MA,J~x . t :C1 +C2K) ;

11. J~x . ∗ :1K=! : MA→ 1, the universal arrow of the terminal object;

12. J~x . FB :0→BK is the exponential transpose of(! : 0→MB)◦ (πn+1 : MA×0→ 0);

,→

20 of 32

Page 21: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (λ-terms semantics)

13. J~x . allI(λz :s. t):(∀z :s.B)K=β◦α whereα≡ 1MAi1

×·· ·×1MAik: MA→MA′ with A′ ≡Ai1 ×·· ·×Aik , where

~x ′ ≡ {xi1 :Ai1 , . . . ,xik :Aik } = FV(t :B), and β : MA′ →M(∀z :s.B) is theuniversal arrow from MA′ to the terminal object in C∀z :s.B ;

14. J~x . allE(t , r):B[r/z]K= pr ◦ J~x . t :(∀z :s.B)K wherepr : M(∀z :s.B)→M(B[r/z]) is the r -th projector of the unique cone onΣB(z :s) whose vertex is M(∀z :s.B).It is worth noticing that pr = Jw :(∀z :s.B). allE(w , r):B[r/z]K;

15. J~x . exIz(t):(∃z :s.B)K= jr ◦ J~x . t :B[r/z]K wherejr : M(B[r/z])→M(∃z :s.B) is the r -th injection of the unique co-coneon ΣB(z :s) whose vertex is M(∃z :s.B).It is worth noticing that jr = Jw :B[r/z]. exIz(w):(∃z :s.B)K;

,→

21 of 32

Page 22: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Semantics

,→ (λ-terms semantics)

16. J~x . exE(t ,(λz :s. r)):BK= γ◦β−1 ◦ (α,J~x . t :(∃z :s.C)K) where16.1 α≡ 1MAi1

×·· ·×1MAik: MA→MA′ with A′ ≡Ai1 ×·· ·×Aik , where

~x ′ ≡ {xi1 :Ai1 , . . . ,xik :Aik } = FV(t :(∃z :s.C))∪FV(r :C →B);16.2 β : M(∃z :s.A′×C)→MA′×M(∃z :s.C) is the co-universal arrow in the

subcategory C∃z :s.A′×C ;16.3 γ : M(∃z :s.A′×C)→MB is the co-universal arrow in C∃z :s.A′×C .

22 of 32

Page 23: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Soundness

Definition 8 (Validity)An equality-in-context~x .s =A t is valid in the λ-theory T , a set ofequalities-in-context, when, in every logically distributive category C, eachmodel M of T is also a model of~x .s =A t .A Σ-structure M in C is a model of a theory T when it is a model of each φin T .Finally, M is a model of an equality-in-context~x . t =A s if J~x . t :AK= J~x .s :AK.

Theorem 9 (Soundness)If an equation-in-context~x .s =A t is derivable from a λ-theory T , then~x .s =A t is valid in each model of T in every logically distributive category.

23 of 32

Page 24: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness

Definition 10 (Syntactical equivalence)Given a λ-theory T , the syntactical equivalence of two terms-in-context isdefined by fixing the generated equivalence classes. Precisely, theequivalence class [x :A. t :B] is defined as the minimal set, composed byterms-in-context, such that

1. x :A. t :B ∈ [x :A. t :B]—reflexivity;

2. if T `~y :~D.s =C r , where~y :~D.s =C r is an equality-in-context, and~y :~D.s :C ∈ [x :A. t :B], then~y :~D. r :C ∈ [x :A. t :B]—closure underprovable equivalence;

,→

24 of 32

Page 25: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness,→ (Syntactical equivalence)

3. if~y :~D.s :C is a term-in-context and, for some 1≤ i <m andz :Di ×Di+1 6∈ FV(s :C)∪{

y1 :D1, . . . ,ym :Dm}, it happens that

y1 :D1, . . . ,yi−1 :Di−1,z :Di ×Di+1,yi+1 :Di+2,

. . . ,ym :Dm.s[fst(z)/yi ][snd(z)/yi+1] :C ∈ [x :A. t :B] ,

then~y :~D.s :C ∈ [x :A. t :B]—closure under associativity in contexts;

4. if~y :~D.s :C is a term-in-context and, for some 1≤ i <m andz :Di+1 ×Di 6∈ FV(s :C)∪{

y1 :D1, . . . ,ym :Dm}, it happens that

y1 :D1, . . . ,yi−1 :Di−1,z :Di+1 ×Di ,yi+1 :Di+2,

. . . ,ym :Dm.s[snd(z)/yi ][fst(z)/yi+1] :C ∈ [x :A. t :B] ,

then~y :~D.s :C ∈ [x :A. t :B]—closure under commutativity in contexts;

,→25 of 32

Page 26: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness

,→ (Syntactical equivalence)

5. if~y :~D.s :C ∈ [x :A.y :B] and z :Di 6∈ FV(s :C)∪{y1 :D1, . . . ,ym :Dm

}for

some 1≤ i ≤m, then

y1 :D1, . . . ,yi−1 :Di−1,z :Di ,yi+1 :Di+1, . . . ,ym :Dm.s[z/yi ] :C

is in [x :A. t :B]—closure under α-renaming in contexts.

26 of 32

Page 27: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness

Definition 11 (Syntactical category)Given a λ-theory T , the syntactical category CT has λTypes(Σ) as objects,where Σ is the λ-signature of T , and the equivalence classes[x :A. t :B] : A→B as arrows.Identities are given by the classes [x :A.x :A] : A→A for each λ-type A,and composition is given by substitution:

[y :B.s :C]◦ [x :A. t :B]= [x :A.s[t/y ] :C] .

Moreover, the map MT : λTypes(Σ)→ObjCT is defined as MT A=A.

27 of 32

Page 28: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness

Proposition 12The CT category is logically distributive.

Proposition 13Given a λ-theory T on the Σ signature, the Σ-structure ⟨CT ,MT ,MAx⟩ onthe corresponding syntactical category is defined by MAx which mapsf : A→B ∈Ax to [x :A. f (x):B].This Σ-structure is a model for T and, moreover, it satisfies exactly thoseequalities-in-context which are provable in T .

28 of 32

Page 29: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Completeness

Proposition 14For every logically distributive category C, there is a biijection betweenequivalence classes, modulo natural equivalences, of structure-preservingfunctors CT →C and equivalence classes, modulo isomorphisms, ofmodels of T in C, induced by the map F 7→ F(MT ).

Theorem 15 (Completeness)If~x .s =A t is an equality-in-context valid in every model for T in eachlogically distributive category, then T `~x .s =A t .

29 of 32

Page 30: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Soundness and Completeness in Logic

Definition 16 (Valid type)A λ-type A is valid in the model N = ⟨N,N,NAx⟩ when there exists anarrow 1→NA in N.

A λ-type A is a logical consequence in the model N of the λ-typesB1, . . . ,Bn when there exists N(B1 ×·· ·×Bn)→NA in N.

A λ-type A is a logical consequence of B1, . . . ,Bn when it is a logicalconsequence of B1, . . . ,Bn in every model in every logically distributivecategory.

30 of 32

Page 31: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

Soundness and Completeness in Logic

Proposition 17A λ-type A is a logical consequence of B1, . . . ,Bn if and only if there exists aterm-in-context x :B1 ×·· ·×Bn. t :A.

Corollary 18A λ-type A is a logical consequence of B1, . . . ,Bn if and only if there is aproof of A from the hypotheses B1, . . . ,Bn, when λ-types are interpreted aslogical formulae and λ-terms as logical proofs, according to theCurry-Howard isomorphism.

31 of 32

Page 32: Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard isomorphism

The end

Questions?

32 of 32