Certification of Matrix Interpretations in Coq Adam Koprowski and Hans Zantema Eindhoven University of Technology Department of Mathematics and Computer Science 29 June 2007 WST A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 1 / 16
Outline CoLoR 1 Formalization of matrix interpretations 2 Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations Certified competition 3 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 2 / 16
Outline CoLoR 1 Formalization of matrix interpretations 2 Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations Certified competition 3 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 3 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR overview CoLoR CoLoR: Coq Library on Rewriting and Termination. Goal: certification of termination proofs produced by various termination provers. How to do that? CoLoR approach: TPG: common format for termination proofs. Tools output proofs in TPG format. CoLoR: a Coq library of results on termination. Rainbow: a tool for translation from proofs in TPG format to Coq proofs, using results from CoLoR. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 4 / 16
CoLoR architecture overview A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16
CoLoR architecture overview A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16
CoLoR architecture overview A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16
Outline CoLoR 1 Formalization of matrix interpretations 2 Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations Certified competition 3 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 6 / 16
Example z086.trs a ( a ( x )) → c ( b ( x )) , b ( b ( x )) → c ( a ( x )) , c ( c ( x )) → b ( a ( x )) Matrix interpretation for z086.trs � 1 � 0 0 0 1 � � 0 0 0 1 0 a ( x ) = x + 0 1 0 2 2 0 1 0 0 0 � 1 � 0 1 0 0 � � 0 2 0 1 1 b ( x ) = x + 0 1 0 0 0 0 0 0 0 0 � 1 � 0 0 0 2 � � 0 0 1 1 0 c ( x ) = x + 0 1 0 2 1 0 0 0 0 0 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 7 / 16
Example z086.trs a ( a ( x )) → c ( b ( x )) , b ( b ( x )) → c ( a ( x )) , c ( c ( x )) → b ( a ( x )) Matrix interpretation for z086.trs � 1 � 0 0 0 1 � � 0 0 0 1 0 a ( x ) = x + 0 1 0 2 2 0 1 0 0 0 � 1 � 0 1 0 0 � � 0 2 0 1 1 b ( x ) = x + 0 1 0 0 0 0 0 0 0 0 � 1 � 0 0 0 2 � � 0 0 1 1 0 c ( x ) = x + 0 1 0 2 1 0 0 0 0 0 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 7 / 16
Example ctd. Termination proof for z086.trs � 1 � �� 1 � 0 � 0 0 0 1 0 0 1 � �� � 0 0 0 1 0 0 0 1 0 0 a ( a ( x )) = x + + 0 1 0 2 0 1 0 2 2 2 0 1 0 0 0 1 0 0 0 0 � 1 � �� 1 � 0 � 0 0 0 2 1 0 0 � �� � 0 0 1 1 0 2 0 1 1 0 c ( b ( x )) = x + + 0 1 0 2 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 8 / 16
Example ctd. Termination proof for z086.trs � 1 � �� 1 � 0 � 0 0 0 1 0 0 1 � �� � 0 0 0 1 0 0 0 1 0 0 a ( a ( x )) = x + + 0 1 0 2 0 1 0 2 2 2 0 1 0 0 0 1 0 0 0 0 � 1 � 0 1 0 1 � � 0 1 0 0 0 = x + 0 2 0 1 2 0 0 0 1 0 � 1 � �� 1 � 0 � 0 0 0 2 1 0 0 � �� � 0 0 1 1 0 2 0 1 1 0 c ( b ( x )) = x + + 0 1 0 2 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 � 1 � 0 1 0 0 � � 0 1 0 0 0 = x + 0 2 0 1 2 0 0 0 0 0 A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 8 / 16
Monotone algebras Definition (An extended weakly monotone Σ -algebra) A weakly monotone Σ -algebra ( A , [ · ] , >, � ) is a Σ -algebra ( A , [ · ]) equipped with two binary relations > , � on A such that: > is well-founded; > · � ⊆ > ; for every f ∈ Σ the operation [ f ] is monotone with respect to > . Theorem Let R , R ′ be TRSs over a signature Σ , ( A , [ · ] , >, � ) be an extended monotone Σ -algebra such that: [ ℓ, α ] � [ r , α ] for every rule ℓ → r in R , for all α : X → A and [ ℓ, α ] > [ r , α ] for every rule ℓ → r in R ′ and for all α : X → A. Then SN ( R ) implies SN ( R ∪ R ′ ) . A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 9 / 16
Monotone algebras Definition (An extended weakly monotone Σ -algebra) A weakly monotone Σ -algebra ( A , [ · ] , >, � ) is a Σ -algebra ( A , [ · ]) equipped with two binary relations > , � on A such that: > is well-founded; > · � ⊆ > ; for every f ∈ Σ the operation [ f ] is monotone with respect to > . Theorem Let R , R ′ be TRSs over a signature Σ , ( A , [ · ] , >, � ) be an extended monotone Σ -algebra such that: [ ℓ, α ] � [ r , α ] for every rule ℓ → r in R , for all α : X → A and [ ℓ, α ] > [ r , α ] for every rule ℓ → r in R ′ and for all α : X → A. Then SN ( R ) implies SN ( R ∪ R ′ ) . A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 9 / 16
Formalization of monotone algebras Monotone algebras are formalized as a functor. Apart for the aforementioned requirements there is one additional required to deal with concrete examples: > T and � T must be decidable. More precisely the requirement is to provide a relation ≫ , such that ≫ ⊆ > T and ≫ is decidable similarly for � . The structure returned by the functor contains all the machinery required to prove (relative)-(top)-termination in Coq. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 10 / 16
Formalization of monotone algebras Monotone algebras are formalized as a functor. Apart for the aforementioned requirements there is one additional required to deal with concrete examples: > T and � T must be decidable. More precisely the requirement is to provide a relation ≫ , such that ≫ ⊆ > T and ≫ is decidable similarly for � . The structure returned by the functor contains all the machinery required to prove (relative)-(top)-termination in Coq. A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 10 / 16
Recommend
More recommend