32
Computational Paths, identity type, and the groupoid model LSFA 2015 Arthur Freitas Ramos Ruy de Queiroz Anjolina de Oliveira

Computational paths, identity type and groupoid model

Embed Size (px)

Citation preview

Page 1: Computational paths, identity type and groupoid model

Computational Paths, identitytype, and the groupoid model

LSFA 2015 Arthur Freitas Ramos

Ruy de Queiroz

Anjolina de Oliveira

Page 2: Computational paths, identity type and groupoid model

Motivation

• Mathematics becoming increasingly abstract and complex

• Automatic Proof Checkers

• Type Theory: Identity type as a bridge between computer science andmath

• Objective: To propose a more intuitive approach to the identity type

Page 3: Computational paths, identity type and groupoid model

Intensional Identity Type

• Witness p as proof of propositional equality between two objects of thesame type

• Connection between extensionality and intensionality

• Homotopy Type Theory: Semantic connection with homotopy (paths)

• HOFMANN - STREICHER 1994: Groupoid structure refutes the principle ofthe unicity of proofs of equality

• LUMSDAINE 2009: weak structure

Page 4: Computational paths, identity type and groupoid model

Identity Type: Formal Construction

Page 5: Computational paths, identity type and groupoid model

Identity Type: New Approach

• We propose a new approach to the identity type

• Objective: to be more intuitive than the classic approach

• Based on Computational Paths, entity originally proposed by Gabbay and Ruy de Queiroz in 1994

• Paths as part of the syntax of type theory: algebra of paths (or calculus of paths)

• Main objectives of this work: Detailed explanation of our new approach andproof of essential properties, such as the groupoid structure

Page 6: Computational paths, identity type and groupoid model

Beta Equality

• Given terms P e Q if we say that they are if:

• reduction:

• reduction together with : theory of

Page 7: Computational paths, identity type and groupoid model

Theory of Lambda-Beta-Eta Equality

• Axiom:

• Inference rules:

Page 8: Computational paths, identity type and groupoid model

Equality Theory for the Product Type

Page 9: Computational paths, identity type and groupoid model

Computational Paths

• Composition of axioms and inference rules s that establishes thepropositional equality between two terms a : A and b : A

• Notation a =s b : A

• Composition done by applications of the transitivity

Page 10: Computational paths, identity type and groupoid model

Computational Paths: Example

• Path between and :

From we obtain

From we obtain

To obtain the final path between and , we just need toconcatenate both paths using the transitivity, obtaining:

Page 11: Computational paths, identity type and groupoid model

Type Identity as the Type of ComputationalPaths: Formalization

Page 12: Computational paths, identity type and groupoid model

Type Identity as the Type of ComputationalPaths: Formalization

Page 13: Computational paths, identity type and groupoid model

Usage example: Symmetry

• Construction of :

Page 14: Computational paths, identity type and groupoid model

Usage example: Transitivity

• Construction of :

Page 15: Computational paths, identity type and groupoid model

Term Rewriting System – LNDEQ-TRS

• Reduction between different paths

• Simple examples: and ; and

• Anjolina (1994) and Ruy & Anjolina (2011): Term rewriting system –LNDEQ-TRS

• Total of 39 reduction rules – 7 essential to the current work

Page 16: Computational paths, identity type and groupoid model

Reductions Involving Symmetry andReflexivity

• Obtained rules:

Page 17: Computational paths, identity type and groupoid model

Reductions Involving Transitivity

• Obtained rules:

Page 18: Computational paths, identity type and groupoid model

Reductions Involving Transitivity

• Obtained rule:

Page 19: Computational paths, identity type and groupoid model

rw-equality

• Each LNDEQ-TRS is known as rw – rule

• From s to t in 1 rule:

• From s to t in multiple rules:

• Rw-equality s =rw t: sequence R0, ....., Rn , with such that:

• Rw-equality is an equivalence class (since it has been defined as a transitive, symmetric and reflexive closure)

Page 20: Computational paths, identity type and groupoid model

LNDRW-TRS2 – Redundancies between Paths ofPaths• Redundancies caused by rw-equality

• There is a version for each redunction previously showed

• Exemple:

Page 21: Computational paths, identity type and groupoid model

rw2-equality

• Rw2-equality: similar to rw-equality

• Rw2 is an equivalence class (analogous to rw)

• Special rule cd2:

Page 22: Computational paths, identity type and groupoid model

Category Arw Induced by Computational Paths

• Objects: terms a: A

• Morphisms: Paths s between objects a,b: A. iff a =s b

• Composition:

• Identity:

• Weak category: Equality holds only up to rw-equality

• Associativity:

• Identity Laws:

Page 23: Computational paths, identity type and groupoid model

ARW is a Weak Groupoid

• Every arrow is an isomorphism

• We need to show that every morphism s has an inverse morphism t

• Set :

Page 24: Computational paths, identity type and groupoid model

Higher Strucure: 2 - Arw

• Category A2rw(a,b) for each pair of objects Arw

• Objects of A2rw(a,b) are paths s: a =s b and morphisms between paths s,r are sets of rw-equalities s =rw r

• Associativity and transitivity hold weakly up to rw2-equality(analogous to Arw)

• Considering equivalence classes of rw2, equalities hold “on the nose” on the second level. Structure [2 – Arw]

• Is [2 – Arw] a bicategory? Is it a weak 2-grupoid?

Page 25: Computational paths, identity type and groupoid model

Bicategory

• Horizontal Composition

• Associativity and identity of the horizontal composition

• Interchange law

• Coherence law: Mac Lane’s pentagon and triangle

Page 26: Computational paths, identity type and groupoid model

[2 – Arw] is a Bicategory

• Horizontal composition :

Given:

We define as:

Page 27: Computational paths, identity type and groupoid model

[2 – Arw] is a Bicategory

• Associativity assoc of : Natural isomorphism between

Given by the isomorphism of each component:

• Identity :

We only need to check each component:

Analogous to : Use trr

Page 28: Computational paths, identity type and groupoid model

[2 – Arw] is a Bicategory

• Interchange law:

Page 29: Computational paths, identity type and groupoid model

[2 – Arw] is a Bicategory

• Coherence laws:

Page 30: Computational paths, identity type and groupoid model

[2 – Arw]: Results

• We have showed that [2 – Arw] is a bicategory

• From the fact that [2 – Arw] is a bicategory, that A2rw is a weakgroupoid and Arw a groupoid, we conclude that [2 – Arw] is a weak 2-groupoid

• It is possible to think of weak groupoids with higher number of levels. Eventually, we can think of a weak groupoid with an infinite numberof levels, the weak

Page 31: Computational paths, identity type and groupoid model

Conclusion

• We have proposed a new approach based on computer

• Computer paths are present in the syntax of type theory, opposite tobeing only a semantical interpretation

• Using computational paths, it is possible to induce higher groupoids.

• We have obtained results compatible with the ones obtained byHofmann-Streicher for the traditional identity type

Page 32: Computational paths, identity type and groupoid model

Future Work

• Mapping of all possible rw2-rules

• The study of induced weak groupoids with order higher than 2

• Possibility of obtaining, to our approach based on computationalpaths, results similar to the ones obtained by Lumsdaine. In otherwords, to prove that it is possible to induce a