Proof Engineering of Higher Order Logic Wang) Collaboration, - - PowerPoint PPT Presentation

proof engineering of higher order logic
SMART_READER_LITE
LIVE PREVIEW

Proof Engineering of Higher Order Logic Wang) Collaboration, - - PowerPoint PPT Presentation

Proof Engineering of Higher Order Logic Robert White (Shuai Proof Engineering of Higher Order Logic Wang) Collaboration, Translation, Checking and Retrieval Introduction Higher Order Logic HOL Kernel Inference Rules Robert White


slide-1
SLIDE 1

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 1/29

Proof Engineering of Higher Order Logic

Collaboration, Translation, Checking and Retrieval Robert White (Shuai Wang)

ILLC/INRIA → CNRS

AITP’16

slide-2
SLIDE 2

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 2/29

Outline

1 Introduction

Higher Order Logic HOL Kernel Inference Rules

2 Proof Collaboration

OpenTheory Version 5 & 6

3 Proof Translation and Proof Checking 4 Proof Retrieval Engine: ProofCloud 5 Conclusion and Future Work

slide-3
SLIDE 3

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 3/29

Higher Order Logic

Simple type theory (STT) is also known as Higher order logic (HOL). HOL = simply typed λ-Calculus + boolean types + axioms + inference rules. Most mathematical objects/theories can be expressed in HOL. Interactive and automatic theorem provers & proof checkers for formal mathematics. HOL Light, ProofPower, HOL4, HOL Zero . . . [HOL family]. The first talk by Tom Hales: Kepler Conjecture

slide-4
SLIDE 4

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 4/29

Kernel

HOL syntax: type variables α, β type operators p types A, B ::= α | p(A1, . . . , An) term variables x, y term constants c terms M, N ::= x | λx : A.M | MN | c Polymorphic Type: = : α → α → o

slide-5
SLIDE 5

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 5/29

Primitive Inference Rules

Structural ASSUME {A} ⊢ A λ Calculus Γ ⊢ A = B ABS Γ ⊢ λx.A = λx.B BETA (λ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 ∆ ⊢ A EQ_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 = C TRANS Γ ∪ ∆ ⊢ A = C

slide-6
SLIDE 6

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 6/29

Dependency

= ⊤ ∧ ⇒ ∀ ⊥ ∨ ∃ ¬

Figure: Constants and Connectives Dependency Analysis

slide-7
SLIDE 7

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 7/29

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 and export of proofs. http://www.gilith.com/research/opentheory/

slide-8
SLIDE 8

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 8/29

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

slide-9
SLIDE 9

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 9/29

OpenTheory Kernel

Figure: Primitive Inference Rules of OpenTheory 5

slide-10
SLIDE 10

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 10/29

OpenTheory 5 & 6

Commands Updated/New proveHyp new trans new sym new defineConstList new hdTl new defineTypeOp updated pragma new

Table: Differences between commands of version 5 and version 6

slide-11
SLIDE 11

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 11/29

OpenTheory 5 & 6

Figure: Additional Primitive Inference Rules in OpenTheory 6

slide-12
SLIDE 12

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 12/29

News from OpenTheory

OpenTheory is updating constantly, so will Holide and Dedukti.

slide-13
SLIDE 13

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 13/29

Holide and Dedukti

OpenTheory has a repository of proof packages (articles). Holide translates proofs from OpenTheory articles to Dedukti. Dedukti1 is a proof checker (for proof checking). from a reviewer: It is not clear from the abstract whether the author has contributed to the development of Holide

  • r Dedukti
slide-14
SLIDE 14

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 14/29

Workflow of OpenTheory, Holide and Dedukti

Figure: Work Flow of OpenTheory, Holide and Dedukti

slide-15
SLIDE 15

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 15/29

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 = t and D1 is the proof of t = u translate( Γ ⊢ ϕ ∆ ⊢ ψ proveHyp Γ ∪ (∆ \ {ϕ}) ⊢ ψ ) = ProveHyp|x||y||D1|(λx : ||ψ||.|D2|), where D1 is the proof

  • f ϕ and D2 is the proof of ψ.
slide-16
SLIDE 16

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 16/29

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

slide-17
SLIDE 17

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 17/29

Benchmarks: Translation

Figure: The Size of Article Files and Translation Time

slide-18
SLIDE 18

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 18/29

Benchmarks: Checking

Figure: Th Size of Article Files and Proof Checking Time

slide-19
SLIDE 19

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 19/29

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%. The proof checking time reduced by around 5%. These benchmarks were generated on a 64-bit Intel Core i5-4590 CPU @3.30GHz ×4 PC with 3.8GB RAM.

slide-20
SLIDE 20

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 20/29

Kepler Conjecture

20 years to complete The formal proof of Kepler Conjecture takes about 5000 hours to check (in HOL Light) in 2014. What if we check by Dedukti?

slide-21
SLIDE 21

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 21/29

ProofCloud

1 A Proof Retrievel Engine:

http://airobert.github.io/proofcloud/

2 1700+ pages of proofs with analysis. 3 A representation of proof checking results by Holide and

Dedukti.

4 Which proofs are constructive?

slide-22
SLIDE 22

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 22/29

Version 2

Proof Search Engine which represents the analysis and proof checking results.

Figure: Index Page of ProofCloud (version 1)

It’s version 2 now!!!

slide-23
SLIDE 23

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 23/29

Demo

So far there are 6 packages: base, stream, probability, natural-bits, natural-divides and natural-prime. For the natural-prime package: http://airobert. github.io/proofcloud/natural-prime.html ADD_EQ_0 !mn.m + n = 0 ⇔ m = 0 ∧ n = 0

slide-24
SLIDE 24

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 24/29

Structural Analysis

the combination of the subst and eqmp rule takes over 45% of all the inferences rules. Inference Rules Count subst 93667 eqmp 92617 appthm 53155 proveHyp 47728 betaConv 21485 absThm 15096 . . . . . . assume 16986 Overall 413207

slide-25
SLIDE 25

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 25/29

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 Machine Learning?

slide-26
SLIDE 26

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 26/29

Statistical Results

1209 proofs in the standard library. 541 constructive proofs v.s. 668 classical proofs 44.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. Next, these 668 proofs to their constructive form?

slide-27
SLIDE 27

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 27/29

ProofCloud 3?

More OpenTheory packages and even Coq, Mizar . . . libraries? Better GUI Better searching accuracy More text description of theorems (at least a proper name) A proof analysis engine combined with machine learning as a feature suggestion engine after comparing thousands of proofs?

slide-28
SLIDE 28

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 28/29

Conclusion and Acknowledgement

An overview of recent updates of OpenTheory, Holide, Dedukti, ProofCloud Proof checking benchmarks Thanks to Dr. Gilles Dowek, Dr. Ali Assaf, Dr. Joe Hurd,

  • Mr. Frédéric Gilbert and Mr. Nigel Sham and Mr. Dianlin

Shen.

slide-29
SLIDE 29

Proof Engineering

  • f Higher

Order Logic Robert White (Shuai Wang) Introduction

Higher Order Logic HOL Kernel Inference Rules

Proof Collaboration

OpenTheory Version 5 & 6

Proof Translation and Proof Checking Proof Retrieval Engine: ProofCloud Conclusion 29/29

Thank you!

I am looking for a master thesis supervisor and opportunities for doctoral studies related but not limited to those provers!