Certification of Matrix Interpretations in Coq Adam Koprowski and - - PowerPoint PPT Presentation

certification of matrix interpretations in coq
SMART_READER_LITE
LIVE PREVIEW

Certification of Matrix Interpretations in Coq Adam Koprowski and - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

Outline

1

CoLoR

2

Formalization of matrix interpretations Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations

3

Certified competition

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 2 / 16

slide-3
SLIDE 3

Outline

1

CoLoR

2

Formalization of matrix interpretations Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations

3

Certified competition

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 3 / 16

slide-4
SLIDE 4

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

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

slide-8
SLIDE 8

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

slide-9
SLIDE 9

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

slide-10
SLIDE 10

CoLoR architecture overview

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16

slide-11
SLIDE 11

CoLoR architecture overview

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16

slide-12
SLIDE 12

CoLoR architecture overview

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 5 / 16

slide-13
SLIDE 13

Outline

1

CoLoR

2

Formalization of matrix interpretations Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations

3

Certified competition

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 6 / 16

slide-14
SLIDE 14

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

a(x) = 1 1 1 1 2 1

  • x +

2

  • b(x) =

1 1 2 1 1

  • x +

1

  • c(x) =

1 2 1 1 1 2

  • x +

1

  • A.Koprowski, H.Zantema (TU/e)

Certification of Matrix Interpretations in Coq 29 June 2007 WST 7 / 16

slide-15
SLIDE 15

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

a(x) = 1 1 1 1 2 1

  • x +

2

  • b(x) =

1 1 2 1 1

  • x +

1

  • c(x) =

1 2 1 1 1 2

  • x +

1

  • A.Koprowski, H.Zantema (TU/e)

Certification of Matrix Interpretations in Coq 29 June 2007 WST 7 / 16

slide-16
SLIDE 16

Example ctd.

Termination proof for z086.trs

a(a(x)) = 1 1 1 1 2 1 1 1 1 1 2 1

  • x +

2

  • +

2

  • c(b(x)) =

1 2 1 1 1 2 1 1 2 1 1

  • x +

1

  • +

1

  • A.Koprowski, H.Zantema (TU/e)

Certification of Matrix Interpretations in Coq 29 June 2007 WST 8 / 16

slide-17
SLIDE 17

Example ctd.

Termination proof for z086.trs

a(a(x)) = 1 1 1 1 2 1 1 1 1 1 2 1

  • x +

2

  • +

2

  • =

1 1 1 1 2 1 1

  • x +

2

  • c(b(x)) =

1 2 1 1 1 2 1 1 2 1 1

  • x +

1

  • +

1

  • =

1 1 1 2 1

  • x +

2

  • A.Koprowski, H.Zantema (TU/e)

Certification of Matrix Interpretations in Coq 29 June 2007 WST 8 / 16

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

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

slide-21
SLIDE 21

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

slide-22
SLIDE 22

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

slide-23
SLIDE 23

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

slide-24
SLIDE 24

Formalization of matrices

Matrices over arbitrary semi-ring of coefficients. a number of basic operations over matrices such as: [·], Mi,j, M + N, M ∗ N, MT, . . . and a number of basic properties such as:

M + N = N + M, M ∗ (N ∗ P) = (M ∗ N) ∗ P monotonicity of ∗ . . .

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 11 / 16

slide-25
SLIDE 25

Formalization of matrices

Matrices over arbitrary semi-ring of coefficients. a number of basic operations over matrices such as: [·], Mi,j, M + N, M ∗ N, MT, . . . and a number of basic properties such as:

M + N = N + M, M ∗ (N ∗ P) = (M ∗ N) ∗ P monotonicity of ∗ . . .

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 11 / 16

slide-26
SLIDE 26

Formalization of matrices

Matrices over arbitrary semi-ring of coefficients. a number of basic operations over matrices such as: [·], Mi,j, M + N, M ∗ N, MT, . . . and a number of basic properties such as:

M + N = N + M, M ∗ (N ∗ P) = (M ∗ N) ∗ P monotonicity of ∗ . . .

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 11 / 16

slide-27
SLIDE 27

Polynomial interpretations in the setting of monotone algebras

