<<

The ∞- generated by an arbitrary topological λ-model

Daniel O. Mart´ınez-Rivillas,Ruy J.G.B. de Queiroz

January 19, 2021

Abstract The lambda calculus is a universal programming language. It can represent the computable functions, and such offers a formal coun- terpart to the point of view of functions as rules. Terms represent functions and this allows for the application of a term/function to any other term/function, including itself. The calculus can be seen as a formal theory with certain pre-established axioms and inference rules, which can be interpreted by models. Dana Scott proposed the first non-trivial model of the extensional lambda calculus, known as D∞, to represent the λ-terms as the typical functions of theory, where it is not allowed to apply a function to itself. Here we propose a con- struction of an ∞-groupoid from any lambda model endowed with a . We apply this construction for the particular case D∞, and we see that the Scott topology does not provide enough information about the relationship between higher . This motivates a new line of research focused on the exploration of λ-models with the structure of a non-trivial ∞-groupoid to generalize the proofs of term conversion (e.g., β-equality, η-equality) to higher-proofs in λ-calculus. Keywords: Lambda calculus, Lambda model, Infinity groupoid, Ho- motopy, Scott topology. arXiv:1906.05729v3 [cs.LO] 17 Jan 2021 1 Introduction

The lambda calculus is a programming language in which functions are seen as rules instead of sets. Since the origins of , lambda calcu- lus has been widely used as a formal counterpart to the notion of algorithm. Since it constitutes the essence of languages, for ex- ample, the ML family, such as CALM and SML, it is also of great interest

1 the study of lambda calculus from the point of view of types, not least be- cause the discipline of typing allows the detection of errors without the need to execute a given program. There are extensions of typed lambda calcu- lus such as Martin-L¨of’s (MLTT), also known as Intuitionistic Type Theory, where unlike lambda calculus allows for dependent types such as the identity type IA(a, b), with A being a type, and a and b being terms of type A.

Under the so-called Curry–Howard isomorphism, the type IA(a, b) corre- sponds to the proposition which says that a is equal to b in the type A, and its terms (if these exist) would be proofs of this equality. If there is a proof p of IA(a, b), this does not imply that a ≡ b, (extensionally equal, i.e., the reflexivity term ref(a) is an inhabitant of IA(a, b)), since it can happen that a and b are extensionally equal, but not necessarily intensionally equal. In the other direction, if a ≡ b then this implies that there is a proof of equality of IA(a, b), e.g., the proofs ref(a) and ref(b). Thus, IA(a, b) is a weaker type of equality than extensional equality, but it can gather more informa- tion regarding the multiple proofs of equality. The type IA(a, b) is known as a propositional equality.

Furthermore, given two proofs of equality p and q in IA(a, b), we can consider the type IIA(a,b)(p, q) as the type of terms representing proofs that p is equal to q, and thus continue iterating indefinitely to obtain an infinite sequence of higher identity types, which carries an algebraic structure known as ∞-groupoid. In Type Theory (HoTT), the types of MLTT are interpreted as topological spaces, and proofs of identity p of IA(a, b) are seen as con- tinuous paths from a to b. The proofs h of identity proofs in IIA(a,b)(p, q) are interpreted as homotopies h from p to q, and so on, the fundamental ∞-groupoid Π∞A(a, b) is obtained this way. Since MLTT is a formalization of , one is allowed to suspect that it can also carry an algebraic ∞-groupoid structure. If the types are interpreted, not as sets, but as topological spaces, one has a rich mathematical structure to model complex phenomena such as computations. Our motivation is to study type-free lambda calculus from a model that allows us to see the ∞-groupoid structure. The system of MLTT with identity types (Martin-L¨of,1975), was devel- oped originally to give a formalization of constructive mathematics in which there would be formal counterparts to proofs of identity statements. By studying the relationship between two proofs of a proposition, the relation of two higher-proofs of a proposition on proofs, and so on, one could have the

2 formal counterpart to such a hierarchical structure of globular sets. Later (Hofmann; Streicher, 1994) comes up with the idea of using higher-order cat- egories for the interpretation of MLTT, and later on (Awodey; Warren, 2009) manages to establish the connection between MLTT and , in the sense of which types of identity can be interpreted as an equivalence of homotopies. This led (Voevodsky, 2010) to formulate the Univalence Ax- iom, which gives rise to (HoTT) (Program, 2013), where MLTT has a structure of ∞-groupoid (Berg; Garner, 2011). Also, Voevodsky proved that HoTT has a model in the of Kan complexes (∞-) (Kapulkin; Lumsdaine; Voevodsky, 2012) for Univalence Ax- iom and (Lumsdaine; Shulman, 2020) for higher inductive types. Since MLTT is an extension of simply-typed λ-calculus, it can also be seen, as an ∞-groupoid in this topological interpretation given by (Scott, 1993). Also, for type-free λ-calculus, Dana Scott presented the model D∞ to gives an interpretation to λ-terms into the theory of ordered sets. This model is semantically rich in the sense that it is an ordered set with a topology. It allows for generating a λ-model D∞, with a structure of an ∞-groupoid, and an operation of composition between cells. In this work, we build an ∞-groupoid D from a D through higher groups of homotopy (Greenberg, 1967; Hatcher, 2001). We show how to calculate all higher groups generated by any .p.o., with the Scott topology (Acosta; Rubio, 2002). We apply the construction of Section 3 for the particular case of the c.p.o. D∞ to obtain an ∞-groupoid D∞, and prove that this is isomorphic to D∞, which shows that D∞ is indeed an exten- sional λ-model. Unfortunately, the ∞-groupoid associated with D∞ and D∞ turns out to be trivial. So in Section 5, we explain with geometric intuition the purpose of the search for higher non-trivial λ-models, which we called homotopic λ-models, and which are studied in more detail by (Mart´ınez;de Queiroz, 2020) in light of simplicial sets and Kan complexes (Goerss; Jardine, 2009).

2 Preliminaries

In this section we present some basic notions about ∞-groupoids, topolog- ical spaces, continuity, higher fundamental groups and extensional lambda models, to set up the groundwork for this paper. All the proofs of results can be found in the suggested references.

