robust, semi-intelligible isabelle proofs · (t1 + t2)(1+bonus) a1 ⊢ i i, a2 ⊢ c a1,a2 ⊢ c...

97
Robust, Semi-Intelligible Isabelle Proofs from ATP Proofs Steffen Smolka Advisor: Jasmin Blanchette Isabelle

Upload: others

Post on 03-Aug-2020

31 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Robust, Semi-Intelligible Isabelle Proofs

from

ATP Proofs

Steffen Smolka

Advisor: Jasmin Blanchette

Isabell

e

Page 2: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

vs.

well suited for large formalizations

but require intensive manual labor

fully automatic

but no proof

management

Vampire

ITPs ATPs

h A

�=Isa

belle

`

_

Isabell

e

Page 3: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

vs.

well suited for large formalizations

but require intensive manual labor

fully automatic

but no proof

management

Sledge- hammer

Vampire

ITPs ATPs

h A

�=Isa

belle

`

_

Isabell

e

Page 4: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 5: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 6: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 7: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 8: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 9: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Exploit ATPs, but don’t trust them.

LCF Principle (Robin Milner): Have all proofs checked by the inference kernel.

⟹ ATP proofs must be reconstructed in Isabelle.

Page 10: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach A: Metis One-Liners

lemma "length (tl xs) ≤ length xs" by (metis diff_le_self length_tl)

proof method lemmas

Page 11: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach A: Metis One-Liners

lemma "length (tl xs) ≤ length xs" by (metis diff_le_self length_tl)

proof method lemmas

external ATPs: find proof given 100s of facts

Metis: re-find proof given only necessary facts

Page 12: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach A: Metis One-Liners

lemma "length (tl xs) ≤ length xs" by (metis diff_le_self length_tl)

+ usually fast and reliable + lightweight - cryptic - sometimes slow (several seconds) - on avg. 5% “loss”

proof method lemmas

external ATPs: find proof given 100s of facts

Metis: re-find proof given only necessary facts

Page 13: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach B: Detailed Isar Proofs lemma "length (tl xs) ≤ length xs" proof - have "⋀x1 x2. (x1∷nat) - x2 - x1 = 0 - x2" by (metis comm_monoid_diff_class.diff_cancel diff_right_commute) hence "length xs - 1 - length xs = 0" by (metis zero_diff) hence "length xs - 1 ≤ length xs" by (metis diff_is_0_eq) thus "length (tl xs) ≤ length xs" by (metis length_tl) qed

Page 14: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach B: Detailed Isar Proofs lemma "length (tl xs) ≤ length xs" proof - have "⋀x1 x2. (x1∷nat) - x2 - x1 = 0 - x2" by (metis comm_monoid_diff_class.diff_cancel diff_right_commute) hence "length xs - 1 - length xs = 0" by (metis zero_diff) hence "length xs - 1 ≤ length xs" by (metis diff_is_0_eq) thus "length (tl xs) ≤ length xs" by (metis length_tl) qed

+ faster than one-liners + 100% reconstruction (in principle) + self-explanatory - technically more challenging

Page 15: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Challenge 1: Resolution proofs are by contradiction "sin against mathematical exposition" (Knuth et al. 1989)

→ Jasmin Blanchette Challenge 2: Skolemization - introduce new symbols during proof

Challenge 3: Type Annotations - make Isabelle understand its own output

Challenge 4: Preplay & Optimization - test and improve proofs

( )

Page 16: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Challenge 2:

Skolemization

Page 17: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀X. ∃Y. p(X, Y) ∀X. p(X, y(X))

Skolemization

Signature is extended

Page 18: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∃y. ∀X. p(X, y(X))∀X. ∃Y. p(X, Y)

Ax. of Choice

∀X. ∃Y. p(X, Y) ∀X. p(X, y(X))

Skolemization

Signature is extended

Page 19: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∃y. ∀X. p(X, y(X))∀X. ∃Y. p(X, Y)

Ax. of Choice

∀X. ∃Y. p(X, Y) ∀X. p(X, y(X))

