Program Extraction From Proofs1
Ulrich Berger Swansea University Autumn School “Proof and Computation” Fischbachau, September 16-22, 2018
1available at www.cs.swan.ac.uk/∼csulrich/slides.html 1 / 68
Aims of the course The aim of this course to show that logic is a - - PowerPoint PPT Presentation
Program Extraction From Proofs 1 Ulrich Berger Swansea University Autumn School Proof and Computation Fischbachau, September 16-22, 2018 1 available at www.cs.swan.ac.uk/ csulrich/slides.html 1 / 68 Aims of the course The aim of this
1available at www.cs.swan.ac.uk/∼csulrich/slides.html 1 / 68
2 / 68
3 / 68
4 / 68
5 / 68
6 / 68
6 / 68
6 / 68
6 / 68
6 / 68
7 / 68
8 / 68
9 / 68
10 / 68
11 / 68
11 / 68
11 / 68
11 / 68
11 / 68
11 / 68
12 / 68
◮ the constants in C, ◮ the function symbols in F, ◮ the predicate symbols in P.
13 / 68
14 / 68
15 / 68
15 / 68
15 / 68
15 / 68
16 / 68
17 / 68
18 / 68
Assumption rule
Γ, A ⊢ A Introduction rules Elimination rules ∧ Γ ⊢ A Γ ⊢ B
Γ ⊢ A ∧ B Γ ⊢ A ∧ B
Γ ⊢ A Γ ⊢ A ∧ B
Γ ⊢ B → Γ, A ⊢ B
Γ ⊢ A → B Γ ⊢ A → B Γ ⊢ A →− Γ ⊢ B ∨ Γ ⊢ A
Γ ⊢ A ∨ B Γ ⊢ B
Γ ⊢ A ∨ B Γ ⊢ A ∨ B Γ ⊢ A → C Γ ⊢ B → C
Γ ⊢ C ⊥ Γ ⊢ ⊥ efq Γ ⊢ A Γ ⊢ ¬¬A raa Γ ⊢ A ∀ Γ ⊢ A(x)
Γ ⊢ ∀x A(x) (x not free in Γ) Γ ⊢ ∀x A(x)
Γ ⊢ A(t) ∃ Γ ⊢ A(t)
Γ ⊢ ∃x A(x) Γ ⊢ ∃x A(x) Γ ⊢ ∀x (A(x) → C)
Γ ⊢ C (x not free in Γ, C) 19 / 68
20 / 68
21 / 68
22 / 68
23 / 68
24 / 68
25 / 68
26 / 68
26 / 68
26 / 68
26 / 68
26 / 68
26 / 68
27 / 68
27 / 68
27 / 68
28 / 68
28 / 68
28 / 68
28 / 68
28 / 68
29 / 68
29 / 68
30 / 68
30 / 68
30 / 68
30 / 68
31 / 68
32 / 68
33 / 68
34 / 68
35 / 68
36 / 68
37 / 68
38 / 68
39 / 68
40 / 68
40 / 68
40 / 68
40 / 68
41 / 68
42 / 68
42 / 68
43 / 68
44 / 68
44 / 68
44 / 68
44 / 68
44 / 68
44 / 68
44 / 68
44 / 68
45 / 68
45 / 68
45 / 68
45 / 68
45 / 68
45 / 68
45 / 68
46 / 68
46 / 68
46 / 68
46 / 68
46 / 68
47 / 68
47 / 68
47 / 68
47 / 68
47 / 68
48 / 68
48 / 68
48 / 68
48 / 68
48 / 68
49 / 68
49 / 68
49 / 68
49 / 68
49 / 68
50 / 68
50 / 68
50 / 68
51 / 68
52 / 68
52 / 68
52 / 68
52 / 68
53 / 68
54 / 68
54 / 68
55 / 68
55 / 68
55 / 68
56 / 68
57 / 68
58 / 68
58 / 68
58 / 68
59 / 68
59 / 68
59 / 68
59 / 68
60 / 68
61 / 68
62 / 68
63 / 68
63 / 68
63 / 68
63 / 68
63 / 68
64 / 68
65 / 68
66 / 68
◮ Quotient and remainder on natural numbers.
◮ Dijkstra’s algorithm (1997, Benl, Schwichtenberg):
◮ Warshall Algorithm (2001, Schwichtenberg, Seisenberger, B):
66 / 68
◮ Quotient and remainder on natural numbers.
◮ Dijkstra’s algorithm (1997, Benl, Schwichtenberg):
◮ Warshall Algorithm (2001, Schwichtenberg, Seisenberger, B):
◮ GCD (1995, B, Schwichtenberg):
◮ Dickson’s Lemma (2001, Schwichtenberg, Seisenberger, B):
◮ Higman’s Lemma (2008, Seisenberger):
◮ Fibonacci numbers from a classical proofs (2002, Buchholz,
66 / 68
◮ Extraction of normalization-by-evaluation (NbE) (2006,
67 / 68
◮ Extraction of normalization-by-evaluation (NbE) (2006,
◮ Cauchy sequences vs signed digit representation (SD):
◮ Arithmetic operations on reals w.r.t. SD
◮ Integration w.r.t. SD (2011, B):
67 / 68
◮ List reversal
◮ In-place Quicksort (2014, Seisenberger, Woods, B):
68 / 68
◮ List reversal
◮ In-place Quicksort (2014, Seisenberger, Woods, B):
◮ Extraction of a SAT-solver from completeness proof for DPLL
68 / 68
◮ List reversal
◮ In-place Quicksort (2014, Seisenberger, Woods, B):
◮ Extraction of a SAT-solver from completeness proof for DPLL
◮ monadic parsers (Jones, Seisenberger, B) ◮ concurrent programs (Miyamoto, Petrovska, Schwichtenberg,
◮ truly imperative programs (Reus, B) ◮ modulus of uniform continuity from Fan Theorem (B) 68 / 68