3 2.1 Identity types in HoTT The Homotopy Types Theory (HoTT) corresponds to the axioms and rules of the intensional version of Intuitionistic Type Theory (ITT) plus the uni- valence axiom and higher inductive types. It was created to give a new foundation of mathematics and facilitate the translation of mathematical proofs into computer programs. In this way, it allows computers to verify mathematical proofs with high deductive complexity. HoTT facilitates the understanding of ITT by allowing for an interpre- tation based on the geometric intuition of . For example, a type A is interpreted as the topological space, a term a : A as the point a ∈ A, a dependent type x : A ` B(x) as the fibration B → A, the identity I type IA as the space A , a term p : IA(a, b) as the path p : a → b, the term α : IIA(a,b)(p, q) as the homotopy α : p ⇒ q and so on. Among the dependent types arise the identity types, which were induc- tively defined by Martin-L¨ofanalogously to the inductive definition of natural numbers, according to the axioms.

A1. If A is a type, and a and b are terms that inhabit it, writing a, b : A, there is an identity type denoted by IA(a, b) (or a =A b),

A2. if A is a type and a : A, there is a term ref(a): a =A a (reflexivity), A3. if A is a type, a : A and P (b, e) is a family of types depending on parameters b : A and e : IA(a, b). In order to define any term f(b, e): P (b, e), it suffices to provide a term p : P (a, ref(a)). The resulting term f may be regarded as having been completely defined by the single definition f(a, ref(a)) := p.

Here the axiom A3 is analogous to induction axiom of natural numbers and by its way the properties

1. given the type a =A b, there is the no- b =A a (symmetry),

2. let the types a =A b and b =A c, there is the no-void type a =A c (transitivity), can be proved by induction, see (Martin-L¨of;1973) and (Grayson; 2018).

In HoTT, the property 1 is proved simply by inverting any path p : a =A b, −1 i.e., p : b =A a. The property 2 can be proved by concatenating any paths p : a =A b and q : b =A c, this is, p ∗ q : a =A c. The term ref(a) from axiom A2, is interpreted as the constant path on the point a, denoted by c(a) or

4 also writing as 1a. The axiom A3 can be seen as, given a path e : a =A b and a proof of any property P (a), this proof can be transported by way of the path e to give a proof of the property P (b). For more information on HoTT see (Program, 2013).

2.2 Strict ∞-groupoids In the literature we can find two types of ∞-groupoids: strict and weak ∞-groupoids (Leinster, 2003). For this paper we shall only work with the former. It is well known that every strict ∞-groupoid is weak. It is usual to call a weak ∞-groupoid just ∞-groupoid.

Definition 2.1 (∞-globular set). An ∞-globular set D is a diagram

s s s s s ··· ⇒t Dn ⇒t Dn−1 ⇒t ··· ⇒t D1 ⇒t D0, of sets and functions such that

s(s(d)) = s(t(d)), t(s(d)) = t(t(d)), for all n ≥ 2 and d ∈ Dn.

Definition 2.2. Let D be a globular set and n ∈ N. For each 0 ≤ p < n define the relation into Dn × Dn as the set

0 n−p n−p 0 Dn ×Dp Dn = {(d , d) ∈ Dn × Dn : t (d) = s (d )}.

Definition 2.3 (strict ∞-groupoid). Let n be a such that n > 0. A strict ∞-groupoid is an ∞-globular set D equipped with

0 • a function ◦p : Dn ×Dp Dn → Dn for each 0 ≤ p < n, where ◦p(d , d) := d0 ◦ d and call it a composite of d0 and d,

• a function i : Dn → Dn+1 for each n ≥ 0, where i(d) := 1d and call it the identity on d, satisfying the following axioms:

0 a. (sources and targets of composites) if 0 ≤ p < n and (d , d) ∈ Dn×Dp Dn then

0 0 0 s(d ◦p d) = s(d) and t(d ◦p d) = t(d ) if p = n − 1, 0 0 0 0 s(d ◦p d) = s(d ) ◦p s(d) and t(d ◦ d) = t(d ) ◦p t(d) if p ≤ n − 2,

5 b. (sources and targets of identities) if 0 ≤ p < n and d ∈ Dn then s(1d) = d = t(1d),

0 00 00 0 0 c. (associativity) if 0 ≤ p < n and d, d , d ∈ Dn with (d , d ), (d , d) ∈

Dn ×Dp Dn then 00 0 00 0 (d ◦p d ) ◦p d = d ◦p (d ◦p d),

d. (identities) if 0 ≤ p < n and d ∈ Dn then

n−p n−p n−p n−p i (t (d)) ◦p d = d = d ◦p i (s (d)),

0 0 e. (binary interchange) if 0 ≤ q < p < n and d, d , e, e ∈ Dn ×Dq Dn with 0 0 0 0 (e , e), (d , d) ∈ Dn ×Dp Dn, (e , d ), (e, d) ∈ Dn ×Dq Dn, then 0 0 0 0 (e ◦p e) ◦q (d ◦p d) = (e ◦q d ) ◦p (e ◦q d),

0 f. (nullary interchange) if 0 ≤ q < p < n and d, d ∈ Dp ×Dq Dp, then 0 0 1d ◦q 1d = 1d ◦qd. ¯ ¯ g. (inverse) if 0 ≤ p < n and d ∈ Dn then exist d ∈ Dn with s(d) = t(d), t(d¯) = s(d) such that ¯ n−p n−p ¯ n−p n−p d ◦p d = i (s (d)), d ◦p d = i (t (d)).

If d ∈ Dn, we say that d is an n-cell or an n-isomorphism from some a ∈ Dn−1 to some b ∈ Dn−1. In this case a = s(d) and b = t(d). Or, in other words, we say that a and b are n-equivalent if there is an n-isomorphism between a and b.

For example, in the fundamental ∞-groupoid Π∞(D), where D is a topo- logical space and Dn = Πn(D), the n-isomorphisms are the n-paths class [p] in Πn(D). Even though the n-path p : a b may not satisfy the properties of a strict ∞-groupoid, the n-paths class [p] does satisfy them. Thus Π∞(D) is not a strict ∞-groupoid, but it is a weak ∞-groupoid. This subject will be addressed in more details in Section 4.

Notation 2.1. Write (a 'n b) for the set of all n-isomorphisms between a and b. Note that this set can be empty.

Since 'n is an equivalence relation and the set (a 'n b) can have car- dinality greater than one, we can see 'n as an intensional equality =n, i.e., the equivalence a 'n b can be seen as the intensional equality a =h b, which motivates a more precise definition of intensional equality between n-cells.

6 Definition 2.4 (Extensional and intensional equality). Two n- a and b are intentionally equal, a =h b, if there is d :(a 'n b). Two n- morphisms a and b are extensionally equal, a = b, if the identity n- 1a :(a 'n b).

Note that if a = b then a =h b, since 1a :(a 'n b). The converse does not always hold. For example, for the fundamental groupoid Π1{0, 1}, where {0, 1} has the topology {{0, 1}, ∅}, we have that 0 =h 1, but 0 6= 1.

2.3 Higher groups of homotopy

Next we define closed n-paths on d0 ∈ D, with the purpose of building the fundamental n- πn(D, d0). For more details, see (Greenberg, 1967), (Hatcher, 2001) and (May, 1999).

Definition 2.5 (Border of a set). Let D be a topological space. Define the border of a set X ⊆ D, denoted by ∂X, as the set of points x ∈ D such that for each neighborhood V of x, V ∩ X 6= ∅ and V ∩ (D − X) 6= ∅.

Definition 2.6 (Closed n-path). Let D be a topological space. A closed n- n path on d0 ∈ D is a continuous map σ : [0, 1] → D which sends border of n [0, 1] to d0. It defines the product of closed n-paths, α ∗ β = γ, as the closed n-path

( 1 α(2t1, t2 . . . , tn) if 0 ≤ t1 ≤ 2 , γ(t1, . . . , tn) = 1 β(2t1 − 1, t2 . . . , tn) if 2 ≤ t1 ≤ 1. This product is known in the literature as concatenation operator between the n-paths α and β.

Definition 2.7 (Homotopic n-paths). Two n-paths α, β are homotopic in n d0, α ' β, if there exists a continuous map H : [0, 1] × [0, 1] → D, such that

n a. H(0; t1, . . . , tn) = α(t1, . . . , tn), for (t1, . . . , tn) ∈ [0, 1] ,

n b. H(1; t1, . . . , tn) = β(t1, . . . , tn), for (t1, . . . , tn) ∈ [0, 1] ,

n c. H(s; t1, . . . , tn) = d0, for each s ∈ [0, 1] and each (t1, . . . , tn) ∈ ∂([0, 1] ). This homotopy is an equivalence relation, and one writes [σ] for the class of homotopic n-paths to the n-path σ. The set of all homotopy classes is denoted by πn(D, d0), where the product between classes is defined in the natural way [α] ∗ [β] := [α ∗ β].

7 While in Definition 2.6 of closed n-path p based in a point a ∈ D, the image of the [0, 1]n border fell on a, p(∂([0, 1]n)) = {a}, for n-paths the image of the lower border falls at some point a ∈ D, i.e., p(t1, . . . , tn−1, 0) = a, and the upper image falls at some point b ∈ D, i.e., p(t1, . . . , tn−1, 1) = b.

Theorem 2.1. πn(D, d0) is a group, called the of D on d0 of dimension n.

The identity element of the group πn(D, d0) is the homotopy class of n n n the constant n-path c (d0) : [0, 1] → D, i.e., c (d0)(t1, . . . , tn) = d0 for all t1, . . . , tn in [0, 1]. Definition 2.8 (Homotopic functions). Let D be a topological space. Two continuous functions f, g : D → D are homotopic, f ' g, if there exists a continuous map H : D × [0, 1] → D such that H(d, 0) = f(d) and H(d, 1) = g(d) for all d ∈ D. H is called a homotopy between continuous functions.

Definition 2.9 (Contractible space). A topological space D is said to be contractible if there exists a constant function fc : D → D, fc(d) = c for each d ∈ D, homotopic to the identity function ID : D → D. The homotopy H : fc ' Id is called a contraction.

n Theorem 2.2. If D is contractible, then πn(D, d0) = {[c (d0)]} for each n ≥ 0.

Remark 2.1. Let D contractible. For each t1, . . . , tn ∈ [0, 1] we have

n c (d0)(t1, t2, . . . , tn) = en(t1)(t2) ··· (tn) = d0, where en : [0, 1] → Πn−1(D, d0) is the constant path in en−1 defined by recur- sion

e0 = d0,

en = cen−1 , ∼ then πn(D, d) = {en} (group isomorphisms).

2.4 The λ-model Scott’s D∞ Next we present a brief introduction to the theories and extensional lambda models. For the proofs of the theorems, one is referred to (Hyndley; Seldin, 2008).

8 Definition 2.10 (Directed set). Let (D, v) be a partial ordering. A non- empty subset X ⊂ D is said to be directed if for all a, b ∈ X, there exists c ∈ X such that a v c and b v c. Definition 2.11 (Complete partial orders, c.p.o.’s). A c.p.o. is a partially ordered set (D, v) such that a. D has a least element (denoted ⊥),

b. every directed subset X ⊂ D has least upper bound, l.u.b., (denoted F X). The pair (D, v) will be denoted D.

Definition 2.12 (The set N+). Choose any object ⊥∈/ N, and define N+ = N ∪ {⊥}. For all a, b ∈ N+, define

a v b ⇐⇒ (a =⊥ and b ∈ N) or a = b.

Clearly N+ is a c.p.o., since every directed subset is finite so has l.u.b. and ⊥ is the least element as seen in Figure 1.

0 1 2 3 ···

Figure 1: The c.p.o. N+

Every c.p.o. has a topology called the Scott topology, which we define below. Definition 2.13 (Final and inaccessible set). Let D a c.p.o. and A ⊆ D. The set A is final if it satisfies

a ∈ A and a v b =⇒ b ∈ A, and A is inaccessible by directedness if for every directed subset X of D, G X ∈ A =⇒ X ∩ A 6= ∅.

Definition 2.14 (Scott topology). Let D be a c.p.o. The Scott topology is defined as follows σ = {A ⊆ D : A is final and inaccessible by directedness} ∪ {∅}.

9 Definition 2.15 (Continuous function). Let D and D0 be c.p.o.’s. A func- tion f : D → D0 is continuous if for each directed subset X ⊂ D, f(F X) = F f(X). Definition 2.16. For c.p.o.’s D and D0, define [D → D0] to be set of all continuous functions from D to D0 in Scott’s topology. For φ, ψ ∈ [D → D0], define φ v ψ ⇐⇒ (∀d ∈ D)(φ(d) v0 ψ(d)). Remark 2.2. There is a result which says that if D and D0 are c.p.o.’s, then [D → D0] is a c.p.o. (see proof in (Hindley; Seldin, 2008)). It would allow from a c.p.o. initially generate inductively an infinite sequence of c.p.o.’s as below in the Definition 2.19. Definition 2.17 (Projections). Let D and D0 be c.p.o.’s. A projection from D0 to D is a pair hφ, ψi of functions, where φ ∈ [D → D0] and ψ ∈ [D0 → D], such that ψ ◦ φ = ID, φ ◦ ψ v ID0 .

Definition 2.18 (Projection from Dn+1 to Dn). For every n ≥ 0 define the projection hφn, ψni from Dn+1 to Dn by the recursion

φ0(d) := λa ∈ D0.d, ψ0(g) := g(⊥0),

φn+1(d) := φn ◦ d ◦ ψn, ψn+1(g) := ψn ◦ g ◦ φn, where λa ∈ D0.d ∈ [D0 → D0] is the constant function to d ∈ D0.

Definition 2.19 (The sequence D0,D1,D2,...). For each n ≥ 0, define Dn by recursion + D0 := N , Dn+1 := [Dn → Dn].

The v-relation on Dn will be denoted just ‘ v’. The least element of Dn will be denoted ⊥n.

By Remark 2.2, every Dn is a c.p.o.

Definition 2.20 (Construction of D∞). We define the c.p.o. D∞ to be the set of all infinite sequences

d = hd0, d1, d2,...i , such that dn ∈ Dn and ψn(dn+1) = dn, for all n ≥ 0, where ψn is part of projection hφn, ψni from Dn+1 to Dn (Hindley; Seldin, 2008).

A relation v on D∞ is defined by 0 0 d v d ⇐⇒ (∀n ≥ 0)(dn v dn).

10 In (Barendregt, 1984) one has a way to prove that D∞ is a λ-model through the result: If D is a c.p.o. for which there exists a projection hF,Gi from [D → D] to D such that G ◦ F = I[D→D], then the triple hD, •, i defined for every assignment ρ : V ar → D by JK

(a) a • b := F (a)(b) for each a, b ∈ D,

(b) x ρ := ρ(x), J K (c) PQ ρ := P ρ • Q ρ, J K J K J K

(d) λx.P ρ := G(λd ∈ D. P [d/x]ρ ), J K J K −1 ∼ is a λ-model. Also if G ◦ F = ID, i.e., G = F and D = [D → D], then hD, •, i is an extensional λ-model. JK ∼ So in the particular case of D∞, it holds that D∞ = [D∞ → D∞] where the isomorphism between c.p.o.’s F : D∞ → [D∞ → D∞] is given for each a ∈ D∞ by F (a) = λb ∈ D∞.a • b, −1 whose inverse F :[D∞ → D∞] → D∞ corresponds to

−1 G F = λf ∈ [D∞ → D∞]. φn,∞(λa ∈ Dn.(φ∞,n ◦ f ◦ φn,∞)(a)). n≥0

Therefore hD∞, •, i is an extensional λ-model. JK 3 The ∞-groupoid D generated by an arbi- trary topological space D

Next we show the construction of the ∞-groupoid from any topological space, through the use of higher fundamental groups. Definition 3.1. Let D a topological space. Define the ∞-globular set D as the diagram

s s s s s ··· ⇒t Dn ⇒t Dn−1 ⇒t ··· ⇒t D1 ⇒t D0, as follows Dn := {πn(D, d): d ∈ D}, where π0(D, d) := d, πn(D, d) is the fundamental group of dimension n ≥ 0 and s(πn+1(D, d)) = t(πn+1(D, d)) := πn(D, d).

11 Remark 3.1. Clearly D is an ∞-globular set, since s = t, i.e., every mor- phism is an automorphism, then s ◦ s = s ◦ t and t ◦ t = t ◦ s, see Figure 2.

Figure 2: ∞-Globular set D.

Remark 3.2. For each n ∈ N, the following holds:

0 0 πn(D, d) = πn(D, d ) ⇐⇒ d = d .

∼ 0 By the hypothesis that D is connected by paths, and thus πn(D, d) = πn(D, d ) (isomorphic groups), it does not imply that they are equal.

Notation 3.1. For each n ∈ N and d0 ∈ D, write

Dn+1(d0) := {d ∈ Dn+1 : s(d) = t(d) = πn(D, d0)}.

Proposition 3.1. For each n ∈ N, the following holds

Dn+1(d0) = {πn+1(D, d0)}.

Proof. Let d ∈ Dn+1(d0), then there is d ∈ D such that d = πn+1(D, d). By Definition 3.1 s(d) = t(d) = πn(D, d). Since d ∈ Dn+1(d0), then πn(D, d) = πn(D, d0), so d = d0 by Remark 3.2, thus d = πn+1(D, d0). Definition 3.2 (Diagonal). Let D be a set. Define the diagonal on D × D as Diag(D × D) := {(d, d0) ∈ D × D : d = d0}

12 Lemma 3.1. For any natural number n ≥ 1 and for each 0 ≤ p < n,

Dn ×Dp Dn = Diag(Dn × Dn).

Proof.

0 n−p n−p 0 Dn ×Dp Dn = {(d, d ) ∈ Dn × Dn : t (d) = s (d )} 0 0 = {(d, d ) ∈ Dn × Dn : πn−(n−p)(D, d) = πn−(n−p)(D, d )} 0 0 = {(d, d ) ∈ Dn × Dn : πp(D, d) = πp(D, d )} 0 0 = {(d, d ) ∈ Dn × Dn : d = d } 0 0 = {(d, d ) ∈ Dn × Dn : d = d }

= Diag(Dn × Dn).

The Lemma 3.1 indicates that it is enough to define the composition for pairs (d, d) ∈ Dn × Dn. Definition 3.3 (Composition). For each 0 ≤ p < n, define the composition of d ∈ Dn with itself by

d ◦p d := {x ∗p y : x, y ∈ d} where ∗p is the path concatenation operator.

Lemma 3.2. For all n ≥ 1, 0 ≤ p < n e d ∈ Dn,

d ◦p d = d.

Proof. Since (d, ∗p) is a group, it is clear that d ◦p d ⊆ d. On the other hand, if x ∈ d then x = x ∗p e ∈ d ◦p d, where e is the identity element of the group (d, ∗p). Thus d ◦p d = d.

Definition 3.4 (Identity). For each n ∈ N e d = πn(D, d) ∈ Dn, define the identity function i : Dn → Dn+1, i(d) = 1d as follows

1d := πn+1(D, d).

Theorem 3.1. D is an ∞-groupoid.

Proof. Let n ≥ 1, 0 ≤ p < n. For the axioms related to composition of morphisms, Lemma 3.1 allows us to verify them by the composition of d = πn(D, d) ∈ Dn with itself, then

13 a. (sources and targets of composites) by Lemma 3.2 and Definition 3.1 we have

s(d ◦p d) = s(d) = s(d) ◦p s(d),

t(d ◦p d) = t(d) = t(d) ◦p t(d),

b. (sources and targets of identities) by Definitions 3.1 and 3.3

s(1d) = s(πn+1(D, d)) = πn(D, d) = d,

t(1d) = t(πn+1(D, d)) = πn(D, d) = d,

c. (associativity) by Lemma 3.2

(d ◦p d) ◦p d = d ◦p d = d ◦p (d ◦p d),

d. (identities) by Definitions 3.1 , 3.3 and Lemma 3.2

n−p n−p n−p i (t (d)) ◦p d = i (πp(D, d)) ◦p d = πp+n−p(D, d) ◦p d = d ◦p d = d, n−p n−p n−p d ◦p i (s (d)) = d ◦p i (πp(D, d)) = d ◦p πp+n−p(D, d) = d ◦p d = d,

e. (binary interchange) let 0 ≤ q < p < n, by Lemma 3.2

(d ◦p d) ◦q (d ◦p d) = d ◦q d = (d ◦q d) ◦p (d ◦q d),

f. (nullary interchange) let 0 ≤ q < p < n, by Lemma 3.2

1d ◦q 1d = 1d = 1d◦qd,

g. (inverse) by Lemma 3.2 and (d)

n−p n−p n−p n−p d ◦p d = d = i (t (d)) = i (s (d)), thus d is the inverse of itself.

Next we define D∞ as a set in the sense of ZF .

Definition 3.5 (The set D∞). Define D∞ as the set of all infinite sequences

d := hd0, d1, d2,... i, such that dn ∈ Dn (of the Definition 3.1) and s(dn+1) = t(dn+1) = dn, for each n ∈ N.

Proposition 3.2. d ∈ D∞ if and only if there exists d ∈ D for all n ∈ N, such that dn = πn(D, d).

14 Proof. Let d ∈ D∞, then d0 ∈ D0, i.e., d0 = π0(D, d) for some and unique d ∈ D. Suppose that dn = πn(D, d) and we will prove by induction that dn+1 = πn+1(D, d). Since d ∈ D∞, by induction hypothesis s(dn+1) = t(dn+1) = dn = πn(D, d). By Proposition 3.1 we have dn+1 = πn+1(D, d). On the other hand, if dn = πn(D, d) for every n ∈ N, then s(dn+1) = t(dn+1) = πn(D, d) = dn for all n ∈ N, thus d ∈ D∞.

Proposition 3.3. Let a, b ∈ D∞, such that an = πn(D, a) and bn = πn(D, b) for all n ∈ N, then a = b ⇐⇒ a0 = b0.

Proof. If a = b, by Definition 3.5 we have a0 = b0. If a = a0 = b0 = b, by the Proposition 3.2 above an = πn(D, a) = πn(D, b) = bn.

4 Higher fundamental groups of a c.p.o.

Next we show that every higher fundamental groupoid on any c.p.o. are trivial, particularly those generated by D∞. Lemma 4.1. Let D be a c.p.o. with the Scott topology. If A 6= D is an open, then ⊥∈/ A. Proof. Let A be an open from D. Suppose ⊥∈ A. Since D is a c.p.o, then for all d ∈ D we have ⊥v d. Since A is final, ⊥∈ A and ⊥v d, then d ∈ A. Thus A = D, which is a contradiction.

Theorem 4.1. If D is a c.p.o. with the Scott topology, then πn(D, d) = {[cn(d)]} for all d ∈ D and n ≥ 0. Proof. By Theorem 2.2, it is enough to check that D is contractible, i.e., one has to check that for the identity function ID : D → D there exists some constant function fc : D → D such that fc ' ID. Consider the map H : D × [0, 1] → D defined by ( ⊥ if t = 0, H(x, t) = x if t ∈ (0, 1] and let us show that H is a contraction from D. Clearly H( · , 0) = f⊥(·) and H( · , t) = ID(·) if t ∈ (0, 1]. Now take any open A 6= D, then H−1(A) = {(x, t) ∈ D × [0, 1] : H(x, t) ∈ A} = ({x ∈ D : H(x, 0) =⊥∈ A} × {0}) ∪ ({x ∈ D : x ∈ A} × (0, 1]) = (∅ × {0}) ∪ (A × (0, 1]) (by Lemma 4.1, ⊥∈/ A) = A × (0, 1],

15 which is an open from D × [0, 1], then H is continuous. Thus H is a contrac- tion from D. Let us now generalize the notion of a continuous path from point a to point b, to n-paths based on points a and b in any topological space D.

n n−1 Notation 4.1. Take a map p : [0, 1] → D. Write p[ tr] : [0, 1] → D for the map such that

p[tr](t1, . . . , tr−1, tr+1, . . . , tn) := p(t1, . . . , tr−1, tr, tr+1, . . . , tn), for r < s we denoted,

p[tr, ts](t1, . . . , tr−1, tr+1, . . . , ts−1, ts+1, . . . , tn) :=

p(t1, . . . , tr−1, tr, tr+1, . . . , ts−1, ts, ts+1, . . . , tn), n−1 and for a fixed a ∈ [0, 1], write p[tr = a] : [0, 1] → D for the map such that

p[tr = a](t1, . . . , tr−1, tr+1, . . . , tn) := p(t1, . . . , tr−1, a, tr+1, . . . , tn), for r < s we wrote,

p[tr = a, ts = b](t1, . . . , tr−1, tr+1, . . . , ts−1, ts+1, . . . , tn) :=

p(t1, . . . , tr−1, a, tr+1, . . . , ts−1, b, ts+1, . . . , tn).

Definition 4.1 (n-path). Let D be a topological space. For each n ∈ N, define an n-path based in the points a, b ∈ D as continuous function p : [0, 1]n → D such that

p[tn = 0](t1, . . . , tn−1) = a and p[tn = 1](t1, . . . , tn−1) = b, for each t1, . . . , tn−1 ∈ [0, 1].

• For each r < n, define the product ∗r of n-paths p and q as

1. if p[t1 = 1] = q[t1 = 0], define the n-path

( 1 p(2t1, t2, . . . , tn) if 0 ≤ t1 ≤ 2 , (p ∗n−1 q)(t1, . . . , tn) := 1 q(2t1 − 1, t2, . . . , tn) if 2 ≤ t1 ≤ 1.

2. if r < n−1 and p[t1 = 1, . . . , t(n−1)−r = 1] = q[t1 = 0, . . . , t(n−1)−r = 0], define the n-path p ∗r q such that

(p ∗r q)[t1, . . . , t(n−1)−r] := p[t1, . . . , t(n−1)−r] ∗r q[t1, . . . , t(n−1)−r].

16 • For each n-path p, define the identity (n + 1)-path as the constant path n+1 c(p) : [0, 1] → D such that (c(p))[t1] = p for all t1 ∈ [0, 1].

Define the equivalence relation =h on n-paths as given by: p1 =h p2 if there exists an (n + 1)-path p from p1 to p2. Thus, the set of all equivalence classes on the set of n-paths along with the product of n-paths, it generates a groupoid; where the product between n−r classes is defined naturally by [p] ∗r [q] := [p ∗r q], which satisfies [c (p[t1 = n−r 0, . . . , tn−r = 0])]∗r [p] = [p] and [p]∗r [c (p[t1 = 1, . . . , tn−r = 1])] = [p], and for .each n-path p there is ap ¯ such thatp ¯[t1, . . . , tn−r] = p[1−t1,..., 1−tn−r], n−r for which it holds that [p]∗r [¯p] = [c (p[t1 = 0, . . . , tn−r = 0])] and [¯p]∗r [p] = n−r [c (p[t1 = 1, . . . , tn−r = 1])]. Example 4.1. For n = 2, any 2-paths p and q would be homotopies between paths (1-paths), whose r-product is given according to the cases:

1. If p[t1 = 1] = q[t1 = 0], the 1-product is

( 1 p(2t1, t2) if 0 ≤ t1 ≤ 2 , (p ∗1 q)(t1, t2) := 1 q(2t1 − 1, t2) if 2 ≤ t1 ≤ 1.

so (p ∗1 q)[t1 = 0] = p[t1 = 0] and (p ∗1 q)[t1 = 1] = q[t1 = 1], i.e., (p ∗1 q) is a homotopy from path p[t1 = 0] to path q[t1 = 1] as seen in Figure 3.

p a b q

Figure 3: The product p ∗1 q

2. If p[t2 = 1] = q[t2 = 0], the 0-product is given by

(p ∗0 q)(t1, t2) = (p ∗0 q)[t1](t2) = (p[t1] ∗0 q[t1])(t2) =

( 1 ( 1 p[t1](2t2) if 0 ≤ t2 ≤ 2 , p(t1, 2t2) if 0 ≤ t2 ≤ 2 , = 1 = 1 q[t1](2t2 − 1) if 2 ≤ t2 ≤ 1, q(t1, 2t2 − 1) if 2 ≤ t2 ≤ 1.

Then (p∗0 q)[t1 = 0] = p[t1 = 0]∗0 q[t1 = 0] and (p∗0 q)[t1 = 1] = p[t1 = 1]∗0 q[t1 = 1], i.e., (p∗0 q) is a homotopy from path p[t1 = 0]∗0 q[t1 = 0] to path p[t1 = 1] ∗0 q[t1 = 1] as in Figure 4.

17 a p b q c

Figure 4: The product p ∗0 q

Example 4.2. Let the set L = {0, 1, 2} ∪ {⊥, >}. For all a, b ∈ L, define a v b ⇐⇒ (a = ⊥ and b ∈ L) or (a ∈ L and b = >) or (a = b). The poset (L, v) is a finite lattice, so its a c.p.o. which we endow with the Scott topology (see figure 5).

>

0 1 2

Figure 5: The c.p.o L

Let a ∈ {0, 1, 2}, define the 1-paths ( ( a if t = 0, a if 0 ≤ t < 1, pa→>(t) := pa→⊥(t) := > if 0 < t ≤ 1, ⊥ if t = 1,

p>→a(t) := pa→>(1 − t), p⊥→a(t) := pa→⊥(1 − t). • For a, b ∈ {0, 1, 2} we have a→> >→b a→⊥ ⊥→b p ∗0 p =h p ∗0 p . Since, for the paths

a→b a→> >→b a→b a→⊥ ⊥→b p> := p ∗0 p , p⊥ := p ∗0 p , a⇒b there exists a 2-path p such that for each t2 ∈ [0, 1]  a if t2 = 0, a⇒b a→b  p [t1 = 0](t2) = p> (t2) = > if 0 < t2 < 1,  b if t2 = 1,

18  1 a if 0 ≤ t2 < 2 , a⇒b a→b  1 p [t1 = 1](t2) = p⊥ (t2) = ⊥ if t2 = 2 ,  1 b if 2 < t2 ≤ 1, which is given by  > if (t1 = 0 and 0 < t2 < 1) or (0 < t1, t2 < 1),   1 a⇒b a if (0 ≤ t1 ≤ 1 and t2 = 0) or (t1 = 1 and 0 < t2 < 2 ), p (t1, t2) = b if (0 ≤ t ≤ 1 and t = 1) or (t = 1 and 1 < t < 1),  1 2 1 2 2  1 ⊥ if t1 = 1 and t2 = 2 . On the other hand, if we defined the path ( > if 0 ≤ t < 1, e(t) := ⊥ if t = 1.

The 0-product of the 2-paths p0⇒1 and p1⇒2 is given by

0⇒1 1⇒2 0⇒1 1⇒2 (p ∗0 p )[t1] = p [t1] ∗0 p [t1] 0→1 1→2 = pe(t1) ∗0 pe(t1) 0→e(t1) e(t1)→1 1→e(t1) e(t1)→2 = (p ∗0 p ) ∗0 (p ∗0 p )

0→e(t1) e(t1)→1 1→e(t1) e(t1)→2 =h p ∗0 (p ∗0 p ) ∗0 p

0→e(t1) e(t1)→2 =h p ∗0 1e(t1) ∗0 p

0→e(t1) e(t1)→2 =h p ∗0 p 0→2 = pe(t1) 0⇒2 = p [t1].

Therefore, 0⇒1 1⇒2 0⇒2 p ∗0 p =h p .

• Let a ∈ {0, 1, 2}, define the path

 1 > if 0 ≤ t < 2 , >→a a→⊥  1 qa(t) := (p ∗0 p )(t) = a if 2 ≤ t < 1, ⊥ if t = 1.

For a, b ∈ {0, 1, 2} we have

>→a a→⊥ >→b b→⊥ qa = p ∗0 p =h p ∗0 p = qb.

19 >

0 ⇓p0⇒1 1 p1⇒2⇓ 2

0⇒1 1⇒2 Figure 6: The product p ∗0 p

Since, there is a 2-path qa⇒b such that

a⇒b a⇒b q [t1 = 0] = qa, q [t1 = 1] = qb,

which is given by  > if (0 ≤ t ≤ 1 and 0 ≤ t < 1 ) or (0 < t < 1 and t = 1 )  1 2 2 1 2 2  1  or (0 < t1 < 1 and 2 < t2 < 1), a⇒b  1 q (t1, t2) = a if t1 = 0 and 2 ≤ t2 < 1, b if t = 1 and 1 ≤ t < 1,  1 2 2  ⊥ if 0 ≤ t1 ≤ 1 and t2 = 1.

1 0⇒1 1⇒2 If 0 ≤ t2 < 2 or t2 = 1, the 1-product of the 2-paths q and q is given by 0⇒1 1⇒2 0⇒2 (q ∗1 q )[t2] = 1e(t2) = q [t2], 1 and if 2 ≤ t2 < 1, the 1-product results in

0⇒1 1⇒2 0⇒1 1⇒2 (q ∗1 q )[t2] = q [t2] ∗0 q [t2] 0→1 1→2 = p> ∗0 p> 0→2 =h p> 0⇒2 = q [t2].

Thus, 0⇒1 1⇒2 0⇒2 q ∗1 q =h q .

Definition 4.2 (Parallel paths). Two n-paths p and q based at, resp., a, b ∈ D are parallel if for each r = 1 . . . , n − 1 one has that

20 >

q0⇒1 q1⇒2 0 ⇒ 1 ⇒ 2

0⇒1 1⇒2 Figure 7: The product q ∗1 q

1. p[t1 = 0, . . . , tr = 0] = q[t1 = 0, . . . , tr = 0],

2. p[t1 = 1, . . . , tr = 1] = q[t1 = 1, . . . , tr = 1].

Corollary 4.1. If p and q are parallel n-paths based on a, b ∈ D∞, then p =h q. Proof. Since p and q are parallel, we have

p[t1 = 1, . . . tn−1 = 1] = q[t1 = 1, . . . , tn−1 = 1] =q ¯[t1 = 0, . . . , tn−1 = 0], by definition of product

(p ∗0 q¯)[t1, . . . , tn−1] = p[t1, . . . , tn−1] ∗0 q¯[t1, . . . , tn−1] where

(p ∗0 q¯)[t1, . . . , tn−1](0) = p[t1, . . . , tn−1](0) = a; p(t1, . . . , tn−1, 0) = a,

(p ∗0 q¯)[t1, . . . , tn−1](1) =q ¯[t1, . . . , tn−1](1) = a; q(t1, . . . , tn−1, 1) = b, for each t1, . . . , tn−1 ∈ [0, 1].

Then (p∗0 q¯)[t1, . . . , tn−1] is a 1-path closed in a for all t1, . . . , tn−1 ∈ [0, 1]. n By Theorem 4.1, one has (p∗0 q¯)[t1, . . . , tn−1] =h c(a) = c (a)[t1, . . . , tn−1] for each t1, . . . , tn−1 ∈ [0, 1], where c(a) is the constant path in a, i.e., c(a)(t) = a n n−r n for each t ∈ [0, 1], and c (a)[t1, . . . , tr] = c (a). Thus p ∗0 q¯ =h c (a), so p =h q.

Notation 4.2. Write Πn(D∞, a, b) for the (weak) n-groupoid of n-paths based at a, b ∈ D∞. And write Π∞(D∞, a, b) for the globular set

s s s s s ··· ⇒t Πn(D∞, a, b) ⇒t Πn−1(D∞, a, b) ⇒t ··· ⇒t Π1(D∞, a, b) ⇒t Π0(D∞, a, b), where s(p) := p[t1 = 0] and t(p) := p[t1 = 1].

21 Therefore, by Corollary 4.1, the n-groupoid Πn(D∞, a, b) is trivial for each n ≥ 0, i.e., under the intensional equality =h there is only one parallel n-path which inhabits Πn(D∞, a, b). Since D∞ is connected by paths (by ∼ 0 0 Theorem 4.1, π0(D∞, d) = {0} for all d ∈ D∞), given a , b ∈ D∞ it holds ∼ 0 0 that Πn(D∞, a, b) = Πn(D∞, a , b ). Thus any n-groupoid Πn(D∞, a, b) can be written simply as Πn(D∞).

On the other hand, notice that if a = b then the n-groupoid Πn(D∞, a, b) = Πn(D∞, a, a) = πn(D∞, a) for each n ≥ 0. So Π∞(D∞, a, a) = π∞(D∞, a), where the ∞-group π∞(D∞, a) is ∞-globular set which corresponds to dia- gram s s s s s ··· ⇒t πn(D∞, a) ⇒t πn−1(D∞, a) ⇒t ··· ⇒t π1(D∞, a) ⇒t π0(D∞, a), with s = t.

5 The λ-model D∞ and its fundamental ∞- groupoid

According to Definition 3.5, let D∞ be the ∞-groupoid generated by the c.p.o. D∞ with the Scott topology. By Proposition 3.2 we have that for each d ∈ D∞ there is d ∈ D∞ such that

d = hπ0(D∞, d), π1(D∞, d), π2(D∞, d),...i = h{d}, {[c(d)]}, {[c2(d)]},...i ∼ 2 = h[d], [c(d)], [c (d)],..., i ∈ π∞(D∞, d) (by Definition 3.5). ∼ Therefore D∞(d) = π∞(D∞, d) (isomorphism of groups) and each d ∈ D∞ can be seen as the infinity matrix

 d c c ···  0 d0 cd0  d1 cd cc ···  d ∼= hd, c , c ,... i :=  1 d1  d cd  d c c ···  2 d2 cd2  . . . .  . . . ..

Definition 5.1 (Application in D∞). For a, b ∈ D∞ such that an = πn(D∞, a) and bn = πn(D∞, b), define the product πn(D∞, a) with πn(D∞, b) as

πn(D∞, a) • πn(D∞, b) := πn(D∞, a • b), where a • b was defined below Definition 2.20, so the application of a to b in D∞ as the infinite sequence a•b = ha0 • b0, a1 • b1, a2 • b2,...i = ha • b, π1(D∞, a • b), π2(D∞, a • b),...i .

22 ∼ Theorem 5.1. hD∞, •i = hD∞, •i. So hD∞, •i is an extensional λ-model.

Proof. It is enough to show that the mapping F : hD∞, •i → hD∞, •i such that (F (a))n = πn(D∞, a) for each n ∈ N, is an isomorphism.

(F (a) • F (b))n = (F (a))n • (F (b))n

= πn(D∞, a) • πn(D∞, b)

= πn(D∞, a • b)

= (F (a • b))n , for all n ∈ N. This is F (a) • F (b) = F (a • b). F is injective. Let F (a) = F (b), by Proposition 3.3 we have

a = (F (a))0 = (F (b))0 = b.

F is surjective. Let a ∈ D∞, then we have a0 = a for each a ∈ D∞. Thus F (a) = a.

Definition 5.2 (Partial order in D∞). For each a and b in D∞ define the partial order on D∞ as a v b ⇐⇒ a v b, where an = πn(D∞, a) and bn = πn(D∞, b). ∼ Remark 5.1. hD∞, vi = hD∞, vi. So hD∞, vi is a c.p.o. and the induced topology by the mapping F : hD∞, τScotti → D∞ of the Theorem 5.1’s proof to the set D∞ is exactly the Scott topology.

6 Interpretation of β-equality proofs in D∞

In λ-calculus we have that two λ-terms M and N are β-equal, M =β N, if there is a sequence of λ-terms N1, N2,. . . ,Nn such that

(∀i ≤ n − 1)(Ni B1β Ni+1 or Ni+1 B1β Ni or Ni ≡α Ni+1), where N1 = M and Nn = N. Thus the equality of the theory λβ can be seen as an intensional equality, in the sense that the chain

M = N0 =β N1 =β ··· =β Nn = N, would be a proof P of equality M =β N, which can be interpreted in some topological model hD, •, i as a continuous path p : M N which passes through the intermediateJK points N1 , N2 ..., NnJ−1 K. ThenJ weK could J K J K J K 23 ask ourselves if given two 1-proofs P and Q of equality M =β N, in space D, is there a homotopy (2-path) between the paths p := P and q := Q ?. Now if we have some intensional definition (with respect toJ DK ) of D-equalityJ K between the proofs of equality P and Q such that its interpretation int D is a homotopy from p to q, we could ask again if for the 2-proofs F and G of the equality P =D Q is there a homotopy of homotopies (3-path) between the homotopies f := F and g := G ? And so on, we can continue asking with the purpose of formingJ K from modelJ K topology D an ∞-groupoid structure in λ-calculus.

We have that D∞ is a topological λ-model, but its topological structure does not allow to capture relevant information about equality between higher proofs at λ-calculus, since the ∞-groupoid generated by D∞ is trivial. The reason is that any proof P of equality M =β N given by the chain

P : M = N0 =β N1 =β ··· =β Nn = N, would be interpreted by some path p : M N that passes through the intermediate points N1 ,..., Nn−1 , butJ allK theseJ K points are equal in space D∞, i.e., J K J K p : M = N0 = N1 = ··· = Nn = N . J K J K J K J K J K Therefore the interpretation of proof P is some closed path p : M M , we wrote such interpretation as P := p. Since π1(D∞, M ) isJ trivialK Jby TheoremK 4.1, then p is homotopicallyJ K equal to the constantJ pathK c( M ), i.e., p =h c( M ). Now given any other proof J K J K 0 0 0 Q : M = N0 =β N1 =β ··· =β Nn = N, of equality M =β N, with interpretation Q = q, by Corollary 4.1 we have J K p =h q, so we could assert that P =D∞ Q (see Figure 8). Thus the class of all the proofs of any equality is trivial with respect to D∞. If we continue at the next level, i.e., given any 2-proofs F and G of equality P =D∞ Q, we have that the interpretation of F and G is given for some pair of homotopies (2-paths) f, g : p q, where p, q : M M , by J K J K Corollary 4.1 it has f =h g thus F =D∞ G. Therefore the class of all 2-proofs of any proof equality P =D∞ Q is also trivial.

A better way to study the intentionality of equality =β would be to set aside the set equality of the extensional model definition and opt rather for homotopic models (or some homotopy variation) defined below. Definition 6.1 (Homotopic λ-model). A homotopic λ-model is a triple hD, •, i, where D is a topological space, • : D × D → D is a binary operation and JK JK 24 Figure 8: Interpretation of equal proofs P,Q :(M =β N) on D∞. is a mapping which assigns to λ-term M and each assignment ρ : V ar → D an element M ρ of D such that J K 1. x = ρ(x); J K 2. PQ ρ =h P ρ • Q ρ; J K J K J K 3. λx.P ρ • d =h P [d/x]ρ for all d ∈ D; J K J K 4. M ρ = M σ if ρ(x) = σ(x) for x ∈ FV (M); J K J K 5. λx.M ρ =h λy.[y/x]M ρ if y∈ / FV (M); J K J K  6. if (∀d ∈ D) P [d/x]ρ =h Q [d/x]ρ , then λx.P ρ =h λx.Q ρ. J K J K J K J K The homotopic model hD, •, i is an extensional homotopic model if it sat- isfies the additional property:JK λx.Mx ρ =h M ρ with x∈ / FV (M). J K J K To solve the triviality problem of proofs interpretation on D∞, we would have to propose a λ-homotopic model D with another topology, for which there must exist two proofs P,Q :(M =β N), whose interpretations are not homotopically equal, p 6=h q (of course there must also be different equality proofs whose interpretations are homotopically equal), as can be seen in the Figure 6. It would allow us to capture more information about the multiple β-contractions and reverse β-contractions of an equality proof than a traditional model based on extensional equality between sets. In (Mart´ınez;de Queiroz, 2020) it is put forward a cartesian closed cat- egory of ∞-groupoids (Kan complexes) with enough points, appropriate for the construction of concrete homotopic λ-models with a non-trivial structure of ∞-groupoid.

25 Figure 9: Proofs P,Q :(M =β N) on an homotopic λ-model D.

On other hand, if we forget the homotopies between continuous paths in D∞ (or D∞) and consider simply extensional equality between functions, we could define the interpretation of the equality proof P : M = N0 =β ··· =β Nn = N as a concatenation of continuous paths

p := r1 ∗ r2 ∗ r3 ∗ · · · ∗ rn, where each continuous path ri : [0, 1] → D∞ is given by ( a if t ∈ [0, 1/2) ∪ (1/2, 1], ri(t) := ⊥ if t = 1/2 with a = M = N1 = ··· = Nn = N . We write the interpretation of P in D∞ asJ KP :=J pKand each Jri isK calledJ K a time period, thus we say that p consists of nJtimeK periods and is written as t(p) = n. 0 0 Now if we have another proof of equality Q : M = N0 =1β ··· =1β Nm = N whose interpretation would be

q := r1 ∗ r2 ∗ r3 ∗ · · · ∗ rm, where it is clear that t(q) = m. So we say that the equality proofs P,Q : M =β N are equal according to model D∞, noted by if their respective interpretations are equal in the traditional sense of set theory, i.e.,

P =D∞ Q ⇐⇒ p = q, thus we would have

P =D∞ Q ⇐⇒ t(p) = t(q).

26 Thus, we have that two proofs P and Q of M =β N are “equal” if they require the same time period to complete the proof or else if P and Q are sequences of the same length. Although the extensional equality p = q manages to capture information about the length of the P and Q proofs in λ-calculus, the nature of its extensionality does not allow to capture more information about the 2-proofs of proof equality: P =D∞ Q, since there is only one canonical way to prove

P =D∞ Q, so the generated ∞-groupoid by =D∞ it would be trivial for 2-equality, 3-equality and so on.

Another alternative to deal with equality of paths is offered by an ap- proach to propositional equality which considers proofs of equality formalized as sequences of rewrites between terms of lambda-calculus (de Queiroz; de Oliveira; Ramos 2016). Each definitional equality (β, η, ξ, µ, reflexivity, symmetry, transitivity) is associated with a constant identifier, and paths are characterised as compositions of those primitive rewrites. Thus, by con- sidering as sequences of rewrites and substitution, it comes a rather natural fact that two (or more) distinct proofs may be yet canonical and are none to be preferred over one another. By looking at proofs of equality as rewrit- ing (or computational) paths this approach will be in line with the recently proposed connections between type theory and homotopy theory via identity types, since elements of identity types will be, concretely, paths (or homo- topies). As a matter of fact, this is part of an ongoing project (Ramos; de Queiroz; de Oliveira, 2017, Veras et al., 2019a, Veras et al., 2019b, Veras et al., 2020), while it looks for the use of homotopy structures such as groupoids in the study of semantics of computation, it also seeks to demonstrate the utility and the impact of the so-called Curry–Howard interpretation of logical de- duction in the actual practice of an important area of mathematics, namely homotopy theory. The short citation for the Royal Swedish Academy of Sciences’ “2020 Rolf Schock Prize in and philosophy” says that it was awarded to Per Martin-L¨of(shared with Dag Prawitz) “for the creation of constructive type theory.” In a longer statement, the prize committee recalls that constructive type theory is “a formal language in which it is possible to express constructive mathematics” (...) “[which] also functions as a powerful programming language and has had an enormous impact in logic, computer science and, recently, mathematics.” In fact, by introducing a framework whose formalization of the logical notion of equality is done via the so-called “identity type”, one has the pos- sibility for a surprising connection between term rewriting and geometric concepts such as path and homotopy. And indeed, Martin-L¨of’s type theory

27 (MLTT) allows for making useful bridges between theory of computation, algebraic topology, logic, categories, and higher algebra, and a single con- cept seems to serve as a bridging bond: “path”. Its impact in mathematics has been felt more strongly since the start of Vladimir Voevodsky’s program on the of mathematics around 2005, and one specific aspect which we would like to address here is the calculation of fundamental groups of surfaces. Taking from the Wikipedia entry on “homotopy group”, calculation of homotopy groups is in general much more difficult than some of the other homotopy invariants learned in algebraic topology. Now, by using an alternative formulation of the “identity type” which provides an explicit formal account of “path”, operationally understood as an invertible sequence of rewrites (such as Church’s “conversion”), and interpreted as a homotopy, we have provided examples of calculations of fundamental groups of surfaces such as the circle, the torus, the 2-holed torus, the Klein bottle, and the real projective plane. We would like to suggest that these examples might bear witness to the impact of MLTT in mathematics by offering formal tools to calculate and prove fundamental groups, as well as allowing to make such calculations and proofs amenable to be dealt with by systems of formal mathematics and interactive theorem provers such as , Lean, and similar ones.

7 Conclusions

Starting from any topological space that models extensional λ-calculus, we have proposed a method to build an ∞-groupoid. This construction was applied to the particular c.p.o. D∞ with Scott topology, resulting in a con- stant cell infinite sequences set, where each cell sequence is isomorphic to a constant higher paths infinite matrix. Going further, a natural way forward is to try to build homotopic λ-model in order to avoid trivialities in the fundamental ∞-groupoid associated with the topology of the model, which would allow to capture relevant information about the higher equality proof in the λ-calculus syntax.

References

1. L. Acosta and M. Rubio, Topolog´ıade Scott para relaciones de preor- den, Bolet´ınde Matem´aticas, Nueva Serie IX No. 1 (2002), 1-10.

2. S. Awodey and M. Warren, Homotopy theoretic models of identity

28 types, Mathematical Proceedings of the Cambridge Philosophical Soci- ety, v. 146, n. 1, p. 1–10, 2009.

3. H. P. Barendregt, The Lambda Calculus, its Syntax and Semantics, North-Holland Co., Amsternam, 1984.

4. B. Berg and R. Garner, Types are weak ω-groupoids, Proceeding of the London Mathematical Society, v. 102, n. 2, p. 370-394, 2011.

5. J. M. Greenberg, Lectures on Algebraic Topology, W. A. Benjamin, 1967.

6. P. Goerss and J. Jardine, Simplicial Homotopy Theory, Birkh¨auser Basel, Springer Nature Switzerland AG, 2009.

7. A. Hatcher, Algebraic Topology, Cambridge University Press, New York, NY, 2001.

8. J.R. Hindley and J.P. Seldin, Lambda-Calculus and Combinators, an Introduction, Cambridge University Press, New York, NY, 2008.

9. M. Hofmann and T. Streicher, The groupoid model refutes uniqueness of identity proof, Logic and Computer Science, p. 208-212, 1994.

10. C. Kapulkin, P. Lumsdaine, V. Voevodsky, The simplicial model of univalent foundations, arXiv:1211.2851, 2012.

11. T. Leinster, Higher Operads, Higher Categories, arXiv:math/0305049, 2003.

12. P. Lumsdaine, M. Shulman, Semantics of higher inductive types, Math- ematical Proceedings of the Cambridge Philosophical Society 169 (2020) 159–208.

13. P. Martin-L¨of,An intuitionistic theory of types: predicative part, in: Logic Colloquium ’73 (Bristol, 1973).

14. J. P. May, A Concise Course in Algebraic Topology. University of Chicago Press, 1999.

15. D. Mart´ınezand R. de Queiroz, Towards a Homotopy Domain Theory, arXiv:2007.15082, 2020.

16. T. U. F. Program, Homotopy Type Theory: Univalent Foundations of Mathematics. Princeton, Institute for Advanced Study, 2013.

29 17. R. J. G. B. de Queiroz, A. G. de Oliveira and A. F. Ramos. South American Journal of Logic Vol. 2, n. 2, pp. 245–296, 2016. (Prelimi- nary version arXiv:1107.1901, 2011)

18. A. F. Ramos, R. J. G. B. de Queiroz, A. G. de Oliveira. On the identity type as the type of computational paths. Logic Journal of the IGPL, Volume 25, Issue 4, pp. 562–584, August 2017.

19. D.S. Scott, A type-theoretical alternative to ISWIM, CUCH, OWHY, Theoretical Computer Science 121:411–440, 1993. (Informally circu- lated in 1969).

20. T. M.L. Veras, A. F. Ramos, R. J. G. B. de Queiroz, A. G. de Oliveira. An alternative approach to the calculation of fundamental groups based on labeled . arXiv:1906.09107, 2019a.

21. T. M.L. Veras, A. F. Ramos, R. J. G. B. de Queiroz, A. G. de Oliveira. A Topological Application of Labelled Natural Deduction. arXiv:1906.09105, 2019b.

22. T. M.L. Veras, A. F. Ramos, R. J. G. B. de Queiroz, T. D. O. Silva, A. G. de Oliveira. Computational Paths – A Weak Groupoid. arXiv:2007.07769, 2020.

23. V. Voevodsky, The equivalence axiom and univalent models of type theory, arXiv:1402.5556, 2010.

30