Skolemization

Signature is extended

obtain y where ∀X. p(X, y(X))

Signature is extended

Page 20: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀X. ∃Y. p(X, Y)∃y. ∀X. p(X, y(X))

Ax. of Choice

<steps with extended sig.>

<steps with reduced sig.>

Page 21: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀X. ∃Y. p(X, Y)

∃y. ∀X. p(X, y(X))Ax. of Choice

<steps with extended sig.>

<steps with reduced sig.>

Page 22: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀y. ∃X. ¬p(X, y(X))Ax. of Choice

∃X. ∀Y. ¬p(X, Y)

<steps with extended sig.>

<steps with reduced sig.>

Page 23: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀y. ∃X. ¬p(X, y(X)) Contrap. of

Ax. of Choice∃X. ∀Y. ¬p(X, Y)

<steps with extended sig.>

<steps with reduced sig.>

Page 24: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

∀y. ∃X. ¬p(X, y(X)) Contrap. of

Ax. of Choice∃X. ∀Y. ¬p(X, Y)

<steps with extended sig.>

<steps with reduced sig.>

{ fix y <steps with extended sig.> have ∃X. ¬p(X, y(X)) }

hence ∃X. ∀Y. ¬p(X, Y) <steps with reduced sig.>

Page 25: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Challenge 3:

Type Annotations Make Isabelle understand its own output

Page 26: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

2 + 2 = 4

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

print

Page 27: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

2 + 2 = 4

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

print

2α +α→α→α 2α =α→α→bool 4α where α:numeral

parse

Un- provable

Page 28: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

(2:nat) (+:nat→nat→nat) (2:nat) (=:nat→nat→bool) (4:nat)

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

print

parse

Page 29: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

2 + 2 = 4

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

print

2α +α→α→α 2α =α→α→bool 4α where α:numeral

parse

Page 30: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

(2:nat) + 2 = 4

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

print

parse

2nat +nat→nat→nat 2nat =nat→nat→bool 4nat

Page 31: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Goal: Calculate a set of annotations that is

(A) Complete: reparsing term must not

change its type

(B) Minimal: annotations must impair

readability as little as possible

Page 32: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

type inference ≈ parsing

fnat→int→bool xnat yint

f- x- y-

type erasure ≈ printing

fα→β→ɣ xα yβ

σ = { α↦nat, β↦int, ɣ↦bool }

matching

Page 33: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

type inference ≈ parsing

fnat→int→bool xnat yint

f- x- y-

type erasure ≈ printing

fα→β→ɣ xα yβ

σ = { α↦nat, β↦int, ɣ↦bool }

matching

Set of ann. complete IFF it covers Dom(σ)

Page 34: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f xnat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 35: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f xnat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 36: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x y

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 37: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x y

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 38: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x yf (x:nat) (y:int) :bool

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 39: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x yf (x:nat) (y:int) :bool

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 40: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x yf (x:nat) (y:int) :bool(f (x:nat) :int→bool) y

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 41: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

y

f x

(f:nat→int→bool) x yf (x:nat) (y:int) :bool(f (x:nat) :int→bool) y

Which set of annotations is the best?

How do we compute it efficiently?

nat α

nat→int→bool α→β→ɣ

int→bool β→ɣ

int β

bool ɣ

f x y

Page 42: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Which set of annotations is the best?

cost of t# :=

Page 43: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Which set of annotations is the best?

cost of t# :=

