towards a computational justification of the axiom of
play

Towards a Computational Justification of the Axiom of Univalence - PowerPoint PPT Presentation

Towards a Computational Justification of the Axiom of Univalence Simon Huber (j.w.w. Thierry Coquand) University of Gothenburg TYPES 2011, Bergen, September 911 Univalent Foundations for Mathematics Vladimir Voevodsky (2009) formulated


  1. Towards a Computational Justification of the Axiom of Univalence Simon Huber (j.w.w. Thierry Coquand) University of Gothenburg TYPES 2011, Bergen, September 9–11

  2. Univalent Foundations for Mathematics ◮ Vladimir Voevodsky (2009) formulated the Univalence Axiom (UA) in Martin-L¨ of Type Theory as a strong form of the Axiom of Extensionality ◮ Inspired by the interpretation of type theory in homotopy theory, where types are interpreted as homotopy types

  3. Univalent Foundations for Mathematics ◮ Implies that “isomorphic” types satisfy the same statements: A ∼ = B ⇒ P ( A ) ⇒ P ( B ) This does not hold for set theory: { 0 } ∼ = { 1 } and 0 ∈ { 0 } , but 0 / ∈ { 1 } . The constructions of set theory are not invariant under isomorphism! (“problem of equivalence”) ◮ UA also implies functional extensionality : ∀ x : A Id B ( x ) ( f ( x ) , g ( x )) ⇒ Id Π x : A . B ( x ) ( f , g ) .

  4. Univalence Axiom ◮ The Univalence Axiom resolves many problems of formulating mathematics in Martin-L¨ of Type Theory! ◮ But adding axioms destroys the computational structure of type theory! They don’t follow the introduction/elimination structure. ◮ It destroys canonicity! E.g., there are closed terms of type N which don’t reduce to a numeral!

  5. Univalence Axiom ◮ We don’t have a computational justification of the axiom via computation rules ◮ Conjecture (Voevodsky): Given a term t : N using UA, we can effectively find a term t ′ : N not using UA, and a proof of Id N ( t , t ′ ) which may use UA.

  6. Gandy’s Elimination of Extensionality Robin Gandy (JSL 1956) interprets extensional simple type theory into intensional simple type theory. This is done by redefining equality essentially using the technique of logical relations, so equality is defined by induction on types. Extensionality is then expressed as reflexivity of this relation which holds for any given closed term.

  7. General Idea ◮ For now only non-dependent types: N , A → B , A × B : U if A , B : U . ◮ On top of that we add propositions: ⊥ , ⊤ , Id A ( a 0 , a 1 ) , C ⇒ D , C ∧ D , ∃ A ( λ xB ) , ∀ A ( λ xB ) : Ω whenever C , D : Ω, A : U , and B : Ω [ x : A ].

  8. General Idea, cont. ◮ Id A ( a 0 , a 1 ) is defined by induction on the type A : U . For the functions Id A → B ( f , g ) is defined as � � ∀ x , y : A Id A ( x , y ) ⇒ Id B ( fx , gy ) . ◮ We force the equality to be reflexive: Γ ⊢ t : A Γ ⊢ t ′ : Id A ( t , t )

  9. General Idea, cont. ◮ Additionally: Γ ⊢ ρ : Id ∆ ∆ ⊢ t : A : U Γ ⊢ t ρ : Id A ( t ρ 0 , t ρ 1 ) where ρ := [ x 1 = ( a 1 , b 1 , c 1 ) , . . . , x n = ( a n , b n , c n )] , ρ 0 := ( x 1 = a 1 , . . . , x n = a n ) , ρ 1 := ( x 1 = b 1 , . . . , x n = b n ) are explicit substitutions such that Γ ⊢ c i : Id( a i , b i ).

  10. General Idea, cont. ◮ Add computation rules for t ′ and t ρ , e.g., ( r s ) ′ − → r ′ s s s ′ ( λ x . t ) ρ a b c − → t [ ρ, x = ( a , b , c )]

  11. Main Result This system is confluent, normalizing, and satisfies canonicity. In → ∗ ( n , r ) with a numeral n particular: ⊢ t : ∃ N ( λ xB ) implies t [] − and ⊢ r : B ( x = n ).

  12. Example Let F : ( N → N ) → N F := λ h . h 1 + h 2 f : N → N f := λ x . x g : N → N g := λ x . 0 + x . We have a closed proof p : Id N → N ( f , g ). Then: � � F ′ : ∀ f , g : N Id N → N ( f , g ) ⇒ Id N ( Ff , Fg ) so F ′ f g p : Id N (1 + 2 , (0 + 1) + (0 + 2)) We want F ′ f g p to compute to a proof without · ′ !

  13. More Details: Syntax � ::= U | Ω x ::= x U | x Ω (sorted variables) r , s , t , A , B ::= x | rs | λ xt | t σ | t ρ | t ′ | C � t | ˜ C � t σ ::= () | ( σ, x = t ) ρ ::= [] | [ ρ, x = ( r , s , t )]

  14. Constants C ::= N | × |→ | ⊥ | ⊤ | ∧ |⇒| ∃ | ∀ | Id | ∗ | O | S | natrec | natind | ( · , · ) | exelim | �· , ·� | π i | efq | �� | unitelim π i | � C ::= ˜ ˜ 0 | ˜ S | � natrec | ˜ �· , ·�

  15. Typing: σ -substitutions The σ -substitutions are context morphisms: Γ ⊢ Γ ⊢ σ : ∆ Γ ⊢ t : A σ ∆ ⊢ A : Ω Γ ⊢ () : ⋄ Γ ⊢ ( σ, x = t ) : (∆ , x : A ) Γ ⊢ σ : ∆ Γ ⊢ t : A ∆ ⊢ A : U Γ ⊢ ( σ, x = t ) : (∆ , x : A ) Γ ⊢ σ : ∆ ∆ ⊢ t : A : U Γ ⊢ σ : ∆ ∆ ⊢ t : A : Ω Γ ⊢ t σ : A Γ ⊢ t σ : A σ

  16. Typing: ρ -substitutions The ρ -substitutions carry equality proofs: Γ ⊢ Γ ⊢ ρ : Id ∆ Γ ⊢ c : Id A ( a 0 , a 1 ) ∆ ⊢ A : U Γ ⊢ [] : Id ⋄ Γ ⊢ [ ρ, x = ( a 0 , a 1 , c )] : Id ∆ , x : A Γ ⊢ Id ∆ Γ ⊢ a i : A ρ i ∆ ⊢ A : Ω Γ ⊢ [ ρ, x = ( a 0 , a 1 , ∗ )] : Id ∆ , x : A Γ ⊢ ρ : Id ∆ ∆ ⊢ t : A : U Γ ⊢ t ρ : Id A ( t ρ 0 , t ρ 1 ) with [] i := () and [ ρ, x = ( a 0 , a 1 , c )] i := ( ρ i , x = a i ).

  17. Typing, cont. ◮ Reflexivity: Γ ⊢ t : A : U Γ ⊢ t ′ : Id A ( t , t )

  18. Reduction x ( σ, x = s ) − → s x ( σ, y = s ) − → x σ ( r s ) σ − → r σ s σ (C � → C � t ) σ − t σ ( t σ 0 ) σ 1 − → t ( σ 0 σ 1 ) where ( x 1 = t 1 , . . . , x n = t n ) σ := ( x 1 = t 1 σ, . . . , x n = t n σ ) ( λ xt ) σ s − → t ( σ, x = s )

  19. Reduction, cont. Define sort( t ) ∈ { U , Ω } such that Γ ⊢ t : A : � implies sort( t ) = � . For sort( t ) = Ω: t ρ − → ∗ t ′ − → ∗ ∗ s − → ∗ ∗ ρ − → ∗ ∗ ′ − → ∗

  20. Reduction, cont. x [ ρ, x = ( a 0 , a 1 , c )] − → c x [ ρ, y = ( a 0 , a 1 , c )] − → x ρ ( r s ) ρ − → r ρ s ρ 0 s ρ 1 s ρ ( r s ) ′ − → r ′ s s s ′ t ′ σ − → t σ ′ where () ′ := [] and ( σ, x = t ) ′ := [ σ ′ , x = ( t , t , t ′ )] ( λ xt ) ρ a 0 a 1 c − → t [ ρ, x = ( a 0 , a 1 , c )]

  21. Reduction, cont. → ˜ ( C � C � where ( � t , t ) ρ := � t ) ρ − t ρ t ρ, t ρ 0 , t ρ 1 , t ρ t ) ′ − t , t ) ′ := � → ˜ ( C � C � where ( � t ′ t ′ , t , t , t ′ ( t ρ ) σ − → t ( ρσ ) ( t σ ) ρ − → t ( σρ ) where [ . . . , x = ( a 0 , a 1 , c ) , . . . ] σ := [ . . . , x = ( a 0 σ, a 1 σ, c σ ) , . . . ] , ( . . . , x = t , . . . ) ρ := [ . . . , x = ( t ρ 0 , t ρ 1 , t ρ ) , . . . ] .

  22. Reduction, cont. Allow reduction anywhere in a term, except under a λ (no ξ -rule).

  23. Confluence ◮ The parallel reduction technique is not directly applicable ◮ Use a technique by Curien, Hardin, and L´ evy (1991): divide − → into a substitution part − → s (strongly normalizing and → ∗ on − confluent) and − → β . Define − → β w ⊆− → s -normal forms such that: → ∗ t − → β r ⇒ nf s ( t ) − β w nf s ( r ) . Then the confluence of − → follows from the confluence of − → β w .

  24. Normalization ◮ Define computability predicates: A ↓ ( A is a computable type) a � A given a proof of A ↓ ◮ Relativize in A → B , ∀ AB , and ∃ AB to a � A with a ′ � Id A ( a , a ), e.g., ∀ a � A ( a ′ � Id A ( a , a ) ⇒ fa � Ba ) f introduced f � ∀ AB

  25. Normalization, cont. Theorem 1. Γ ⊢ A : Ω & σ ′ � Id Γ ⇒ A σ ↓ , 2. Γ ⊢ t : A : U & ρ � Id Γ ⇒ t ρ i � A & t ρ � Id A ( t ρ 0 , t ρ 1 ) , 3. Γ ⊢ t : A : Ω & σ ′ � Id Γ ⇒ A σ ↓ & t σ � A σ , 4. Γ ⊢ σ : ∆ & ρ � Id Γ ⇒ σρ � Id ∆ , 5. Γ ⊢ ρ : Id ∆ & σ ′ � Id Γ ⇒ ρσ � Id ∆ .

  26. Related and Future Work ◮ Setoid model (Hofmann; Altenkirch LICS 99) ◮ Observational Type Theory (Altenkirch, McBride, Swiestra) ◮ Internalized Parametricity (Bernardy, Moulin) ◮ Add Id Ω ( p , q ) as p ⇔ q , and allow arrow types like A → Ω to get proper substitutivity. ◮ Dependent types! ◮ Allow repeated applications of ρ and · ′ . ◮ Do we get a system where the Univalence Axiom is provable?

  27. Thank you!

Recommend


More recommend