compositional z
play

Compositional Z Confluence for Permutative Conversion Koji Nakazawa - PowerPoint PPT Presentation

Compositional Z Confluence for Permutative Conversion Koji Nakazawa (Nagoya U) joint work with Ken-etsu Fujita (Gunma U) Workshop on Mathematical Logic and its Application 2016.9 @ Kyoto } } } } Confluence M ! ! M 1 M 2 ! ! N } }


  1. Compositional Z Confluence for Permutative Conversion Koji Nakazawa (Nagoya U) joint work with Ken-etsu Fujita (Gunma U) Workshop on Mathematical Logic and its Application 2016.9 @ Kyoto

  2. } } } } Confluence M ! ! M 1 M 2 ! ! ∃ N

  3. } } } } Confluence M Uniqueness of result of computation ! ! M 1 M 2 ! ! ∃ N

  4. } } } } Confluence M Uniqueness of result of computation ! ! M 1 M 2 Consistency of ! ! equational theory ∃ N

  5. This talk • Brief history of confluence of λ -calculus • parallel reduction and Z theorem • Compositional Z: a new confluence proof • simpler proof of λ + permutation rules • Z property for Church-Rosser theorem • quantitative analysis

  6. History of Confluence of λ

  7. λ β • Terms M , N ::= x | λ x . M | MN • Reduction rules ( λ x . M ) N M [ x := N ] → β

  8. History of Confluence of λ β • Church and Rosser (1936) “ Some Properties of Conversion ” • residuals of redexes • Tait and Martin-Löf (19??) • parallel reduction • Takahashi (1995) “ Parallel Reduction in λ -Calculus ” • maximum parallel reduction • Dehornoy and van Oostrom (2008) • Z theorem

  9. � � Z theorem [Dehornoy&van Oostrom 2008] If we find a mapping ( · ) * s.t. � N M � � N ∗ M ∗ then the reduction system is confluent

  10. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  11. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  12. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  13. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  14. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  15. �� � � �� � �� � N M Z theorem [Dehornoy&van Oostrom 2008] Z theorem � � N ∗ M ∗ � M 2 � M 3 � M 4 M 1 � · · · � � M ∗ � � M ∗ � � M ∗ � � · · · N 1 2 3

  16. Confluence of λ β by Z

  17. Confluence of λ β by Z • Takahashi's maximum parallel reduction is Z x ∗ = x ( λ x . M ) ∗ = λ x . M ∗ (( λ x . M ) N ) ∗ = M ∗ [ x := N ∗ ] ( MN ) ∗ = M ∗ N ∗ (M is not abst.)

  18. Confluence of λ β by Z • Takahashi's maximum parallel reduction is Z x ∗ = x ( λ x . M ) ∗ = λ x . M ∗ (( λ x . M ) N ) ∗ = M ∗ [ x := N ∗ ] ( MN ) ∗ = M ∗ N ∗ (M is not abst.) • Key lemmas M → ∗ M ∗ (i) M ∗ [ x := N ∗ ] → ∗ ( M [ x := N ]) ∗ (ii)

  19. � � � � � Confluence of λ β by Z • Proof of the base case ( λ x . M ) N M [ x := N ] � � ( i ) � � ( M [ x := N ]) ∗ M ∗ [ x := N ∗ ] ( ii ) • Key lemmas M → ∗ M ∗ (i) M ∗ [ x := N ∗ ] → ∗ ( M [ x := N ]) ∗ (ii)

  20. � � � � � Confluence of λ β by Z • Proof of the base case ( λ x . M ) N M [ x := N ] � � ( i ) � � ( M [ x := N ]) ∗ M ∗ [ x := N ∗ ] ( ii ) • Key lemmas M → ∗ M ∗ (i) M ∗ [ x := N ∗ ] → ∗ ( M [ x := N ]) ∗ (ii)

  21. � � � � � Confluence of λ β by Z • Proof of the base case ( λ x . M ) N M [ x := N ] � � ( i ) � � ( M [ x := N ]) ∗ M ∗ [ x := N ∗ ] ( ii ) • Key lemmas M → ∗ M ∗ (i) M ∗ [ x := N ∗ ] → ∗ ( M [ x := N ]) ∗ (ii)

  22. Z for Permutative Conversion

  23. Permutative conversion • for natural deduction with ∨ and ∃ [Prawitz 1965] • exchanges order of elimination rules • for normal proofs to have good properties 
 such as the subformula property • makes confluence proofs much harder 
 [Ando 2003]

  24. Exchanging E-Rules . . . . . . . . . . P . Q 1 . Q 2 . . Γ � A 1 � A 2 Γ , A 1 � B � C Γ , A 2 � B � C . . R ( E ∨ ) Γ � B � C Γ � B ( E → ) Γ � C π . . . . . . . . . . . . . Q 1 . R . Q 2 . R . . . Γ , A 1 � B � C Γ � B Γ , A 2 � B � C Γ � B . P ( E → ) ( E → ) Γ � A 1 � A 2 Γ , A 1 � C Γ , A 1 � C ( E ∨ ) Γ � C

  25. (case P with x 1 → Q 1 | x 2 → Q 2 )R Exchanging E-Rules = P[x 1 .Q 1 ,x 2 .Q 2 ]R . . . . . . . . . . P . Q 1 . Q 2 . . Γ � A 1 � A 2 Γ , A 1 � B � C Γ , A 2 � B � C . . R ( E ∨ ) Γ � B � C Γ � B ( E → ) Γ � C π π . . . . . . . . . . . . . Q 1 . R . Q 2 . R . . . Γ , A 1 � B � C Γ � B Γ , A 2 � B � C Γ � B . P ( E → ) ( E → ) Γ � A 1 � A 2 Γ , A 1 � C Γ , A 1 � C ( E ∨ ) Γ � C P[x 1 .Q 1 R, x 2 .Q 2 R]

  26. λ βπ • Terms and eliminators M , N ::= x | λ x . M | ι 1 M | ι 2 M | Me e ::= M | [ x 1 . N 1 , x 2 . N 2 ] • Reduction rules ( λ x . M ) N M [ x := N ] → β ( ι i M )[ x 1 . N 1 , x 2 . N 2 ] N i [ x i := M ] → β M [ x 1 . N 1 , x 2 . N 2 ] e M [ x 1 . N 1 e , x 2 . N 2 e ] → π

  27. λ βπ uniform representation of elimination for → and ∨ • Terms and eliminators M , N ::= x | λ x . M | ι 1 M | ι 2 M | Me e ::= M | [ x 1 . N 1 , x 2 . N 2 ] • Reduction rules ( λ x . M ) N M [ x := N ] → β ( ι i M )[ x 1 . N 1 , x 2 . N 2 ] N i [ x i := M ] → β M [ x 1 . N 1 , x 2 . N 2 ] e M [ x 1 . N 1 e , x 2 . N 2 e ] → π

  28. λ βπ uniform representation of elimination for → and ∨ • Terms and eliminators M , N ::= x | λ x . M | ι 1 M | ι 2 M | Me e ::= M | [ x 1 . N 1 , x 2 . N 2 ] • Reduction rules ( λ x . M ) N M [ x := N ] → β ( ι i M )[ x 1 . N 1 , x 2 . N 2 ] N i [ x i := M ] → β M [ x 1 . N 1 , x 2 . N 2 ] e M [ x 1 . N 1 e , x 2 . N 2 e ] → π left associative permutative conversion (M[x 1 .N 1 ,x 2 .N 2 ])e

  29. λ βπ , for simplicity • Terms and eliminators M , N ::= x | λ x . M | ι M | Me e ::= M | [ x . N ] • Reduction rules ( λ x . M ) N M [ x := N ] → β ( ι M )[ x . N ] N [ x := M ] → β M [ x . N ] e M [ x . Ne ] → π

  30. Where are difficulties? • Parallel reduction for π -reduction • Maximum complete development for 
 the combination of β - and π -reductions

  31. � � � � Parallel reduction for π ? x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] π x [ y . y [ z . z ][ w . w ]] π π x [ y . y [ z . z [ w . w ]]]

  32. � � � � Parallel reduction for π ? x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] π x [ y . y [ z . z ][ w . w ]] π π x [ y . y [ z . z [ w . w ]]]

  33. � � � � Parallel reduction for π ? x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] these steps must be considered as one-step parallel red. π x [ y . y [ z . z ][ w . w ]] π π x [ y . y [ z . z [ w . w ]]]

  34. � � � � Parallel reduction for π ? x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] these steps must be considered as one-step parallel red. π x [ y . y [ z . z ][ w . w ]] π We can avoid parallel reduction by Z π x [ y . y [ z . z [ w . w ]]]

  35. � � � � � � � N M Z for π ? � � N ∗ M ∗ x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] π x [ y . y [ z . z ][ w . w ]] π π x [ y . y [ z . z [ w . w ]]]

  36. � � � � � � � N M Z for π ? � � N ∗ M ∗ x [ y . y ][ z . z ][ w . w ] � � � ������������� � � � π π � � � � � � � � x [ y . y [ z . z ]][ w . w ] x [ y . y ][ z . z [ w . w ]] we have to do π π completely x [ y . y [ z . z ][ w . w ]] π π x [ y . y [ z . z [ w . w ]]]

  37. Z for βπ ? • A naïve definition x ∗ = x ( λ x . M ) ∗ = λ x . M ∗ ( ι M ) ∗ = ι M ∗ (( λ x . M ) N ) ∗ = M ∗ [ x := N ∗ ] (( ι M )[ x . N ]) ∗ = N ∗ [ x := M ∗ ] ( Me ) ∗ = M ∗ @ e ∗ (otherwise) ( M [ x . N ])@ e = M [ x . N @ e ] M @ e = Me (otherwise)

Recommend


More recommend