(size of #, → small annotations

size of t, → small annotated terms

postindex of t#) → annotations at the beginning

Page 44: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Which set of annotations is the best?

cost of t# :=

(size of #, → small annotations

size of t, → small annotated terms

postindex of t#) → annotations at the beginning

≤ lexiographically

+ component-wise

Page 45: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

How do we compute it efficiently?

Page 46: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

How do we compute it efficiently?

Instance of Weighted Set Cover Problem:

• Finite Universe U → Dom(σ)

• Family S⊆ 2U → Possible Annotations

Page 47: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

How do we compute it efficiently?

Instance of Weighted Set Cover Problem:

• Finite Universe U → Dom(σ)

• Family S⊆ 2U → Possible Annotations

• Find {U1,...,Un}⊆S such that

‣ U1 ∪ ... ∪ Un = U → Completeness

‣ cost {U1,...,Un} minimal → Readability

Page 48: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

SCP is NP-complete ⟹ settle for Approximation

Reverse-Greedy Alg. calculates local min:

‣ start with all annotations

‣ repeatedly remove the most expensive superfluous

annotation

Page 49: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Challenge 4:

Preplay & Optimization

Page 50: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Proof Preplay

Generated proofs are only useful if they...

• work

Page 51: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Proof Preplay

Generated proofs are only useful if they...

• work

• are reasonably fast

Page 52: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Proof Preplay

Generated proofs are only useful if they...

• work

• are reasonably fast

Let the computer find out!

→ Present proofs with “preplay” information

Page 53: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C
Page 54: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

timeout

Page 55: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

timeout

Page 56: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach A: Feed proof text to Isabelle

+ close to reality

- expensive

- no timings for individual steps

Page 57: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Approach A: Feed proof text to Isabelle

+ close to reality

- expensive

- no timings for individual steps

Approach B: Simulate replay on ML-level

- not the real thing (no printing, no parsing)

+ timings for each step

Page 58: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Proof Compression

Page 59: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Proof Compression

Page 60: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ I

I, A2 ⊢ C

Page 61: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ I

I, A2 ⊢ CA1,A2 ⊢ C

merger

Page 62: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

t1 + t2 ≥ t‘ ?

Does merger save time?

t1 + t2

A1 ⊢ I

I, A2 ⊢ CA1,A2 ⊢ C

merger

Page 63: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

t1 + t2 ≥ t‘ ?

Does merger save time?

(t1 + t2)(1+bonus)

A1 ⊢ I

I, A2 ⊢ CA1,A2 ⊢ C

merger

Page 64: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3

F1,F2,F3 ⊢ CF1

F3F2

Axioms A2A1

C

Page 65: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

F1

F3F2

Axioms A2A1

C

Page 66: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

F1

F3F2

Axioms A2A1

C

Page 67: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

F1

F2

Axioms A2

A1 ⊢ F1

A1,F1 ⊢ F2

F1,F2,A2 ⊢ C

A1

C

Page 68: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

F1

F2

Axioms A2

A1 ⊢ F1

A1,F1 ⊢ F2

F1,F2,A2 ⊢ C

A1

C

Page 69: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

A1 ⊢ F1

F1,A1,A2 ⊢ C

F1

Axioms A2

A1 ⊢ F1

A1,F1 ⊢ F2

F1,F2,A2 ⊢ C

A1

C

Page 70: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

A1 ⊢ F1

F1,A1,A2 ⊢ C

F1

Axioms A2

A1 ⊢ F1

A1,F1 ⊢ F2

F1,F2,A2 ⊢ C

A1

C

Page 71: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

A1 ⊢ F1

A1,F1 ⊢ F2

A2,F1 ⊢ F3 F1,F2,F3 ⊢ C

A1 ⊢ F1

F1,A1,A2 ⊢ C

Axioms A2

A1 ⊢ F1

A1,F1 ⊢ F2

F1,F2,A2 ⊢ C

A1

C

A1,A2 ⊢ C

Page 72: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Stop when given compression factor is reached

Page 73: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Stop when given compression factor is reached

Eliminate “large” steps first

Page 74: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Stop when given compression factor is reached

Eliminate “large” steps first

Generalizations: ‣ eliminate subproofs

‣ eliminate steps with k successors

Page 75: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Beyond Metis “Sledgehammer Try0”

time

methodmetis

Page 76: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

simp auto fastforce force arith blast

Beyond Metis “Sledgehammer Try0”

time

methodmetis

Page 77: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

simp auto fastforce force arith blast

Beyond Metis “Sledgehammer Try0”

time

methodmetis

F A I L

Page 78: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

simp auto fastforce force arith blast

Beyond Metis “Sledgehammer Try0”

time

methodmetis

F A I L

Page 79: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

simp auto fastforce force arith blast

Beyond Metis “Sledgehammer Try0”

time

methodmetis

F A I L

+ speedup

+ robustness

Page 80: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Fact Minimization

Metis knows nothing.

Simp, Auto, ... know about lists, numbers, ...

Page 81: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Fact Minimization

Metis knows nothing.

Simp, Auto, ... know about lists, numbers, ...

... using g1 g2 l1 l2 by metis

... using g2 by simp

Page 82: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Fact Minimization

Metis knows nothing.

Simp, Auto, ... know about lists, numbers, ...

... using g1 g2 l1 l2 by metis

... using g2 by simp

+ may eliminate intermediate steps

+ speedup

Page 83: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Page 84: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Sledgehammer

Page 85: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Page 86: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

by (metis a0 a1 add_less_cancel_left b0 comm_monoid_add_class.add.right_neutralcomm_monoid_mult_class.mult.left_neutralcomm_semiring_1_class.normalizing_semiring_rules(24)diff_add_cancel pos_add_strict real_mult_less_iff1)

798_ms

Page 87: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Sledgehammer

• Isar Proof

Page 88: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Page 89: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

proof - have "⋀x2 x1. (x2∷real) + (x1 - x2) = x1" by (metis comm_semiring_1_class.normalizing_semiring_rules(24) diff_add_cancel) hence f1: "⋀x1 x2 x3. (x1∷real) < x2 - x3 ∨ ¬ x3 + x1 < x2" by (metis add_less_cancel_left) have f2: "⋀x1 x2. (x1∷real) * x2 < x2 ∨ ¬ 0 < x2 ∨ ¬ x1 < 1" by (metis comm_monoid_mult_class.mult.left_neutral real_mult_less_iff1) have "0 < b ∧ a < 1" by (metis a1 b0) hence "a * b < b" using f2 by metis hence "0 < a ∧ a * b < b" by (metis a0) hence "a * b < a + b" by (metis pos_add_strict) hence "a * b + 0 < a + b" by (metis comm_monoid_add_class.add.right_neutral) thus "0 < a + b - a * b" using f1 by metisqed

74_ms

Page 90: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Sledgehammer

• Isar Proof

• Compression

Page 91: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Page 92: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

proof - have "a * b < b" by (metis a1 b0 mult_strict_right_mono comm_semiring_1_class.normalizing_semiring_rules(11)) hence "a * b < a + b" by (metis a0 pos_add_strict) thus "0 < a + b - a * b" by (metis add_less_imp_less_right diff_add_cancel comm_semiring_1_class.normalizing_semiring_rules(5))qed

25_ms

Page 93: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Sledgehammer

• Isar Proof

• Compression

• Try0 & Fact Minimization

Page 94: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

Page 95: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

proof - have "a * b < b" using a1 b0 by simp hence "a * b < a + b" using a0 pos_add_strict by simp thus "0 < a + b - a * b" by simpqed

5_ms

Page 96: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

lemma fixes a :: real and b :: real assumes a0: "0<a" and a1: "a<1" and b0: "0<b" and b1: "b<1" shows "a+b - a*b > 0"

proof - have "a * b < b" using a1 b0 by simp hence "a * b < a + b" using a0 pos_add_strict by simp thus "0 < a + b - a * b" by simpqed

5_ms

sledgehammer[isar_proofs, isar_compress=2]

Page 97: Robust, Semi-Intelligible Isabelle Proofs · (t1 + t2)(1+bonus) A1 ⊢ I I, A2 ⊢ C A1,A2 ⊢ C merger. A1 ⊢ F1 A1,F1 ⊢ F2 A2,F1 ⊢ F3 F1,F2,F3 ⊢ C F1 F2 F3 A1 Axioms A2 C

Robust, Semi-Intelligible Isabelle Proofs

from

ATP Proofs

Steffen Smolka

Advisor: Jasmin Blanchette

Isabell

e