Concrete Semantics
with Isabelle/HOL Tobias Nipkow
Fakult¨ at f¨ ur Informatik Technische Universit¨ at M¨ unchen
2017-3-8
1
Concrete Semantics with Isabelle/HOL Tobias Nipkow Fakult at f - - PowerPoint PPT Presentation
Concrete Semantics with Isabelle/HOL Tobias Nipkow Fakult at f ur Informatik Technische Universit at M unchen 2017-3-8 1 Part I Isabelle 2 Chapter 2 Programming and Proving 3 1 Overview of Isabelle/HOL 2 Type and function
Fakult¨ at f¨ ur Informatik Technische Universit¨ at M¨ unchen
1
2
3
1 Overview of Isabelle/HOL 2 Type and function definitions 3 Induction Heuristics 4 Simplification
4
6
1 Overview of Isabelle/HOL 2 Type and function definitions 3 Induction Heuristics 4 Simplification
7
8
1 Overview of Isabelle/HOL
9
′a | ′b | . . .
10
11
12
13
(the argument of every function call must be of the right type)
14
15
16
17
18
19
1 Overview of Isabelle/HOL
20
21
22
1 Overview of Isabelle/HOL
23
24
′a ⇒ ′a ⇒ ′a
25
26
27
′a list = Nil | Cons ′a ( ′a list)
28
29
30
31
32
1 Overview of Isabelle/HOL
33
34
35
36
37
38
39
1 Overview of Isabelle/HOL 2 Type and function definitions 3 Induction Heuristics 4 Simplification
40
2 Type and function definitions
41
42
43
44
45
46
2 Type and function definitions
47
48
49
50
51
52
53
1 Overview of Isabelle/HOL 2 Type and function definitions 3 Induction Heuristics 4 Simplification
54
55
56
57
58
59
60
61
62
63
1 Overview of Isabelle/HOL 2 Type and function definitions 3 Induction Heuristics 4 Simplification
64
65
(1)
(2)
(3)
(4)
66
67
68
69
70
71
72
73
74
5 Case Study: IMP Expressions
75
5 Case Study: IMP Expressions
76
77
5 Case Study: IMP Expressions
78
❅ ❅ ❅
❆ ❆ ❆ ✁ ✁ ✁
79
80
81
82
83
84
85
86
5 Case Study: IMP Expressions
87
88
5 Case Study: IMP Expressions
89
90
91
92
6 Logical Formulas 7 Proof Automation 8 Single Step Proofs 9 Inductive Definitions
93
6 Logical Formulas 7 Proof Automation 8 Single Step Proofs 9 Inductive Definitions
94
form ::= (form) | term = term | ¬form | form ∧ form | form ∨ form | form − → form | ∀x. form | ∃x. form
← → (same precedence as − →)
95
96
97
98
′a set
99
100
6 Logical Formulas 7 Proof Automation 8 Single Step Proofs 9 Inductive Definitions
101
102
103
104
105
106
1Automatic Theorem Provers
107
108
109
6 Logical Formulas 7 Proof Automation 8 Single Step Proofs 9 Inductive Definitions
110
111
112
113
114
115
116
117
118
119
120
6 Logical Formulas 7 Proof Automation 8 Single Step Proofs 9 Inductive Definitions
121
122
123
124
125
126
127
128
129
130
131
10 Isar by example 11 Proof patterns 12 Streamlining Proofs 13 Proof by Cases and Induction
132
133
134
135
136
10 Isar by example 11 Proof patterns 12 Streamlining Proofs 13 Proof by Cases and Induction
137
default proof: assume surj, show False
138
139
140
141
no automatic proof step
142
143
144
10 Isar by example 11 Proof patterns 12 Streamlining Proofs 13 Proof by Cases and Induction
145
146
147
148
local fixed variable
149
x fixed local variable
150
151
152
153
10 Isar by example 11 Proof patterns 12 Streamlining Proofs 13 Proof by Cases and Induction
154
12 Streamlining Proofs
155
156
157
158
↑ ↑
159
160
12 Streamlining Proofs
161
162
163
164
12 Streamlining Proofs
165
166
12 Streamlining Proofs
167
168
169
170
10 Isar by example 11 Proof patterns 12 Streamlining Proofs 13 Proof by Cases and Induction
171
172
173
174
175
show A(n) = ⇒ P(n) proof (induction n) case 0 ≡ assume 0: A(0) . . . let ?case = P(0) show ?case next case (Suc n) ≡ fix n . . . assume Suc: A(n) = ⇒ P(n) A(Suc n) . . . let ?case = P(Suc n) show ?case qed
176
177
178
13 Proof by Cases and Induction
179
180
inductive I :: τ ⇒ σ ⇒ bool where rule1: . . . . . . rulen: . . . show I x y = ⇒ P x y proof (induction rule: I.induct) case rule1 . . . show ?case next . . . next case rulen . . . show ?case qed
181
182
183
13 Proof by Cases and Induction
184
185
186
187