Abstract Introduction 1 1-polygraphs 2 Tietze transformations 3 Functors between 1-polygraphs 4 Transfer of coherence 5 Conclusion and future work References

Coherent Tietze Transformations of 1-Polygraphs in Homotopy Type Theory

Samuel Mimram ORCID LIX, CNRS, École polytechnique, Institut Polytechnique de Paris, 91120 Palaiseau, France Émile Oleon ORCID LIX, CNRS, École polytechnique, Institut Polytechnique de Paris, 91120 Palaiseau, France
Abstract

Polygraphs play a fundamental role in algebra, geometry, and computer science, by generalizing group presentations to higher-dimensional structures and encoding coherence for those. They have recently been adapted by Kraus and von Raumer to the setting of homotopy type theory, where they are useful to define and study higher inductive types. Here, we develop the theory of 1-dimensional polygraphs, which correspond to presentations of sets in homotopy type theory. This requires us to introduce a dedicated notion of Tietze transformation, generalizing their well-known counterpart in group theory: the equivalence generated by those transformations characterizes situations where two 1-polygraphs present the same set. We also show a homotopy transfer theorem, which provides a way to transport coherence structures from one 1-polygraph to another. This work lays the foundations for a general theory of polygraphs in arbitrary dimensions, which should be useful for instance to define and study coherent group presentations, allowing for synthetic (co)homology computations. Most of the results in the article have been formalized with the Agda proof assistant using the cubical HoTT library.

Keywords and phrases:
homotopy type theory, polygraph, Tietze transformation, coherence
Copyright and License:
[Uncaptioned image] © Samuel Mimram and Émile Oleon; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Constructive mathematics
Supplementary Material:

Software  (Agda proofs): https://github.com/smimram/agda-polygraphs [13]
  archived at Software Heritage Logo swh:1:dir:27f2a0c3a496b72c3f4cd458ab51ea174f448eb7
Editors:
Maribel Fernández

Introduction

The notion of polygraph is emerging as a central one in many areas of mathematics and computer science [1]. From an algebraic point of view, it generalizes group presentations by generators and relations. Namely, polygraphs have been used to present more complex structures (such as higher categories or even weak ones [3]), but they also allow the encoding of their coherence, by describing the higher relations between relations. From a geometric point of view, polygraphs can be thought of as analogous to CW-complexes, since they are constructed by progressively attaching cells (more formally, they can be shown to be cofibrant objects in suitable model structures [12]). Finally, from a computer science point of view, they generalize rewriting systems [2] (again, in higher-dimensions, and by taking coherence into account): 1-polygraphs essentially correspond to abstract rewriting systems while 2-polygraphs generalizes string rewriting systems. Many of the traditional constructions and tools of rewriting theory generalize to polygraphs, we refer readers to the monograph [1] for a general overview. Let us first illustrate some of those on group presentations.

Tietze transformations.

The symmetric group of order 3 (of bijections of a 3-elements set) admits the presentation S3=s,t|s2=1,t2=1,sts=tst, meaning that it is generated by two generators s and t, corresponding to two transpositions. Similarly, the dihedral group of order 3 admits the presentation D3=r,s|r3=1,s2=1,rsrs=1, where the generators r and s respectively correspond to a rotation of 2π/3 and a symmetry. It can be observed that the two resulting groups are isomorphic, and one can wonder whether this could be shown directly at the level of presentations. The answer is positive: namely, Tietze has introduced two kinds of transformations on presentations, respectively consisting in adding a definable generator and a derivable relation, which preserve the presented group, while being complete in the sense that any two presentations of the same group can be transformed into one another [18]. And indeed, using them we can transform the above presentation of S3 into the one of D3 [1, Example 5.1.4]. These transformations generalize to polygraphs [1, Chapter 5] and can actually be taken as the basis for completion procedures such as the Knuth-Bendix procedure [8].

Coherent presentations.

By orienting the relations of a presentation (say, from left to right), one obtains a string rewriting system. It has been observed by Newman [15] and then Squier [17, 11], that, when the rewriting system is convergent, the 2-cells given by the confluence of the critical pairs provide a homotopy basis in dimension 2, i.e. are sufficient to fully describe the coherence datum, and thus make any diagram of rewriting paths commute: this is sometimes called Squier’s theorem. For instance, a coherent presentation of S3 is obtained by adjoining the 5 following 2-cells, corresponding to the 5 critical branchings:

The above presentation of D3 is not convergent, and thus we cannot compute coherence 2-cells as above. We could complete it into a convergent one, but sometimes such a completion is not available nor easily computable. Alternatively, from the fact that the presentations of S3 and D3 are equivalent through Tietze transformation, one can directly compute a homotopy basis of D3 from the one of S3: this is the coherence transfer theorem (sometimes called homotopy transfer theorem) [4].

Polygraphs in homotopy type theory.

Homotopy type theory (HoTT) is a logical setting based on dependent types, in which types can be interpreted as spaces and be manipulated in a synthetic and homotopy-invariant way [19]. A central feature of the theory is the notion of higher inductive type (HIT) which generalizes inductive types by allowing constructors for identities, and can be thought of as generating CW-complexes. It is thus natural to try to relate those with polygraphs. In particular, one would like to use the above rewriting methods in order to provide explicit constructors which ensure coherence instead of resorting to formal truncations. Namely, given a formally n-truncated type, one can only easily eliminate to n-types, whereas providing explicit coherence cells allow to eliminate toward higher types, which is often required. This task has been achieved in dimension 2 by Kraus and von Raumer [10] who formalized Squier’s theorem for 2-polygraphs in HoTT.

Coherent Tietze transformations for homotopy 1-polygraphs.

