Kripke-Joyal 8 April 2019

The Kripke-Joyal semantics is the of the syntax of a theory in a where the syntax is the formal specification of a theory of formal , in other words, those enable us to do logic inside a topos. To understand this, we need some background in logic and the classical case the Kripke semantic.

1 Background in logic

We need understand the meaning of the words: theory, model and semantic in a logic. So the first step is define the language of work. The main reference of this section is [6]. Definition 1. A language L is a set of constants, function symbols and relation symbols.

Each function symbol f and relation symbol R have arity n f and mR with n,m natural numbers.

Example 1. • The language of abelian groups is LAbG = {0,+,−}.

• The language of ordered rings is Lor = {0,1,+,−,·,<}. The symbols are: Constans: 0, 1, e Unary function symbols: -, .−1 Binary function symbols: +,·,◦ symbols <, ∈ The languages obtain their meaning only when interpreted in an appropiate structure: Definition 2. Let L be a language. An L-structure U is given by the following data: 1. A nonempty set U called the universe

2. A function f U : Un f → U for each function symbol f .

3. A set RU ⊆ UnR for each relation symbol R.

4. An element cU ⊆ U for each constant symbol.

We refer to f U, RU and cU as the interpretations of the symbols f ,R and c.

Example 2. Let Lg = {·,e} a language with · a binary function symbol and e is a constant symbol. An Lg-structure is the group (R,·,1) and other one is (N, +, 0). It Is not a group, but it is an Lg-structure. Definition 3. An L-term is a word (sequence of symbols) built from constants, function symbols of L and the variables v0,v1... according to the following rules.

1. Every variable vi and every constant symbol c is an L-term.

2. If f is an n-ary function symbol and t1,t2,...,tn are L-terms then f (t1,t2,...,tn) is also an L-term.

Example 3. The LAbG-term (x + y) · (z + w) stands for ·(+(x,y),+(z,w)).

1 A L-formula is a sequences of symbols wich are built from the symbols of L, the parentheses ( and ) as auxiliary symbols and the following logical symbols.

Variables v ,v ,... 0 .1 Equality symbol = symbol ¬ Conjunction symbol ∧ Existential quantifier ∃

Example 4. Let Lor-formulas:

1.v 1 = 0 ∨ v1 > 0, this means v1 ≥ 0.

2. ∃v2 v2 · v2 = v1, this means v1 is a square.

3. ∀v1(v1 = 0 ∨ ∃v2 v2 · v1 = 1), this means every nonzero element has a multiplicative in- verse.

A variable in a formula is said to be free if its first occurrence is not preceded by a quantifier; otherwise, we say that it is bound.

For example v1 is free in (1) and (2) and bounded in (3) of example 4. In case a formula doesn’t have free variables then we will say is a sentence.

We would like to define what it means for a formula to be true in a structure, but this is relative to the structure. For example, for (Z,+,−,·,<,0,1) a Lor structure, the second formula of example 4 would be true for the number 9 but false for 8.

m Definition 4. Let φ be a formula with free variables v1,...vn and let a = (a1,..,am) ∈ U . We inductively define U |= φ(a) as follows:

U U 1. If φ is t1 = t2 then U |= φ(a) if t1 (a) = t2 (a). U U U 2. If φ is R(t1,...tn) then U |= φ(a) if (t1 (a),...,tn (a)) ∈ R .

3. If φ is 6= ψ then U |= φ(a) if U 2 ψ(a) 4. If φ is (ψ ∧ θ) then U |= φ(a) if U |= ψ(a) and U |= θ(a).

5. If φ is (ψ ∨ θ) then U |= φ(a) if U |= ψ(a) or U |= θ(a).

6. If φ is ∃v jψ(v,v j) then U |= φ(a) if there is a b ∈ U such that U |= ψ(a,b).

7. If φ is ∀v jψ(v,v j) then U |= φ(a) if U |= ψ(a,b) for all b ∈ U. If U |= φ(a) we say that φ(a) is true in U.

An L-theory T is simply a set of L-sentences. We say that M is a model of T and write M |= T if M |= φ for all sentences φ ∈ T.

For example, T = {∀xx = 0,∃x 6= 0} is a theory . Because the two sentences in T are contradic- tory, there are no models of T.

2 2 Kripke’s semantics

In 1965 Kripke published a new formal semantics for in wich the sentences are interpreted as subsets of a poset, this section describes a little bit this result. The main ref- erence of this section is [3].

Let P = (P,≤) be a poset (also called a frame in this context). A set A ⊆ P is hereditary in P if it is closed upwards under ≤, this means whenever p ∈ A and p ≤ q then q ∈ A.

+ The collection of hereditary subsets of P will be denoted P .A P-evaluation is a function + V : φ → P , assiging to each πi a hereditary subset V(πi) ⊆ P where φ is a set of formulas in the language of partial order sets. A model based on P is a pair M = (P,V) where V is a P-valuation.

The requirement that V(πi) be hereditary formalises the persistence in time of truth.

Definition 5. The expresion M |=p α is defined inductively as follows:

1. M |=p πi if p ∈ V(πi).

2. M |=p α ∧ β if M |=p α and M |=p β.

3. M |=p α ∨ β if M |=p α or M |=p β.

4. M |=p ¬α if for all q with q ≥ p not M |=q α.

5. M |=p α ⇒ β if for all q with q ≥ p if M |=q α then M |=q β.

The following diagram illustrates the stament 5 of the definition 5.

α β

p q

Example 5. Let P be 2 = ({0,1},≤). Take V with V(π) = {1} then with M = (2,V). One of the great advantanges of the Kripke semantics is that the validity of sentences can be determined by simple conditions on posets.

Example 6. On the poset

• 1 0• • 2 if V(π1) = {1} and V(π2) = {2} then (π1 ⇒ π2) ∨ (π2 ⇒ π1) is not a tautology.

3 3 Internal logic of a category

In section 1, we talked in context of formal logic around the concept of sets, if we change set to categories, we can define an analogue of the notions of language, theory and model. We call this the "internal logic" of a category, this construction we can do it if the category satisfies some conditions, for this case the category has finite limits, the main reference of this section is [4].

The syntactic constructs corresponding to objects and morphisms are called types and terms, respectively. The idea of internal logic is the following. Let C be a category.

• The objects A of C are regarded as collections of things of a given type A.

• The morphisms A → B of C are regarder as terms of type B containing a free variable of type A.

• A subobject φ ,→ A is regarded as a proposition (predicate): by thinking of it as the sub-collection of all those things of type A for which the statement φ is true.

• the logical operations are implemented by universal constructions on subobjects. For example, the conjunctions ∧ and the ∨ are the product (their meet) and coproduct (their join) of subobjects.

In the internal language of the category a term f (x) of type A where x is a free variable of type B (x : B) can be seen as the composition x ◦ f : U → B → A, in symbols is x : B f (x) : A. To define a theory in this context, we need to use the notion of dependent type.

Definition 6. A dependent type over an object A of C may be interpreted as a morphism B → A whose fibers represent the types B(x) for x : A.

A theory is a type theory without dependent types. The first order logic in this context is given to the internal logic of a Heyting category, where a Heyting category is a coherent category in ∗ wich each base change functor f : Sub(Y) → Sub(X) has a right adjoint ∀ f . This statement can be proved using section 1.7 and the explanation of a first-order logic of section B.2 of [2].

4 Subobject classifier

The subobject classifier is one of the most important objects in a topos. In this section we will define one of the special characteristics that it has.

Definition 7. Let C be a category with terminal object 1, then a subobject classifier for C is a un object Ω of C together with a arrow true : 1 → Ω that satifies

For each monomorphism f : X  Y there is one and only one arrow χ f : Y → Ω such that X 1

f true

Ω Y χ f is a pullback square.

4 If we work in a topos, this object always exists. For example, in the category of sets the subob- ject classifier is the set {0,1}. Other of the properties of the subobject classifier in a topos is the set of all subobjects forms a Heyting algebra. The proof of the following theorem can be found in [1] as Proposition 6.2.2.

Theorem 1. Let X be a topos. The subobjects of Ω form a Heyting algebra, under the following connectives

1. The top element is t : 1 → Ω, the true arrow.

2. The bottom element is ⊥ = χ!0 .

0 1

!0 t

1 ⊥ Ω

3. The intersecction is the characteristic morphism ∧ = χ4Ω and the union is the charac- teristic morphism ∨ = χmw where w : W → Ω × Ω with W = (1 × Ω) t (Ω × 1) and mw is monomorphism of the epi-mono factorization of w.

Ω 1 W Xw 1

∆ t w mw t

Ω × Ω ∧ Ω Ω × Ω ∨ Ω

4. The implication is the characteristic morphism of the subobject ≤ Ω × Ω defined as the equaliser

≤ ∧ 1 ≤ e Ω × Ω Ω e t p1

Ω × Ω ⇒ Ω

5 Mitchell Bénabou Language

A direct implication of the fact that subobjects of Ω form a Heyting algebra is the idea of form- ing semantics with the same ideas as used by Kripke for a poset, but first of all, we need a language to build the interpretations, and the Mitchell Bénabou gives that. The main reference for this section is [5].

Let X be a topos. The types of this language are the objects of X.

• Each variable x of type X is a term of type X, its interpretation is the identity x = 1 : X → X.

• Terms σ and τ of types X and Y interpreted by σ : U → X and τ : V → Y, yield a term hσ,τi of type X ×Y with the evident projections p : U ×V → U and q : U ×V → V.

5 • Terms ω and τ of the same type X yield a term σ = τ of type Ω, interpreted by

hσ p, τqi δX (σ = τ) :U ×V X × X Ω

while δX is the characteristic morphism of the diagonal. • A morphism f : X → Y of X and a term σ : U → X of type X together yield a term f ◦ σ of type Y, and the interpretation is the composition.

f ◦ σ : U σ X f Y

• Terms θ : V → Y X and σ : U → X of types Y X and X yield a term θ(σ) of type Y interpreted by

hθ p, τqi e θ(σ) : W Y X × X Y

• Terms σ : U → X and τ : V → ΩX yield a term σ ∈ τ of type Ω, interpreted as

