Appendix A Topoi and Logic

In this section, we will explore the tight connection between theory and logic. In particular, to each topos there is associated a language for expressing the internal language of the topos. The converse is also true: given a language one can define a corresponding topos.

A.1 First Order Languages

A language, in its most raw definition, comprises a collection of atomic variables, and a collection of primitive operations called logical connectives, whose role is to combine together such primitive variables transforming them into formulas or sentences. Moreover, in order to reason with a given language, one also requires rules of inference, i.e. rules which allow you to generate other valid sentences from the given ones. The semantics or meaning of the logical connectives, however, is not given by the formulae and sentences themselves, but it is defined through a so called evaluation map, which is a map from the of atomic variables and sentences to a set of truth values. Such a map enables one to determine when a formula is true and, thus, defines its semantics/meaning. In this perspective it turns out that the meaning of the logical connectives is given in terms of some set of objects which represent the truth values. The logic that a given language will exhibit will depend on what the set of truth values is considered to be. In fact, what was said above is a very abstract characterisation of what a language is. To actually use it as a deductive system of reasoning, one needs to define a mathematical context in which to represent this abstract language. In this way the elementary and compound propositions will be represented by certain mathematical objects and the set of truth values will itself be identified with an algebra. For example, in standard classical logic, the mathematical context used is Sets and the algebra of truth values is the Boolean algebra of of a given set.

C. Flori, A First Course in Topos Quantum Theory, Lecture Notes in Physics 868, 397 DOI 10.1007/978-3-642-35713-8, © Springer-Verlag Berlin Heidelberg 2013 398 A Topoi and Logic

However, in a general topos, the internal logic/algebra will not be Boolean but will be a generalisation of it, namely a . In order to get a better understanding of what a language is, we will start with a very simple language called propositional language P(l).

A.2 Propositional Language

The propositional language P(l) contains a set of symbols and a set of formation rules. Symbols of P(l)

