interoperability between arithmetic proofs using dedukti
play

Interoperability between arithmetic proofs using Dedukti PhD - PowerPoint PPT Presentation

Interoperability between arithmetic proofs using Dedukti PhD supervised by Gilles Dowek & St ephane Graham-Lengrand Fran cois Thir e LSV & LIX November 22, 2018 1/15 Bugs are everywhere! 2/15 Bugs are everywhere! Would you


  1. Interoperability between arithmetic proofs using Dedukti PhD supervised by Gilles Dowek & St´ ephane Graham-Lengrand Fran¸ cois Thir´ e LSV & LIX November 22, 2018 1/15

  2. Bugs are everywhere! 2/15

  3. Bugs are everywhere! Would you trust windows to: ◮ drive your car ◮ be used in a nuclear power station ◮ perform surgery on you 2/15

  4. Proof Assistants (1/2) Coq Theorem proj1 : ∀ ( A B : Prop ), A ∧ B → A . Proof . intros A B H ; destruct H ; assumption . Qed . 3/15

  5. Proof Assistants (1/2) Coq Theorem proj1 : ∀ ( A B : Prop ), A ∧ B Definition proj1’ : ∀ A B : Prop , A ∧ → A . B → A := Proof . fun ( A B : Prop ) ( H : A ∧ B ) ⇒ produces − − − − − → intros A B H ; match H with destruct H ; | conj H0 ⇒ H0 assumption . end . Qed . 3/15

  6. Proof Assistants (2/2) HOL v a l AND1 THM = save thm ( ”AND1 THM” , l e t v a l t12 = mk conj ( t1b , t2b ) v a l th2 = RIGHT BETA(AP THM (RIGHT BETA(AP THM AND DEF t1b )) t2b ) v a l th3 = SPEC t1b (EQ MP th2 (ASSUME t12 ) ) v a l th4 = DISCH t1b (DISCH t2b (ADD ASSUM t2b (ASSUME t1b ) ) ) i n GEN t1b (GEN t2b (DISCH t12 (MP th3 th4 ) ) ) end ) ; 4/15

  7. Proof checkers & automatic provers ◮ Automath ◮ Coq ◮ Metamath ◮ Isabelle ◮ Mizar ◮ Agda ◮ PVS ◮ Dedukti ◮ HOL family ◮ ProofCert ◮ LF ◮ CubicalTT 5/15

  8. Interoperability problem ◮ There is a lot a proof checkers & logics ◮ Different logics might have different expressivity ◮ Each system has its own library of proofs ◮ There is not standard 6/15

  9. Interoperability problem ◮ There is a lot a proof checkers & logics ◮ Different logics might have different expressivity ◮ Each system has its own library of proofs ◮ There is not standard Our goal: Take a small library (e.g. an arithmetic library) that could be exported to a bunch of proof checkers 6/15

  10. Methodology Python C++ Java Javascript 7/15

  11. Methodology Python C++ ASM Java Javascript 7/15

  12. Dedukti Coq Matita HOL CoqInE Krajono Holide Dedukti Focalide iProver Focalize modulo Zenon modulo 8/15

  13. From Matita to HOL Arithmetic library Coq HOL-light HOL4 Open Theory Matita CoqInE HOL Zero ediloh Krajono Holide Dedukti Focalide universo dkmeta,... Zenon Focalize modulo 9/15

  14. Dedukti[CIC] to Dedukti[HOL] Dedukti[CIC] Dedukti[HOL] Dedukti 10/15

  15. Dedukti[CIC] to Dedukti[HOL] ... ... ... Dedukti[CIC] Dedukti[HOL] 10/15

  16. Dedukti[CIC] to Dedukti[HOL] What to do? ◮ Remove useless stuff (proofs not used) ◮ Remove universes ◮ Remove dependent products ◮ Remove rewrite rules 11/15

  17. Dedukti[CIC] to Dedukti[HOL] What to do? ◮ Remove useless stuff (proofs not used) ◮ Remove universes ◮ Remove dependent products ◮ Remove rewrite rules How? ◮ Dedukti rewrite system ◮ OCaml 11/15

  18. Dedukti[CIC] to Dedukti[HOL] What to do? ◮ Remove useless stuff (proofs not used) ◮ Remove universes ◮ Remove dependent products ◮ Remove rewrite rules How? ◮ Dedukti rewrite system ◮ OCaml Problems: ◮ All at the same time? ◮ What is the best order? 11/15

  19. Dedukti[CIC] to Dedukti[HOL] What to do? ◮ Remove useless stuff (proofs not used) ◮ Remove universes ◮ Remove dependent products ◮ Remove rewrite rules How? ◮ Dedukti rewrite system ◮ OCaml Problems: ◮ All at the same time? ◮ What is the best order? 11/15

  20. Remove rewrite rules nat : Type. 0 : nat. S : nat -> nat. odd : nat -> Prop. pi : odd (S 0). [] one --> S 0. def pi1 : (odd one) := pi. 12/15

  21. Remove rewrite rules nat : Type. 0 : nat. S : nat -> nat. odd : nat -> Prop. pi : odd (S 0). def eq : nat -> nat -> Prop := x:nat => y:nat => forall (P:(nat -> Prop) => impl (P x) (P y)). 12/15

  22. Remove rewrite rules nat : Type. 0 : nat. S : nat -> nat. odd : nat -> Prop. pi : odd (S 0). def eq : nat -> nat -> Prop := x:nat => y:nat => forall (P:(nat -> Prop) => impl (P x) (P y)). eq_one : eq (S 0) one. 12/15

  23. Remove rewrite rules nat : Type. 0 : nat. S : nat -> nat. odd : nat -> Prop. pi : odd (S 0). def eq : nat -> nat -> Prop. [x,y] eq x y --> forall (P:(nat -> Prop) => impl (P x) (P y)). eq_one : eq (S 0) one. def pi1 : (odd one) := eq_one (ctx => odd ctx) pi. 12/15

  24. Dedukti[HOL] to OpenTheory (OT) Should be easy , right? But... 13/15

  25. Dedukti[HOL] to OpenTheory (OT) Should be easy , right? But... ◮ Polymorphism in OT is not the handle the same way as in Dedukti[HOL] ◮ Dedukti is modulo delta (constants unfolding), OT is not ◮ Dedukti is modulo beta, OT is not! ◮ Dedukti using De Bruijn indices, OT uses names! 13/15

  26. In practice Dedukti to Dedukti (done) Dedukti to Dedukti (done) ◮ 6 months ◮ 5 months ◮ 3 tools ◮ 1 tool ◮ about 1500 lines of OCaml ◮ 3000 lines of OCaml 14/15

  27. Conclusion & Future Work ◮ Find (or invent) a better language to write these compilers (a futur work with Prof. Brigitte Pientka) ◮ OT has some good ideas for interoperability that could be reuse ◮ Extend the compiler to other systems such as ProofCert, Coq or PVS 15/15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend