proofcloud white @ in- ria+cnrs proofcloud · proofcloud robert white @ in-ria+cnrs background...

34
ProofCloud Robert White @ IN- RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion and Future Work 1/34 ProofCloud A Proof Retrieval Engine for Verified Proofs Robert White @ INRIA+CNRS Supervisor: Prof. Gilles Dowek @ INRIA UITP’16

Upload: dangtuyen

Post on 08-Oct-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

1/34

ProofCloudA Proof Retrieval Engine for Verified Proofs

Robert White @ INRIA+CNRS

Supervisor: Prof. Gilles Dowek @ INRIA

UITP’16

Page 2: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

2/34

Outline

1 BackgroundHigher Order Logic and Theorem ProversProof Collaboration

2 Proof Translation and Proof Checking

3 Proof Retrieval Engine: ProofCloud

4 Conclusion and Future Work

Page 3: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

3/34

Motivation and Introduction

1 the first proof retrievel engine.2 1700+ pages of proofs and proof packages with analysis.3 the first complete set of proof checking results about

OpenTheory.4 where are the proofs?5 which proofs are constructive?6 what axioms are used in the proof?7 how long does it take to verify these proofs?

Page 4: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

4/34

Higher Order Logic

Simple type theory (STT) is also known as Higher orderlogic (HOL).HOL = simply typed λ-Calculus + boolean types +axioms + inference rules.Most mathematical objects/theories can be expressed inHOL.Interactive and automatic theorem provers & proofcheckers for formal mathematics.HOL Light, ProofPower, HOL4, HOL Zero . . . [HOLfamily].

Page 5: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

5/34

Kernel

HOL syntax:

type variables α, βtype operators ptypes A,B ::= α | p(A1, . . . ,An)term variables x , yterm constants cterms M,N ::= x |λx : A.M |MN | c

Polymorphic Type:

= : α→ α→ o

Page 6: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

6/34

Primitive Inference Rules

Structural ASSUME{A} ` A

λ Calculus

Γ ` A = BABS

Γ ` λx.A = λx.BBETA

(λx.A)x = A

Instantiation

Γ[x1, . . . , xn ] ` A[x1, . . . , xn ]INST

Γ[t1, . . . , tn ] ` A[t1, . . . , tn ]Γ[α1, . . . , αn ] ` A[α1, . . . , αn ]

INST_TYPEΓ[γ1, . . . , γn ] ` A[γ1, . . . , γn ]

Bi-implication

Γ ` A = B ∆ ` AEQ_MP

Γ ∪ ∆ ` BΓ ` A ∆ ` B

DEDUCTANTISYMRULE(Γ \ {B}) ∪ ∆ \ {A}) ` A = B

Equality

REFL` A = AΓ ` A = B ∆ ` C = D

MK_COMBΓ ∪ ∆ ` A(C) = B(D)

Γ ` A = B ∆ ` B = CTRANS

Γ ∪ ∆ ` A = C

Page 7: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

7/34

Dependency

=

>

⇒∀

∨ ∃

¬

Figure: Constants and Connectives Dependency Analysis

Page 8: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

8/34

OpenTheory

HOL family: HOL Light, ProofPower, HOL4, Isabelle . . .Need a platform to reuse proofs from different systems.OpenTheory has a standard format of proofs (*.art).Export proofs and import proofs (in article files).OpenTheory HOL Light:a modified version of HOL Light which allows import andexport of proofs.http://www.gilith.com/research/opentheory/

Page 9: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

9/34

Packages and Dependency

base (the standard library)

stream natural-divides

natural-prime

natural-fibonacci modular

probability

gfp

natural-list

Figure: Dependency of Packages of OpenTheory

Page 10: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

10/34

OpenTheory Kernel

Figure: Primitive Inference Rules of OpenTheory 5

Page 11: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

11/34

OpenTheory 5 & 6

Commands Updated/NewproveHyp newtrans newsym newdefineConstList newhdTl newdefineTypeOp updatedpragma new

Table: Differences between commands of version 5 and version 6

Page 12: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

12/34

OpenTheory 5 & 6

Figure: Additional Primitive Inference Rules in OpenTheory 6

Page 13: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

13/34

News from OpenTheory

OpenTheory is updating constantly, so will Holide and Dedukti.

Page 14: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

14/34

Holide and Dedukti

OpenTheory has a repository of proof packages (articles).Holide translates proofs from OpenTheory articles toDedukti.Dedukti is a proof checker (for proof checking).

Page 15: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

15/34

Workflow of OpenTheory, Holide and Dedukti

Figure: Work Flow of OpenTheory, Holide and Dedukti

Page 16: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

16/34

Translation

translate ( Γ ` ϕ = ψsym

Γ ` ψ = ϕ) = Sym|A||t1||t2|

translate( Γ ` s = t ∆ ` t = u transΓ ∪∆ ` s = u

) =Trans|A||x ||y ||z ||D1||D2|, where D1 is the proof of s = tand D1 is the proof of t = u

translate( Γ ` ϕ ∆ ` ψproveHyp

Γ ∪ (∆ \ {ϕ}) ` ψ) =

ProveHyp|x ||y ||D1|(λx : ||ψ||.|D2|), where D1 is the proofof ϕ and D2 is the proof of ψ.

Page 17: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

17/34

Translation (Continued)

Sym, Trans and ProveHyp have types as follows:

Sym : Πα : type.Πx , y : termα. proof (eq bool x y)→proof (eq bool y x)

Trans : Πα : type.Πx , y , z : termα proof (eq α x y)→proof (eq α y z)→ proof (eq α x z)

ProveHyp : Πx , y : term bool .proof x → (proof x →proof y)→ proof y

Page 18: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

18/34

Benchmarks: Translation

Figure: The Size of Article Files and Translation Time

Page 19: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

19/34

Benchmarks: Checking

Figure: Th Size of Article Files and Proof Checking Time

Page 20: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

20/34

Evaluation

Fully verified all the libraries in OpenTheory.Little difference between version 5 and version 6.The size of proof articles got reduced by around 7%. Theproof checking time reduced by around 5%.These benchmarks were generated on a 64-bit Intel Corei5-4590 CPU @3.30GHz ×4 PC with 3.8GB RAM.Proof checking results are included in ProofCloud

Page 21: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

21/34

ProofCloud

1 the first proof retrievel engine.2 1700+ pages of proofs and proof packages with analysis.3 the first complete set of proof checking results about

OpenTheory.4 where are the proofs?5 which proofs are constructive?6 what axioms are used in the proof?7 how long does it take to verify these proofs?

Page 22: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

22/34

Version 0

A representation of the proof analysis and proof checking re-sults of HOLALA for my internship.

Figure: Index Page of ProofCloud (version 0)

It was based on Google Custom Search.

Page 23: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

23/34

Version 1

A proof search engine which represents the analysis and proofchecking results of the basic package of OpenTheory.

Figure: Index Page of ProofCloud (version 1)

It’s version 2 now!!!

Page 24: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

24/34

Version 2

More packages; a better interface; complete verification results;faster search engine

Figure: Index Page of ProofCloud (version 2)

It’s using Swiftype now!

Page 25: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

25/34

Version 2: Verification

Figure: A verification page of ProofCloud

Page 26: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

26/34

Version 2: A Proof Page

Figure: A proof page of ProofCloud

Page 27: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

27/34

Version 2: A Proof Page

Figure: A proof page of ProofCloud

Page 28: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

28/34

Demo

So far there are 6 packages: base, stream, probability,natural-bits, natural-divides and natural-prime.Try it out yourself:http://airobert.github.io/proofcloud

search "ADD" for example.

Page 29: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

29/34

Statistical Results

1209 proofs in the standard library.541 constructive proofs v.s. 668 classical proofs44.75% of them constructive proofs.

In contrast, the natural-divides package has only 10 construc-tive proofs out of 136 proofs, making only 7.35% of them con-structive.

Do any of these these 668 proofs have a constructive form?

Page 30: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

30/34

Some Results that used to be there: StructuralAnalysis

the combination of the subst and eqmp rule takes over 45% ofall the inferences rules.

Inference Rules Countsubst 93667eqmp 92617appthm 53155proveHyp 47728betaConv 21485absThm 15096. . . . . .

assume 16986Overall 413207

Page 31: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

31/34

Structural Results

The frequency of subst and eqmp combined is over 45%

Figure: Frequency of Main Inference Rules of OpenTheory Articles

And more for each individual theorem or combine with MachineLearning?

Page 32: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

32/34

ProofCloud 3?

Side-by-side proof comparison on the flyMore OpenTheory packages and even Coq, Mizar . . .libraries?Better GUIBetter searching accuracyMore text description of theorems (at least a proper name)A proof analysis engine combined with machine learning asa feature suggestion engine after comparing thousands ofproofs?Funding is the key!

Page 33: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

33/34

Conclusion and Acknowledgement

An overview of recent updates of OpenTheory, Holide,Dedukti, ProofCloudProof checking benchmarksThe first proof search engineA cool user interface of OpenTheoryThanks to Dr. Gilles Dowek, Dr. Ali Assaf, Dr. Joe Hurd,Mr. Frédéric Gilbert and Mr. Nigel Sham and Mr. DianlinShen.

Page 34: ProofCloud White @ IN- RIA+CNRS ProofCloud · ProofCloud Robert White @ IN-RIA+CNRS Background Higher Order Logic and Theorem Provers Proof Collaboration Proof Translation and Proof

ProofCloud

RobertWhite @ IN-RIA+CNRS

BackgroundHigher OrderLogic andTheoremProversProofCollaboration

ProofTranslationand ProofChecking

ProofRetrievalEngine:ProofCloud

Conclusionand FutureWork

34/34

Thank you!

I am looking for a master thesis supervisor and opportunitiesfor doctoral studies related but not limited to those provers!Thanks for your attension!