(i) An infinite list of symbols α0,α1,α2,...called primitive propositions. (ii) A set of symbols ¬, ∨, ∧, ⇒ which, for now, have no explicit meaning. (iii) Brackets ), (.

Formation Rules (i) Each primitive proposition αi ∈ P(l)is a sentence. (ii) If α is a sentence, then so is ¬α. (iii) If α1 and α2 are sentences, then so are α1 ∧ α2, α1 ∨ α2 and α1 ⇒ α2. Note also that P(l) does not contain the quantifiers ∀ and ∃. This is because it is only a propositional language. To account for quantifiers one has to go to more complicated languages called higher-order languages, which will be described later. The inference rule present in P(l)is the modus ponens (the ‘rule of detachment’) which states that, from αi and αi ⇒ αj , the sentence αj may be derived. Symboli- cally this is written as

αi,αi ⇒ αj . (A.1) αi We will see, later on, what exactly the above expression means. In order to use the language P(l) one needs to represent it in a mathematical context. The choice of such a context will depend on what type of system we want to reason about. For now we will consider a classical system, thus the mathematical context in which to represent the language P(l) will be Sets.InSets, the truth object (object in which the truth values lie) will be the Boolean set {0, 1}, thus the truth values will undergo a Boolean algebra. This, in turn, implies that the logic of the language P(l), as represented in Sets, will be Boolean. The rigorous definition of a representation of the language P(l)is as follows:

Definition A.1 Given a language P(l)and a mathematical context τ , a representa- tion of P(l)in τ is a map π from the set of primitive propositions to elements in the algebra in question: α → π(α). A.2 Propositional Language 399

As we will see, the specification of the algebra will depend on what type of theory we are considering, i.e. classical or quantum. In classical physics, propositions are represented by the Boolean algebra of all (Borel) subsets of the classical state space, thus, given a representation π, we can define the semantics of P(l)as follows:

π(αi ∨ αj ) := π(αi) ∨ π(αj )

π(αi ∧ αj ) := π(αi) ∧ π(αj ) (A.2) π(αi ⇒ αj ) := π(αi) ⇒ π(αj ) π(¬αi) := ¬ π(αi) where, on the left hand side, the symbols {¬, ∧, ∨, ⇒} are elements of the language P(l), while on the right hand side they are the logical connectives in algebra, in which the representation takes place. It is in such an algebra that the logical connec- tives acquire meaning. For the classical case, since the algebra in which a representation lives, is the Boolean algebra of subsets, the logical connectives on the right hand side of (A.2) are defined in terms of set-theoretic operations. In particular, we have the following associations:

π(αi) ∨ π(αj ) := π(αi) ∪ π(αj ) (A.3)

π(αi) ∧ π(αj ) := π(αi) ∩ π(αj ) c ¬ φ(αi) := π(αi) c π(αi) ⇒ π(αj ) := π(αi) ∪ π(αj ). (A.4)

So far, we have seen how logical connectives are represented in the topos Sets. However, it is possible to give a general definition of logical connectives in terms of arrows. Such a definition would then be valid for any topos. To retrieve the logical connectives for the classical case, in which the topos is Sets, we then simply replace, in the definitions that will follow, the general truth object Ω with the set {0, 1}=2. Logical connectives in a general topos τ are defined as follows:

• Negation We will now describe how to represent negation as an arrow in a given topos τ . Let us assume that the τ -arrow representing the value true is :1 → Ω, which is the arrow used in the definition of the sub-object classifier. Given such an arrow, negation is identified with the unique arrow ¬:Ω → Ω, such that the following 400 A Topoi and Logic

diagram is a pullback:

⊥ 1 / Ω

¬

  1 / Ω

Where ⊥ is the topos analogue of the arrow false in Sets,i.e.⊥ is the character of !1 : 0 → 1:

!1 0 / 1

!1 ⊥

  1 / Ω

• Conjunction Conjunction is identified with the following arrow:

∩:Ω × Ω → Ω

which is the character of the product arrow ,  : 1 → Ω × Ω, such that the following diagram is a pullback:

,  1 / Ω × Ω

id1 ∩

  1 / Ω

A.2 Propositional Language 401

where ,  is defined as follows:

/ q8 1 ΩO qqq I1 qq qq pr qqq 1 qq  q , / 1 MM Ω × Ω MMM MMM MM pr2 MMM  I1 M& 1 / Ω

• Disjunction Disjunction is identified with the arrow

∪:Ω × Ω → Ω (A.5)

which is the character of the of the arrow , idΩ , idΩ ,  : Ω + Ω → Ω × Ω (A.6)

such that the following diagram commutes:

[ ,1Ω , 1Ω , ] Ω + Ω / Ω × Ω

!Ω+Ω ∪

 

1 / Ω

• Implication Given two arrows

∩ / Ω × Ω / Ω pr1

their equaliser is some map e : ≤:= x,y|x ≤ y in Ω → Ω × Ω (A.7) ∩◦ = ◦ such that e pr1 e. Implication is then defined as the character of e,i.e.asthemap

⇒: Ω × Ω → Ω (A.8) 402 A Topoi and Logic

such that the following diagram is a pullback:

e ≤ / Ω × Ω

!e ⇒

 

1 / Ω

In order to complete the definition of a propositional language in a general topos τ , we also need to define the valuation functions (which give us the semantics) in terms of arrows in that topos. We recall from the definition of the sub-object classifier that a truth value in a general topos τ is given by a map 1 → Ω (in Sets we have 1 →{0, 1}=2 = Ω). The collection of such arrows τ(1,Ω)represents the collection of all truth values. Thus, a valuation map in a general topos is defined to beamapV :{π(αi)}→τ(1,Ω)such that the following equalities hold: V ¬ π(αi) =¬◦V π(αi) (A.9) V π(αi) ∨ π(αj ) =∨◦ V π(αi) ,V π(αj ) (A.10) V π(αi) ∧ π(αj ) =∧◦ V π(αi) ,V π(αj ) (A.11) V π(αi) ⇒ π(αj ) =⇒◦V π(αi) ,V π(αj ) . (A.12)

A.2.1 Example in Classical Physics

We have stated above that classical physics uses the topos Sets. We now want to rep- resent, in Sets, the propositional language P(l), as defined for a classical system S. So now the elementary propositions will be propositions pertaining the physical sys- tem S. From now on, we will denote a language referred to a particular system S by P (l)(S). Since S is a (classical) physical system, the elementary propositions which P (l)(S) will contain will be of the form A ∈ Δ meaning “ the quantity A which represents some physical observable, has value in a set Δ”. We now define the representation map for this language as follows:

πcl : P (l)(S) → O(S) (A.13) A ∈ Δ → s ∈ S|A(s)˜ ∈ Δ = A˜−1(Δ) where S is the classical state space, O(S) is the Boolean algebra of subsets of S which lives in Sets and A˜ : S → R is the map from the state space to the reals, which identifies the physical quantity A. We now define the truth values for propositions. A.3 The Higher Order Type Language l 403

Normally, such truth values are state-dependent, i.e. they depend on the state with respect to which we are preforming the evaluation. In classical physics, states are simply identified with elements s of the state space S. Thus, for all s ∈ S, we define the truth value of the proposition A˜−1(Δ) as follows: 1iffs ∈ A˜−1(Δ) v(A ∈ Δ; s) = (A.14) 0 otherwise.

Therefore the truth values lie in the Boolean algebra Ω ={0, 1}. It is interesting to note that the application of the propositional language P(l)for quantum theory, fails. This is because in quantum theory propositions are identified with projection operators, thus the representation map will be

πq :{αi}→P(H) (A.15) ˆ A ∈ Δ → πq (A ∈ Δ) := E[A ∈ Δ] where Eˆ[A ∈ Δ] is the projection operator which projects onto the Δ of the spectrum of Aˆ. Now the problem with this construction is that the set of all projection operators undergoes a logic which is not distributive, but the logic of the propositional language is distributive with respect to the logical connectives ∨ and ∧. Therefore, such a representation will not work. To solve this problem we need to introduce a higher order language which we will examine in the next section.

A.3 The Higher Order Type Language l

We will now define a more complex language called higher order type language and denoted by l. Such a language consists of a set of symbols and terms. Symbols

1. A collection of “sorts” or “types”. If T1,T2,...,Tn, n ≥ 1, are type symbols, then so is T1 × T2 ×···×Tn.Ifn = 0 then T1 × T2 ×···×Tn = 1. 2. If T is a type symbol, then1 so is PT. 3. Given any type T there are countable many variables of type T . 4. There is a special symbol ∗. 5. A set of symbols for each pair of type symbols, together with a map which assigns to each function its type. This assignment consists of a finite, non- empty list of types. For example, if we have the pair of type symbols (T1,T2), the associated function symbol will be Fl(T1,T2). An element f ∈ Fl(T1,T2) has type T1,T2. This is indicated by writing f : T1 → T2.

1PT indicates the collection of all subobjects of T . 404 A Topoi and Logic

6. A set of relation symbols Ri together with a map which assigns the type of the arguments of the relation. This consists of a list of types. For example, a relation taking an argument x1 ∈ T1 of type T1 and an argument x2 ∈ T2 of type T2 is denoted as R = R(x1,x2) ⊆ T1 × T2.

Terms 1. The variables of type T are terms of type T , ∀T . 2. The symbol ∗ is a term of type 1. 3. A term of type Ω is called a formula. If the formula has no free variables, then we call it a sentence. 4. Given a function symbol f : T1 → T2 and a term t of type T1, then f(t) is a term of type T2. 5. Given t1,t2,...,tn which are terms of type T1,T2,...,Tn, respectively, then t1,t2,...,tn is a term of type T1 × T2 ×···×Tn. 6. If x is a term of type T1 × T2 ×···×Tn, then for 1 ≤ i ≤ n, xi is a term of type Ti . 7. If ω is a term of type Ω and α is a variable of type T , then {α|ω} is a term of type PT. 8. If x1,x2 are terms of the same type, then x1 = x2 is a term of type Ω. 9. If x1,x2 are terms of type T and PT respectively, then x1 ∈ x2 is a term of type Ω. 10. If x1,x2 are terms of type PT and PPT respectively, then x1 ∈ x2 is a term of type Ω. 11. If x1,x2 are both terms of type PT, then x1 ⊆ x2 is a term of type Ω. The entire set of formulas in the language l are defined, recursively, through re- peated applications of formation rules, which are the analogues of the standard log- ical connectives. In particular, we have atomic formulas and composite formulas. The former are: 1. The set of relation symbols. 2. terms defined above. 3. Truth is an atomic formula with no free variables. 4. False ⊥ is an atomic formula with no of free variables. We can now build more complicated formulas through the use of the logical con- nectives ∨, ∧, ⇒ and ¬. These are the composite formulas: 1. Given two formulas α and β, then α ∨ β is a formula for which, the set of free variables is defined to be the union of the free variables in α and β. 2. Given two formulas α and β, then α ∧ β is a formula for which, the set of free variables is defined to be the union of the free variables in α and β. 3. Given a formula α its negation ¬α is still a formula with the same number of free variables. 4. Given two formulas α and β, then α ⇒ β is a formula with free variables given by the union of the free variables in α and β. A.4 Representation of l in a Topos 405

It is interesting to note that the logical operations just defined can actually be ex- pressed in terms of the primitive symbols as follows: 1. :=(∗=∗). 2. α ∧ β := ( α, β= , ) = ∗=∗, ∗=∗. 3. α ⇔ β := (α = β). 4. α ⇒ β := ((α ∧ β) ⇔ α) := ( α, β= ,  = α). 5. ∀xα := ({x : α}={x : }).2 6. ⊥:= ∀ww = ({w : w}={w : }). 7. ¬α := α ⇒⊥. 8. α ∨ β := ∀w[(α ⇒ w ∧ β ⇒ w) ⇒ w]. 9. ∃xα := ∀w[∀x(α ⇒ w) ⇒ w].3

A.4 Representation of l in a Topos

We now want to show how a representation of the first order language l takes place in a topos. The main idea is that of identifying each of the terms in l an arrow in a topos. In particular we have:

Definition A.2 Given a topos τ the interpretation/representation (M) of the lan- guage l in τ consists of the following associations:

1. To each type T ∈ l an object T τM ∈ τ . ⊆ × ×···× τM ⊆ τM × 2. To each relation symbol R T1 T2 Tn a sub-object R T1 τM ×···× τM T2 Tn . : × ×···× → τM : τM × 3. To each function symbol f T1 T2 Tn X a τ -arrow f T1 τM ×···× τM → T2 Tn X. 4. To each constant c of type T a τ -arrow cτM : 1τM → T τM . 5. To each variabe x of type T a τ -arrow xτM : T τM → T τM . 6. The symbol Ω is represented by the sub-object classifier ΩτM . 7. The symbol 1 is represented by the terminal object 1τM .

Now that we understand how the basic symbols of the abstract language l are represented in a topos, we can proceed to understand also how the various terms and formulas are represented. Needless to say, these are all defined in a recursive manner. Given a term t(x1,x2,...,xn) of type Y with free variables xi of type Ti ,i.e. t(x1,x2,...,xn) : T1 ×···×Tn → Y , then the representative in a topos of this term

2∀xα means:“ for all x with the property α”, while {x : y} indicates the set of all x, such that y 3∃xα means:“ there exists an x with the property α”. 406 A Topoi and Logic would be a τ -map

: τM ×···× τM → τM t(x1,x2,...,xn) T1 Tn Y . (A.16)

Formulas in the language are interpreted as terms of type Ω. In the topos τ this type Ω is identified with the sub-object classifier ΩτM . In particular, a term of type Ω of the form φ(t1,t2,...,tn) with free variables ti of type Ti is represented by an arrow

τM : τM ×···× τM → τM φ(t1,t2,...,tn) T1 Tn Ω .

On the other hand, a term φ of type Ω with no free variables is represented by a global element φ : 1τM → ΩτM . As we will see, these arrows will represent the truth values. The reason why, in a topos, formulas are identified with arrows with Ω rests on the fact that sub-objects, of a given object in a topos, are in bijective cor- respondence with maps from that object to the sub-object classifier. In fact, by con- struction, formulas single out sub-objects of a given object X in terms of a particular relation which they satisfy, i.e. they define elements of Sub(X). Such sub-objects are in bijective correspondence with maps X → Ω . In particular, given a formula φ(x1,...,xn) with free variables xi of type Ti , { | }⊆ which in the language l is associated with the subset xi φ i Ti , we obtain the topos representation τ | M ⊆ τM ×···× τM (x1,...,xn) φ T1 Tn (A.17) which, through the Omega Axiom (see Axion 8.4), gets identified with the map

χ τ τ {(x ,...,xn)|φ} M | M → τM ×···× τM −−−−−−−−−1 → τM (x1,...,xn) φ T1 Tn Ω . (A.18) To understand how formulas are represented in a topos τ , let us consider the formula  stating that two terms are the same, i.e. t(x1,x2,...,xn) = t (x1,x2,...,xn).The representation of such a formula in a topos τ is identified with the equalizer of  the two τ -arrows representing the terms t(x1,x2,...,xn) and t (x1,x2,...,xn).In particular, we have

tτM  τ / | = M / / τM ×···× τM / τM x1,x2,...,xn t t T1 Tn Y  t τM

Instead, if we consider a relation R(t1,...,tn) of terms ti of type Yi with variables xj of type Tj , then the formula pertaining this relation {(x1 ...xn)|R(t1,...,tn)} is rep- τM ⊆ τM ×···× τM resented, in τ , by pulling back the sub-object R Y1 Yn (representing τM τM : τM ×···× τM → the relation R(t1,...,tn)) along the term arrow t1 ,...,tn T1 Tn A.4 Representation of l in a Topos 407

τM ×···× τM Y1 Yn :

τ / τ {(x1,x2,...,xn)|R(t1,...,tn)} M R M

 τM τM   t1 ,...,tn τM ×···× τM / τM ×···× τM T1 Tn Y1 Yn

The atomic formulas meaning truth and false ( and ⊥, respectively) will be rep- resented in a topos τ by the greatest and lowest elements of the Heyting algebra of the sub-objects of any object in the topos. For example we have that

{ | }τM = τM × τM ×···× τM x1 ...xn T1 T2 Tn (A.19) τM τM {x1 ...xn|⊥} =∅ . (A.20) So far we have established how to represent formulas in a topos. Next, we will explain how to represent logical connectives between formulas in a topos. In par- ticular, given a collection of formulas represented as sub-objects of the type object i Ti , the logical connectives between these are represented by the corresponding τM operations in the Heyting algebra of sub-objects of the object i Ti in τ