A = Z, > = >Z, =≥Z, interpretations represented by polynomials [f(x1, . . . , xn)] = PZ(x1, . . . , xn), >T not decidable (positiveness of polynomial) — heuristics required.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 12 / 16

slide-28
SLIDE 28

Polynomial interpretations in the setting of monotone algebras

A = Z, > = >Z, =≥Z, interpretations represented by polynomials [f(x1, . . . , xn)] = PZ(x1, . . . , xn), >T not decidable (positiveness of polynomial) — heuristics required.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 12 / 16

slide-29
SLIDE 29

Polynomial interpretations in the setting of monotone algebras

A = Z, > = >Z, =≥Z, interpretations represented by polynomials [f(x1, . . . , xn)] = PZ(x1, . . . , xn), >T not decidable (positiveness of polynomial) — heuristics required.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 12 / 16

slide-30
SLIDE 30

Polynomial interpretations in the setting of monotone algebras

A = Z, > = >Z, =≥Z, interpretations represented by polynomials [f(x1, . . . , xn)] = PZ(x1, . . . , xn), >T not decidable (positiveness of polynomial) — heuristics required.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 12 / 16

slide-31
SLIDE 31

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-32
SLIDE 32

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-33
SLIDE 33

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-34
SLIDE 34

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-35
SLIDE 35

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-36
SLIDE 36

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-37
SLIDE 37

Matrix interpretations in the setting of monotone algebras

fix a dimension d, A = Nd, (u1, . . . , ud) (v1, . . . , vd) iff ∀i, ui ≥N vi, (u1, . . . , ud) > (v1, . . . , vd) iff (u1, . . . , ud) (v1, . . . , vd) ∧ u1 >N v1, interpretations represented as: [f(x1, . . . , xn)] = M1x1 + . . . + Mnxn + v where Mi ∈ Nd×d, v ∈ Nd, >T and T are decidable in this case but thanks to introducing ≫ we do not need to prove completeness of their characterization. Domain fixed to N with natural orders > and ≥.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 13 / 16

slide-38
SLIDE 38

Outline

1

CoLoR

2

Formalization of matrix interpretations Introduction to matrix interpretations Monotone algebras Matrices Matrix interpretations

3

Certified competition

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 14 / 16

slide-39
SLIDE 39

Certified competition

In the termination competition this year a new “certified” category was introduced. Participants:

CiME+ A3PAT (polynomial interpretations, LPO, DP) TPA+ CoLoR (polynomial and matrix interpretations, DP) T T T2 + CoLoR (matrix interpretations, DP)

TPA+ CoLoR was the winner with the score of 354. Every successful proof of TPA was using matrix interpretations.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 15 / 16

slide-40
SLIDE 40

Certified competition

In the termination competition this year a new “certified” category was introduced. Participants:

CiME+ A3PAT (polynomial interpretations, LPO, DP) TPA+ CoLoR (polynomial and matrix interpretations, DP) T T T2 + CoLoR (matrix interpretations, DP)

TPA+ CoLoR was the winner with the score of 354. Every successful proof of TPA was using matrix interpretations.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 15 / 16

slide-41
SLIDE 41

Certified competition

In the termination competition this year a new “certified” category was introduced. Participants:

CiME+ A3PAT (polynomial interpretations, LPO, DP) TPA+ CoLoR (polynomial and matrix interpretations, DP) T T T2 + CoLoR (matrix interpretations, DP)

TPA+ CoLoR was the winner with the score of 354. Every successful proof of TPA was using matrix interpretations.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 15 / 16

slide-42
SLIDE 42

Certified competition

In the termination competition this year a new “certified” category was introduced. Participants:

CiME+ A3PAT (polynomial interpretations, LPO, DP) TPA+ CoLoR (polynomial and matrix interpretations, DP) T T T2 + CoLoR (matrix interpretations, DP)

TPA+ CoLoR was the winner with the score of 354. Every successful proof of TPA was using matrix interpretations.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 15 / 16

slide-43
SLIDE 43

The end

http://color.loria.fr Thank you for your attention.

A.Koprowski, H.Zantema (TU/e) Certification of Matrix Interpretations in Coq 29 June 2007 WST 16 / 16