hθ p, τqi e σ ∈ τ : U ×V X × ΩX Ω

• A variable x of type X and a term σ : X ×U → Z yield γ ×σ a term of type ZX , interpreted by the transpose of σ.

The terms of type Ω will also called formulas of the language. The proposition connectives are

hφ p, ψqi ∧ φ ∧ ψ : W Ω × Ω Ω hφ p, ψqi ∨ φ ∨ ψ : W Ω × Ω Ω hφ p, ψqi ⇒ φ ⇒ ψ : W Ω × Ω Ω φ ¬ ¬ φ : W Ω Ω

6 Kripke-Joyal Semantics

Let X be a topos, with the language defined of this category, we can ask, how do the models look inside this structure. The Kripke-Joyal semantics answer that question. The main reference of this section is [5].

For any generalized element α : U → X one defines U φ(α) iff α factors through {x | φ(x)} as in the following diagram

{x | φ(x)} 1 t

U X Ω α φ(x) where φ(α) = φ(x) ◦ α. For example if α,β : U → X are arrows, the formula α = β is by definition interpreted as

6 hα,βi δX U X × X Ω

Thus U α = β iff hα,βi factors through the diagonal map 4. X 1

M t

U X × X Ω hα, βi δX

The following two properties follow easily from the definition.

0 0 Monotonicity If U φ(x) then for any arrow f : U → U in X also U φ(α ◦ f ).

{x | φ(x)} 1 t

U0 U X Ω f α φ(x)

0 0 Local character If f : U → U is epi and U φ(α ◦ f ) then also U φ(α).

{x | φ(x)} 1 t

U0 U X Ω f α φ(x)

Theorem 2. If α : U → X is a generalized element of X while φ(x) and ψ(x) are formulas with a free variables x of type X, then

1.U φ(α) ∧ ψ(α) if U φ(α) and U ψ(α).

2.U φ(α)∨ψ(α) if there are arrows p : V → U and q : W → U such that p+q : V +W → U is epi, while both V φ(α p) and W φ(αq).

3.U φ(α) ⇒ ψ(α) if for any arrow p : V → U such that V φ(α p), also V φ(α p). ∼ 4.U ¬φ(α) if whenever p : V → U is such that V φ(α p) then V = 0.

5.U ∃yφ(x,y) if there exist an epi p : V → U and generalized element β : V → Y such that V φ(α p,β).

{(x,y) | φ(x,y)} 1 t Y V β X × Y Ω p ∃yφ(x,y) U α X

6.U ∀yφ(x,y) if for every object V, for every arrow p : V → U and every generalized element β : V → Y one has V φ(α p,β).

7 7 semantics

Let Sh(C,J) be a topos of sheaves over a site (C,J), we can define the following diagram

y a C P(C) Sh(C,J) ≡ X ı

To formulate the Kripke-Joyal semantics, we will use for a sheaf only the elements α ∈ X(C) where C is a object of C with X(C) = HomX(yC,X).

Since {x|φ(x)} is a subsheaf, it is closed under restrictions, that is, if f : D → C is a morphism of C and α ∈ X(C), then α ∈ {x|φ(x)} implies that α ◦ f ∈ {x|φ(x)}(D) ⊆ X(D), i.e. the mono- tonicity property holds in this case.

Similarly the local character condition, if { fi : Ci → C} is a cover in the topology J such that Ci φ(α ◦ fi) for all i then C φ(α).

The Kripke-Joyal semantics can be restated in the following form.

1. C φ(α) ∧ ψ(α) if C φ(α) and C φ(α).

2. C φ(α) ∨ ψ(α) if there is a covering { fi : Ci → C} such that for each index i, either Ci φ(α) or Ci φ(α).

3. C φ(α) ⇒ ψ(α) if for all f : D → C and D φ(α ◦ f ) implies D ψ(α ◦ f ).

4. C ¬φ(α) if for all f : D → C in C, if D φ(α ◦ f ) then the empty family is a cover of D.

5. C ∃yφ(x,y) if there are a covering { fi : Ci → C} and elements βi ∈ Y(Ci) such that Ci φ(α ◦ fi,βi) for each index i.

6. C ∀yφ(x,y) if for all f : D → C in C and all β ∈ Y(D) one has D φ(α ◦ f ,β). The comparation of the previous construction with the theorem 5 can be found in [5] as Theorem 1 in section 7 of chapter VI.

References

[1] F. Borceux, Handbook of categorical algebra, Vol III, Part of Encyclopedia of Mathemat- ics and its Applications, Universite Catholique de Louvain, Belgium, 1994.

[2] P. Freyd, A. Scedrov, Categories, Allegories, North-Holland, 1990.

[3] R. Goldblat, Topoi: The Categorical Analysis of Logic, North Holland, Amsterdam, 1979.

[4] Internal logic (April, 2019) Retrieved from, https://ncatlab.org/nlab/show/ internal+logic.

[5] S. Mac Lane, I. Moerdijk, Sheaves in Geometry and Logic, A first introduction to topos theory, Springer-Verlag, New York, 1992.

[6] D. Marker, , Springer, New York, 2002.

8