While Squier’s theorem allows one to find a homotopy basis for convergent 2-polygraphs, we still need the coherence transfer theorem to transport it to non convergent ones. This key tool is however still missing in HoTT. Since its formalization in that setting turns out to be quite involved to perform in full details, we handle here the foundational case of 1-polygraphs. Those correspond to coherent presentations of propositions (as opposed to groups), and the setting of abstract rewriting systems (as opposed to string rewriting systems). To do so, we introduce coherent Tietze transformations on type theoretical 1-polygraphs, that is transformations on presentations which preserve coherence, and show associated correction and completeness results. We claim that it should generalize to higher-dimensional polygraphs, but already this first step allowed us to put to light interesting constructions and non-trivial proofs.

Most of the constructions presented here have been formalized in Agda using the cubical HoTT library [20]. The formalization is freely available [13] and we indicate the corresponding lemmas (in the file 1Polygraph.agda, unless mentioned otherwise).

Notations.

We refer to [19] for an introduction to HoTT and only introduce here the notations required to read the article. We denote by 𝒰 the universe of all types, and (resp. ) for the contractible (resp. empty) type. Given a type A, we write A1 (resp. A0) for its propositional (resp. set) truncation, and ||1 (resp. ||0) for the associated universal morphism. For a map f:AB and b:B, we write hfibf(b):=Σ(a:A).(f(a)=b) for its homotopy fiber at b. We also write apf(p):f(x)=f(y) for the path induced by f on B by functoriality from a path p:x=y in A. We write reflx:x=x for the trivial path on an element x of an arbitrary type, p for the inverse of a path p, and pq for the concatenation of two paths p and q.

Plan of the paper.

After defining 1-polygraphs (Section 1), we define the associated Tietze transformations (Section 2) and show correctness and completeness theorems for those (Theorems 13 and 22). We then introduce a notion of morphism between 1-polygraphs (Section 3), which then allows us (Section 4) to provide a construction to transfer coherence from a 1-polygraph to a Tietze equivalent 0-polygraph (Theorem 28). We finally conclude (Section 5).

1 1-polygraphs

Before introducing 1-polygraphs, we first need to present the (quite trivial) 0-dimensional variant. A 0-polygraph P is simply a type whose elements are called 0-generators. A sphere (x,y) in a 0-polygraph P is a pair of elements of P, and we write SP for the type of such objects. If we write S0={0,1} for the type with two elements, corresponding to the canonical 0-sphere, it can be noted that a sphere in a 0-polygraph P corresponds to an arrow S0P. Given a 0-polygraph P, we call P1 the proposition presented by P.

1.1 Internal and external 1-polygraphs

1-polygraphs.

A 1-polygraph P consists of a 0-polygraph UP (the underlying 0-polygraph of P) together with a function SUP𝒰, which to any sphere (x,y) in the underlying 0-polygraph associates a type P(x,y) whose elements are called the 1-generators of the 1-polygraph. In other words, 1-polygraphs correspond to type-theoretic directed graphs. A 1-polygraph is discrete when all the types UP and P(x,y) are sets. In the following, a sphere in UP is called a 0-sphere of P.

1-generators.

The elements of UP are called 0-generators or 0-cells of P. We sometimes write S0P:=SUP for the 0-spheres, as well as P0:=UP and P1:=Σ((x,y):S0P).P(x,y) for the type of 0- and 1-generators of P. We also write ,+:P1P0 for the source and target functions (defined by :=ππ and +:=ππ).

1-cells.

Given a 1-polygraph P and a 0-sphere (x,y), we write P(x,y) for the type of 1-cells in P from x to y. This family of types is defined inductively as the smallest one such that

  • for every 0-cell x:UP, we have a 1-cell idx:P(x,x),

  • for every 0-cells x,y,z:UP, 1-generator a:P(x,y) and 1-cell u:P(y,z), we have a 1-cell a::u:P(x,z),

  • for every 0-cells x,y,z:UP, 1-generator a:P(y,x) and 1-cell u:P(y,z), we have a 1-cell a::u:P(x,z).

Informally, cells in P(x,y) are undirected paths from x to y in the graph corresponding to P (where the two last cases respectively correspond to taking an arrow a forward and backward). In the following, we often write a:xy for a 1-generator a:P(x,y) and u:xy for a 1-cell u:P(x,y).

Composition.

Given two 1-cells u:xy and v:yz, we define their composite uv:xz by induction on u by

idv :=v (a::u)v :=a::(uv) (a::u)v :=a::(uv)
Lemma 1 ([13, comp0-assoc]).

Composition is associative and unital.

Given a 1-cell u:xy, we define its opposite uop:yx by induction on u by

idop :=id (a::u)op :=a::¯uop (a::u)op :=a::¯uop

where a::¯u, which corresponds to appending a to u, is defined by

a::¯id :=a::id a::¯(b::u) :=b::(a::¯u) a::¯(b::u) :=b::(a::¯u)

and a::¯u, corresponding to appending a backward to u, is defined similarly.

Spheres.

A sphere s in a 1-polygraph P consists of a 0-sphere (x,y) together with a pair of 1-cells f,g:xy. The underlying 0-sphere (x,y) is noted Us. The cell f (resp. g) is called the source (resp. target) of s and noted s (resp. +s), so that the sphere s is the triple (Us,s,+s). We write SP for type of spheres in a 1-polygraph.

Coherent 1-cells.

In the definition of 1-cell, we think of a:: and a:: as respectively precomposing by the 1-cell a and its inverse. However, nothing enforces that they are actually inverse operations, i.e. that we have

a::a::u =u a::a::u =u

for any 1-generator a and 1-cell u of suitable types. We define the types of coherent 1-cells P(x,y), indexed by 0-spheres (x,y), as the quotient of the types of 1-cells P(x,y) under the congruence generated by the above relations. This type is the “right” definition for the 1-cells of P, in the sense that it gives a description of the free groupoid generated by P [9]. However, non coherent 1-cells provides representatives for those which are often simpler to work with. Namely, by definition of coherent 1-cells as a quotient of 1-cells, we have

Lemma 2.

For x,y:UP, the canonical map f:P(x,y)P(x,y) is a surjection, i.e. the type hfibf(u)1 is inhabited for any u:P(x,y).

1.2 Geometric realization

We introduce the “geometric realization” of a 1-polygraph P, which can be thought of as a type-theoretical graph with P0 as vertices and P1 as edges. The set presented by P is then defined as the type of connected components of this graph.

Geometric realization.

Given a 1-polygraph P its geometric realization P¯ is the higher inductive type generated by the two constructors

ι:UP P¯ γ:((x,y):S0P)P(x,y) ιx=ιy

More abstractly, it corresponds to the pushout on the left or to the coequalizer on the right

where the horizontal arrow f sends an edge a:xy and 0 (resp. 1) to x (resp. y), which corresponds to attaching 1-cells to a 0-dimensional cell complex. The associated induction principle is the following.

Proposition 3.

Suppose given an arbitrary type A. Any two functions f0:P0A and f1:(((x,y),a):P1)f0(x)=f0(y) induce a unique function f:P¯A such that fι=f0 and fγ=f1. We also have the expected dependent generalization.

By partial evaluation, the map γ induces, for (x,y):S0P, a map γx,y:P(x,y)ιx=ιy, which extends as a map on cells γx,y:P(x,y)ιx=ιy defined by induction by

γx,x(id) :=refl γz,y(a::u) :=γaγx,y(u) γz,y(a::u) :=γaγx,y(u)

Moreover, since this definition is compatible with the relations for coherent 1-cells, for every sphere (x,y):S0P we have the following.

Lemma 4.

The map γx,y induces a map γx,y:P(x,y)ιx=ιy.

This map is an equivalence, so it provides a characterization of the paths in geometric realizations of graphs [13, KvR/1Polygraph/PathPresentation.agda]:

Theorem 5.

The map γx,y:P(x,y)ιx=ιy is an equivalence.

Proof.

A map ιx=ιyP(x,y) can be defined using the elimination principle for paths in P¯ given in [9, Theorem 3], and both can be shown to be mutually inverse by induction.

Presented set.

The set presented by a 1-polygraph P is the set of connected components of its geometric realization P¯0. This notion is to be understood as an analogue of a group presentation with generators and relations, but shifted down by one dimension: here, the 0-cells of P are the generators of the presented set, and the 1-cells are the relations.

Example 6.

Consider the polygraph P with UP= and one relation an:nn+2 for n. The presented set is 2.

We now prove some technical lemmas that will be useful later on.

Lemma 7.

For x,y:UP and p:|ι(x)|0=|ι(y)|0 in P¯0, there merely exists a 1-cell xy in P.

Proof.

By [19, Theorem 7.3.12], the type |ι(x)|0=|ι(y)|0 coincides with ι(x)=ι(y)1. Since we are eliminating to a proposition, we can suppose given a path p:ι(x)=ι(y) which by Theorem 5 induces a coherent cell p~:P(x,y), and we conclude by Section 1.1. The following shows that we can pick a representative 0-cell in every connected component [13, has-repr]:

Proposition 8.

The type Π(x:P¯0).Σ(x^:UP).|ι(x^)|0=x1 is inhabited.

Proof.

Any proposition being a set [19, Lemma 3.3.4], it is enough to construct a map f:Π(x:P¯).Σ(x^:UP).ι(x^)=x1 which can be done by using the elimination principle of P¯ (Section 1.2). Namely, we define, for x:UP, f(ι(x)):=|(x,reflι(x))|1 and, for x,y:UP and a:P(x,y), the path associated to it by f is canonically defined by the fact that we are eliminating to a proposition.

2 Tietze transformations

Tietze transformations originate from the work of Tietze [18] who defined two transformations on group presentations:

(T0)

adding a definable generator,

(T1)

adding a derivable relation.

The equivalence relation they induce, the Tietze equivalence, characterizes when two presentations give rise to the same group, up to isomorphism. These transformations have then been generalized to a variety of contexts, including the very general one of polygraphs [1, 5] for presentations of (higher) categories, and have as well been shown to provide a interesting notion of weak equivalence [7]. Their fundamental property can be decomposed in two parts:

  • correctness: any two presentations which are Tietze equivalent present the same structure,

  • completeness: any two presentations of the same structure are Tietze equivalent.

Here, we think of a 1-polygraph P as presenting the set P¯0, and we define elementary transformations as explained above. We then show that they are correct and complete with respect to the presented set.

2.1 Definition

We define the two following families of Tietze transformations, which transform a given 1-polygraph P into another 1-polygraph, by attaching cells to it:

(T0)

Add a definable 0-generator: given a type X and a function :XUP, we construct the polygraph P0 defined, for (x,y):S0P, by

U(P0) :=UPX (P0)(x,y) :={P(x,y)if x:UP and y:UPx=(y)if x:UP and y:Xotherwise
(T1)

Add a derivable relation: given a function :S0P𝒰 and a family of functions x,y:(x,y)(xy) indexed by 0-spheres (x,y):S0P, we construct the polygraph P1 defined, for (x,y):S0P, by

U(P1) :=UP (P1)(x,y) :=P(x,y)(x,y)

A transformation (T0) consists in adding, for every element x:X, a new 0-generator x to the polygraph together with a 1-generator τx:xx:

with y=defx, and τx is a notation for the element reflx:(P0)(y,x). A transformation (T1) consists in adding, for every x,y:X and a:(x,y), a 1-generator a:xy:

It can be observed that we have a new hole after performing a transformation (T1), which justifies the importance of the set-truncation in the definition of the presented set. Note that the functions x,y are not used in order to define Q in (T1), but they will be necessary to show the correctness of the transformation below. For instance, if we did not require those, we could make any polygraph coherent by taking (x,y)= for any (x,y):S0P.

 Remark 9.

We could also consider a weaker notion of transformation (T1) where we only require the existence of the 1-cell associated to an added 1-generator, i.e. type the function as x,y:(x,y)xy1. This variant would in fact be enough for the subsequent developments here.

Example 10.

We have the following series of Tietze transformations:

Under the Grothendieck duality between type families and fibrations [19, Section 4.8], the Tietze transformations (T1) can reformulated as follows (a similar reformulation for (T0) could also be given):

Proposition 11.

Transformations (T1) are equivalent to the following:

(T1’)

Given a type X:𝒰 and function :XΣ((x,y):S0P).P(x,y), we construct the polygraph P1 with U(P1):=UP and, for (x,y):SP,

(P1)(x,y):=P(x,y)hfibπ(x,y)

We define the Tietze equivalence as the equivalence relation generated by (T0) and (T1).

Transformations for 0-polygraphs.

The notion of Tietze transformation generalizes to polygraphs in any dimension. In particular, for 0-polygraphs, it can be formulated as follows. An elementary Tietze transformation of 0-polygraphs consists in

(T0)

Given a 0-polygraph P, a type X and a function :XP, we consider the 0-polygraph P0:=PX.

Two 0-polygraphs are Tietze equivalent when they are related by the smallest equivalence relation identifying P with P0 for any P and .

Proposition 12.

There exists a Tietze equivalence between two 0-polygraphs P and Q if and only if they present the same proposition, i.e. P1=Q1.

2.2 Correctness

Our aim is now to show the correctness property for Tietze transformations of 1-polygraphs: equivalent 1-polygraphs present the same set.

Theorem 13 (Correctness).

Given two Tietze equivalent 1-polygraphs P and Q, we have P¯0=Q¯0.

By induction on the equivalence, it is enough to show the result when Q is obtained form P by a Tietze transformation (T0) or (T1), which we do below. Throughout the section, we suppose fixed a 1-polygraph P. We first show that transformations (T0) are correct [13, tietze0-correct]:

Proposition 14.

Given a type X and a function :XUP, we have P¯0=P0¯0.

Proof.

By definition of P0 and its geometric realization, we have a coequalizer

By computing the coequalizer partially on the left component of the coproduct, we find that P0¯ is the coequalizer of . From which we easily deduce P0¯=P¯. The transformations (T0) actually preserve, not only the presented set, but also the geometric realization. We now show that transformations (T1) are correct [13, tietze1-correct]:

Proposition 15.

Given a type X, a function :S0P𝒰, and a family of functions x,y:(x,y)(xy) indexed by 0-spheres (x,y):S0P, we have P¯0=P1¯0.

Proof.

By using the induction principle of geometric realization (Section 1.2), we can define a map s:P¯P1¯ by

s(ι(x)) :=ι(x) aps(γ(a)) :=γ(inl(a))

for x:P0 and a:xy in P1. Conversely, we define a map r:P1¯P¯ by induction by

r(ι(x)) :=ι(x) apr(γ(inl(a))) :=γ(a) apr(γ(inr(b))) :=γx,y(x,y(b))

for x:P0, a:xy in P1, and b:(x,y) for some (x,y):S0P. By induction, they can be shown to form a section-retraction pair, which induces an equivalence on the 0-truncations.

Sequential colimits.

Finally, we show that taking sequential colimits of Tietze transformations preserves correctness. We will see in Theorem 22 that this is not needed (in the sense that the colimiting map can always be constructed without a colimit), but it is often convenient in proofs.

Proposition 16.

Given a diagram where all the maps are elementary Tietze transformations, the canonical map P0colimiPi induces an equivalence on geometric realizations.

Proof.

Since geometric realization is a colimit, by commutation of colimits, we have colimiPi¯=colimiPi¯, and thus colimiPi¯0=colimiPi¯0 because colimits commute to truncation [16, Corollary 7.7]. Finally, we conclude using the fact that the canonical map P0¯0colimiPi¯0 is an equivalence, because a colimit of equivalences is an equivalence.

Example 17 (Fractal snowflakes).

Consider the space X:=S1S1, generated by a point  and two loops a,b:=. As an application of the correctness theorem, we show that the loop space ΩX of X (i.e. the type =) is equivalent to F2, the free group on two elements a and b. This is done by generalizing the famous proof that ΩS1= [19, Section 8.1]. We consider the fibration ψ:X𝒰 defined by induction on X by ψ():=F2 and apψ(a), apψ(b) respectively corresponding to right multiplication by a and b. Its total space ΣX.ψ can be computed by using the flattening lemma [19, Section 6.12], and shown to be P¯ where P is the 1-polygraph such that UP:=F2, P(x,y):= when y=xa or y=xb, and P(x,y):= otherwise. This can be pictured as shown below, see also [6, Section 1.3].

Any element x of F2 can be written as a product of generators a, b and their inverses. Among the expressions of x in terms of such products, there is a unique one minimizing the numbers of letters, the minimal expression for x. Its length is called the length of x. We write Pn for the sub-1-polygraph of P whose 0-cells are the elements of F2 of length at most n. It is not difficult to show that Pn+1 is obtained from Pn by a Tietze transformation (T0) adding the elements of length n+1 as 0-cells, attached to the elements of length n obtained by dropping the last generator in the minimal expression. The colimit of the Pi is P and, by Section 2.2 and the fact that geometric realizations commute with colimits, we deduce that P¯ is equivalent to P0¯, which is a point, and thus P¯ is contractible. We now consider the universal fibration ϕ:X𝒰 defined by ϕ(x):=(=x). It is well-known that ΣX.ϕ is also contractible [19, Lemma 3.11.8], so we have ΣX.ϕ=ΣX.ψ. Furthermore, we can define a fiberwise map ϕ(x)ψ(x) by transport, hence, by [19, Theorem 4.7.7], we have an equivalence ΩX=ϕ()ψ()=F2.

2.3 Completeness

We now show a converse completeness result: any two 1-polygraphs presenting the same set are Tietze equivalent. Throughout the section, we thus suppose fixed two 1-polygraphs P and Q such that we have an equality P¯0=Q¯0. We write f:P¯0Q¯0 and g:Q¯0P¯0 for the components of the induced equivalence between the two types. Our goal is to show that the 1-polygraphs P and Q are equivalent. We should point out that this part has not (yet) been fully formalized in Agda.

In this section, we also need to suppose that the axiom of choice is satisfied. It is known to be consistent with homotopy type theory [19, Lemma 3.8.2], and can be formulated as follows:

Axiom 18.

The axiom of choice assumes an inhabitant of the type

Π(x:A).B(x)1Π(x:A).B(x)1

for every A:𝒰 and B:A𝒰.

Informally, this axiom states that any family of merely inhabited types is itself merely inhabited.

Proving the completeness result in Theorem 22 below requires us to first show some technical lemmas. We begin by observing that the maps f and g can be lifted to maps between the underlying types of 0-generators.

Proposition 19.

There merely exist maps f^:UPUQ and g^:UQUP such that

|ι(f^(x))|0 =f(|ι(x)|0) |ι(g^(y))|0 =g(|ι(y)|0)

for x:UP and y:UQ.

Proof.

We define a map f by

where the rightmost map is the one defined in Section 1.2. By the axiom of choice, we deduce the existence of a map

f^:UPUQ1

satisfying the required identity. The map g^ is constructed similarly. We then show that any 1-generator in P induces a 1-cell in Q between the image of its endpoints.

Lemma 20.

Given a 1-generator a:xy in P, there merely exists a 1-cell f^(x)f^(y) in Q, that we call f^(a) in the following.

Proof.

By definition of the geometric realization, the 1-generator a induces an equality γ(a):ι(x)=ι(y) in P¯, and thus, by functoriality of f and ||0, an equality

apf(|γ(a)|0):f(|ι(x)|0)=f(|ι(y)|0)

Since, by Section 2.3, we have |ι(f^(x))|0=f(|ι(x)|0) (and similarly for y), there is an equality

|ι(f^(x))|0=|ι(f^(y))|0

and we deduce, by Section 1.2, the existence of a 1-cell f^(x)f^(y) as desired. Furthermore, the maps f^ and g^ are mutually inverse modulo post-composition by |ι()|0.

Lemma 21.

For every x:UP, we have |ι(g^(f^(x)))|0=|ι(x)|0 in P¯0 (and similarly, we have |ι(f^(g^(x)))|0=|ι(y)|0 for y:UQ).

Proof.

Given x:UP, by Section 2.3 and the fact that f and g are mutually inverse maps, we have |ι(g^(f^(x)))|0=g(|ι(f^(x))|0)=g(f(|ι(x)|0))=|ι(x)|0. Finally, we can show the completeness theorem.

Theorem 22 (Completeness).

Consider two 1-polygraphs P and Q such that P¯0=Q¯0. Then, assuming the axiom of choice, P and Q are merely Tietze-equivalent.

Proof.

Starting from the polygraph P, we are going to construct step-by-step a polygraph P3 that contains both P and Q and is Tietze-equivalent to P (and thus to Q by symmetry).

  1. 1.

    We add the 0-generators of Q. We write P1:=P0g^ for the polygraph obtained from P by performing a transformation (T0) with g^:UQUP. Its type of 0-generators is UPUQ and the 1-generators are those of P together with one 1-generator g^(x)x for every x:UQ.

  2. 2.

    We add the relations from P to Q. Given a 0-generator x:UP, we claim that there exists a 1-cell f^(x)x in P1. By previous step, we have a cell

    a:g^(f^(x))f^(x)

    Moreover, by Section 2.3, we have |ι(g^(f^(x)))|0=|ι(x)|0, so the type g^(f^(x))x1 is inhabited by Section 1.2, and we can suppose that we actually have a 1-cell

    u:g^(f^(x))x

    because we are eliminating to a proposition. Hence, we can define a 1-cell wx:f^(x)x by wx:=a::u for every x:UP. Finally, we consider the function

    :UP1 Σ((x,y):S0P1).(xy)
    x ((f^(x),x),wx)

    and define P2:=P11 by a transformation (T1’), see Section 2.1.

  3. 3.

    We add the 1-generators of Q. Given a 1-generator b:xy in Q, we have 1-generators a:g(x)x and c:g(y)y in P2 (by the first step), and we have the 1-cell g(a):g(x)g(y) by Section 2.3. We therefore have a 1-cell

    ag(b)c:xy

    in Q. This induces a function

    :Σ((x,y):S0Q).Q(x,y)Σ((x,y):S0P2).(xy)

    which, to (x,y):S0Q and a:Q(x,y) associates the pair consisting of (x,y) (or rather its image under the canonical inclusion) and the 1-cell constructed above. Finally, we define P3:=P21 by a transformation (T1’).

In the 1-polygraph P3 constructed above, the 0-generators are UP3=UPUQ and the 1-generators are (up to canonical inclusion): those of P, those of Q (by the third step), g^(x)x for x:UQ (by the first step), f^(x)x for x:UP (by the second step). By exchanging the roles of P and Q, we see that Q is also Tietze-equivalent to the above 1-polygraph (up to standard isomorphisms such as commutation of coproducts). By transitivity, we conclude that P and Q are Tietze-equivalent.

3 Functors between 1-polygraphs

There is a natural notion of morphism between 1-polygraphs. In practice, it is however too restrictive because it requires sending 1-generators to 1-generators, whereas we often need to send 1-generators to 1-cells. In order to allow for this, we then introduce the notion of functor between 1-polygraphs.

3.1 Morphisms

A morphism F:PQ between two 1-polygraphs P and Q consists of a function UF:UPUQ between 0-generators together with a function

F:Π((x,y):S0P).P(x,y)Q(UFx,UFy)

sending 1-generators to 1-generators. In other words, this corresponds to a morphism of graphs. Those can be composed in the expected way, and the resulting operation is associative and unital.

We write PQ for the type of isomorphisms between 1-polygraphs. The structure identity principle [19, Section 9.8] ensures that identities correspond to those in the sense that the canonical map (P=Q)(PQ) from identities to isomorphisms is an equivalence.

3.2 Functors

Given two 1-polygraphs P and Q, a functor F:PQ consists of a function UF:UPUQ together with a function

F:Π((x,y):S0P).P(x,y)Q(UFx,UFy)

In the following, for simplicity, we often simply write F instead of UF, and leave implicit the first argument of the above function F. Note that any morphism can canonically be seen as functor.

Given a functor F:PQ, we write

F:Π((x,y):S0P).P(x,y)Q(UFx,UFy)

for the canonical extension of F to 1-cells (as opposed to 1-generators), defined by

F(id) :=id F(a::u) :=Fa::Fu F(a::u) :=(Fa)op::Fu

Given two functors F:PQ and G:QR, their composite is the functor FG:PQ defined by U(FG):=UGUF and (FG)(a):=G(Fa). The composition thus defined is associative and unital. It could alternatively be defined as a Kleisli construction based on the free category monad on 1-polygraphs (details left to the reader).

A functorial equivalence between two 1-polygraphs P and Q consists of two functors F:PQ and G:QP together with a family of cells

ηx:x G(Fx) εy:F(Gy) y

for every 0-generators x:UP and y:UQ.

Given a polygraph P, the identity functorial equivalence between P and itself is defined by F=G=IdP and ηx=εx=idx. Given two equivalences (F,G,η,ε):PQ and (F,G,η,ε):QR, we define their composite as the functorial equivalence between P and R consisting of the functors FF and GG together with the families of morphisms

    

This composition can be shown to be associative and unital. Moreover, any equivalence (F,G,η,ε):PQ admits the equivalence (G,F,εop,ηop):QP as inverse (the opposite is taken pointwise).

3.3 Functions induced by functors

Any functor F:PQ induces a function F¯:P¯Q¯ between the corresponding geometric realizations defined, using the elimination principle of Section 1.2, by

F¯x :=ι(Fx) F¯a :=γ(Fa)

for x:UP and a:xy a 1-generator in P, where the map γ is defined in Section 1.2. The following is shown in [13, equivalence-pres].

Proposition 23.

By the above construction, any functorial equivalence (F,G,η,ε):PQ induces an equivalence P¯0Q¯0.

Proof.

Consider the functions F¯0:P¯0Q¯0 and G¯0:Q¯0P¯0. Given x:P¯0, our aim is to show that G¯0F¯0(x)=x. Since this type is a proposition, and thus a set, it is enough to construct a function ϕ:Π(x:P¯).(G¯0(|F¯(x)|0)=x) which can be done by induction on x. Namely, for x:UP, we have ϕ(ιx):=|γ(ηxop)|0 and, for a:P(x,y), ϕ(ιa) is canonically given by the fact that P¯0 is a set. We can similarly show that F¯0G¯0(y)=y for y:Q¯0, thus allowing us to conclude.

 Remark 24.

It is not true that a functorial equivalence between P and Q induces an equivalence P¯Q¯ between the corresponding geometric realizations (as opposed to presented sets). For instance, consider the polygraph P with only one 0-cell and the polygraph Q with one 0-cell and one 1-cell, whose geometric realizations are respectively the point and the circle: they are functorially equivalent, but their realizations are not.

The above proposition allows us to recover in a “constructive” way the correctness property of Tietze transformations (Theorem 13). Namely, one can show [13, preservation]:

Proposition 25.

Any Tietze equivalence between two 1-polygraphs P and Q induces a functorial equivalence between them.

Proof.

Since functorial equivalences are closed under identities, composition and inverses, it is enough to show that any elementary Tietze transformation induces a functorial equivalence between the corresponding polygraphs.

(T0)

Given a type X and a function :XUP, we consider the functor F:PP0 which is the canonical inclusion and the functor G:P0P defined by

G(x) :={xif x:UP,(x)if x:X, G(a:xy) :={a::idif x,y:UP,idxif x:UP and y:X.

We take ηx:=idx for x:UP, and εy:F(Gy)y is defined as idy for y:UP and as the 1-cell corresponding to the canonical 1-generator yy given by definition of (T0) for y:X.

(T1)

Given a function :S0P𝒰 and functions x,y:(x,y)(xy), we consider the functor F:PP1 which is the canonical inclusion and the functor G, which is the identity on 0-cells and

G(a:xy):={aif a:P(x,y)x,y(a)if a:(x,y)

together with ηx and εy being both identities for x:UP and y:U(P1).

To sum up, we have introduced three notions of equivalence for 1-polygraphs: Tietze equivalence, functorial equivalence, and equivalence of presented set. The above theorems show that these three notions coincide (Theorems 13, 22, 3.3, and 3.3).

4 Transfer of coherence

In a polygraph, cells can be understood as describing the “coherence” of the data, i.e. all the relations it should satisfy. In particular, if we see a 1-polygraph as presenting a proposition (the proposition presented by the underlying 0-polygraph, in the sense of Section 1), the 1-generators should inform us that we can identify any two 0-generators, since the only relevant data is the presence of such a 0-generator. More formally, the presented set should coincide with the presented proposition: P¯0=UP¯1. We formalize this here and provide conditions for ensuring that we are in such a coherent situation, as well as tools to transfer coherence from a 1-polygraph to another.

4.1 Coherent presentations

A coherence structure on a 1-polygraph is the data of a 1-cell xy for every 0-sphere x,y:S0P. We say that a 1-polygraph is coherent when it admits a coherence structure. Note that any 0-polygraph P can be extended into a coherent 1-polygraph by adding one 1-generator between every two 0-generators. We are however interested here in constructing coherent extensions of P which are “small” (or, at least, combinatorially manageable). The techniques developed here should moreover extend to the case of higher-dimensional polygraphs, where the situation is much more involved [1].

4.2 The transfer theorem

Suppose given a 1-polygraph P, a 0-polygraph Q and a Tietze equivalence of 0-polygraphs between UP and Q (see Section 2.1). We show that when P is coherent, we can transfer its coherence structure to an extension of Q, which is moreover finite when the one of P is. Namely, we can construct a transferred 1-polygraph Q with UQ=defQ by induction on the Tietze equivalence as follows [13, extension]:

(E+)

if Q was obtained from UP by an elementary Tietze transformation, i.e. there is a type X and a function :XUP such that Q=UPX, we define

Q(x,y):={P(x,y)if x,y:UPx=(y)if x:UP and y:Xotherwise

so that there is a Tietze transformation of 1-polygraphs (T0) between P and Q, in the sense that we have Q:=P0,

(E)

if UP was obtained from Q by an elementary Tietze transformation, i.e. there is a type X and a function :XQ such that UP=QX, we define

Q(x,y):=Σ(x,y:UPX).P(x,y)×(x=(x))×(y=(y))

where :QXQ is defined by

(x):={xif x:Q,(x)if x:X,
(E)

the cases of reflexivity and transitivity are handled by identity and composition.

Example 26.

Consider the following discrete polygraphs P and Q:

P=Q=

We have that UP is obtained from Q by an elementary Tietze transformation of 0-polygraphs with X=1 and :1Q defined by y=y, where we write y for the canonical element of 1. The resulting 1-polygraph Q (obtained by transfer) is thus Q=. The polygraphs P and Q are Tietze equivalent: we have the Tietze transformations

We will show in Theorem 28 that there is always a Tietze equivalence when P is coherent, but the equivalence produced by the proof of the theorem will rather be the following one:

 Remark 27.

Consider the variant of the previous example where P is the same 1-polygraph with the 1-generator yy removed and Q is left unchanged. In this case, the resulting polygraph Q is the same as in previous example. However, the two polygraphs are not Tietze equivalent. Namely, we have P¯0=2 and Q¯0=1, and a Tietze equivalence would thus be in contradiction with Theorem 13. Note that the polygraph P is not coherent.

We now show the following transfer theorem which states that a Tietze equivalence between 0-polygraphs can be extended as a Tietze equivalence between 1-polygraphs when one of them is coherent [13, transfer]. Section 4.2 illustrates why the coherence hypothesis is required.

Theorem 28 (Transfer theorem).

When P is coherent, the above polygraphs P and Q are Tietze equivalent.

Proof.

As above for the construction of Q, we reason by induction on the Tietze equivalence between UP and Q. In the case (E+), Q is obtained from P by a Tietze transformation (T0) and we conclude immediately.

The interesting case to handle is (E), where UP=QX for some type X and :XQ. In this case, we are going to construct a series of 1-polygraphs, which are elementarily Tietze equivalent, thus exhibiting a Tietze equivalence between P and Q, as illustrated in Section 4.2. It is natural to consider the 1-polygraph R obtained from Q by performing the “same Tietze transformation”, but with 1-polygraphs instead of 0-polygraphs, i.e. to consider R:=Q0. Clearly, P and R have the same 0-generators, but not the same 1-generators, and we will show that both are equivalent to a third 1-polygraph S, still with the same 0-cells, and with the union of the 1-generators of P and those of Q as 1-cells. Formally, we thus define the polygraph S, as well as a variant S~, by

US =US~=UP S(x,y) =P(x,y)Q(x,y) S~(x,y) =Q(x,y)P(x,y)

We claim that we have a series of Tietze transformations

P(T1)SS~(T1)R(T0)Q

as illustrated in Section 4.2. Those can be constructed as follows.

  • P(T1)S. The coherence of P provides us, for every 0-sphere (x,y), with a cell xy. This allows us to define a family of functions, indexed by 0-spheres (x,y):S0P, x,y:S(x,y)(xy), so that we have S=defP1.

  • SS~. The polygraphs S and S~ are clearly isomorphic, in the sense of Section 3.1.

  • R(T1)S~. We define a family of functions indexed by 0-spheres (x,y):S0R, and ~x,y:P(x,y)(xy) by

    ~x,y(a):={a::idif x:Q and y:Qτx::a::idif x:X and y:Qa::τy::idif x:Q and y:Xτx::a::τy::idif x:X and y:X

    where, for x:X, the 1-generator τx:xx is canonically given by the definition of R from Q by a Tietze transformation (T0). We then have S~=defR1~.

  • R(T0)Q. The transformation (T0) from Q to R is given by the very definition of R.

5 Conclusion and future work

We have introduced the notion of 1-polygraph in homotopy type theory, as well as the associated Tietze transformations, for which we have shown correctness, completeness and coherence transfer properties. We believe that this work can be generalized in higher dimensions. Although the situation is more involved, for every (n1)-sphere in an (n+1)-polygraph, there is an induced 1-polygraph with the n-cells in the sphere as 0-generators and (n+1)-cells (or, rather, the “(n+1)-atoms”) as 1-generators, which should allow us reusing the properties shown above (this approach is for instance used in [14] to study coherent cartesian polygraphs). In particular, the case of 2-polygraphs would allow us to expand on the setting developed by Kraus and von Raumer in [10] (by defining Tietze transformations, etc.) and the case of 3-polygraphs would be particularly interesting since it would allow us studying coherent presentations of groups, and thus provide us with new tools to perform computations on those (their low-dimensional cohomology for instance). Some work in this direction is already present in our formal developments [13].

References

  • [1] Dimitri Ara, Albert Burroni, Yves Guiraud, Philippe Malbos, François Métayer, and Samuel Mimram. Polygraphs: from rewriting to higher categories. Cambridge University Press, 2025.
  • [2] Franz Baader and Tobias Nipkow. Term rewriting and all that. Cambridge University Press, 1998.
  • [3] Christopher J Dean, Eric Finster, Ioannis Markakis, David Reutter, and Jamie Vicary. Computads for weak ω-categories as an inductive type. Advances in Mathematics, 450, 2024.
  • [4] Yves Guiraud and Philippe Malbos. Identities among relations for higher-dimensional rewriting systems. In Operads 2009, volume 26 of Séminaires et congrès, pages 145–161. Société Mathématique de France, 2013.
  • [5] Yves Guiraud and Philippe Malbos. Polygraphs of finite derivation type. Mathematical Structures in Computer Science, 28(2):155–201, 2018. doi:10.1017/S0960129516000220.
  • [6] Allen Hatcher. Algebraic Topology. Cambridge University Press, 2002.
  • [7] Simon Henry and Samuel Mimram. Tietze equivalences as weak equivalences. Applied Categorical Structures, 30(3):453–483, 2022. doi:10.1007/S10485-021-09662-W.
  • [8] Donald E. Knuth and Peter B. Bendix. Simple word problems in universal algebras. In Computational problems in abstract algebra, pages 263–297. Pergamon, 1970.
  • [9] Nicolai Kraus and Jakob von Raumer. Path spaces of higher inductive types in homotopy type theory. In 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–13. IEEE, 2019. doi:10.1109/LICS.2019.8785661.
  • [10] Nicolai Kraus and Jakob von Raumer. A rewriting coherence theorem with applications in homotopy type theory. Mathematical Structures in Computer Science, 32(7):982–1014, 2022. doi:10.1017/S0960129523000026.
  • [11] Yves Lafont. A new finiteness condition for monoids presented by complete rewriting systems (after Craig C. Squier). Journal of Pure and Applied Algebra, 98(3):229–244, 1995.
  • [12] Yves Lafont, François Métayer, and Krzysztof Worytkiewicz. A folk model structure on omega-cat. Advances in Mathematics, 224(3):1183–1231, 2010.
  • [13] Samuel Mimram. Polygraphs in Agda. Software, swhId: swh:1:dir:27f2a0c3a496b72c3f4cd458ab51ea174f448eb7 (visited on 2025-06-23). URL: https://github.com/smimram/agda-polygraphs, doi:10.4230/artifacts.23666.
  • [14] Samuel Mimram. Categorical coherence from term rewriting systems. In Marco Gaboardi and Femke van Raamsdonk, editors, 8th International Conference on Formal Structures for Computation and Deduction (FSCD), volume 260 of LIPIcs, pages 16:1–16:17. Schloss Dagstuhl, 2023. doi:10.4230/LIPICS.FSCD.2023.16.
  • [15] Maxwell Herman Alexander Newman. On theories with a combinatorial definition of “equivalence”. Annals of mathematics, 43(2):223–243, 1942.
  • [16] Kristina Sojakova, Floris van Doorn, and Egbert Rijke. Sequential colimits in homotopy type theory. In Holger Hermanns, Lijun Zhang, Naoki Kobayashi, and Dale Miller, editors, LICS ’20: 35th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 845–858. ACM, 2020. doi:10.1145/3373718.3394801.
  • [17] Craig C Squier, Friedrich Otto, and Yuji Kobayashi. A finiteness condition for rewriting systems. Theoretical Computer Science, 131(2):271–294, 1994. doi:10.1016/0304-3975(94)90175-9.
  • [18] Heinrich Tietze. Über die topologischen Invarianten mehrdimensionaler Mannigfaltigkeiten. Monatshefte für Mathematik und Physik, 19:1–118, 1908.
  • [19] The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. https://homotopytypetheory.org/book, Institute for Advanced Study, 2013.
  • [20] Andrea Vezzosi, Anders Mörtberg, and Andreas Abel. Cubical Agda: a dependently typed programming language with univalence and higher inductive types. Proceedings of the ACM on Programming Languages, 3:1–29, 2019. doi:10.1145/3341691.