equal
deleted
inserted
replaced
21 WhileFalse: "\<not>bval b s \<Longrightarrow> (WHILE b DO c,s) \<Rightarrow> s" | |
21 WhileFalse: "\<not>bval b s \<Longrightarrow> (WHILE b DO c,s) \<Rightarrow> s" | |
22 WhileTrue: "\<lbrakk> bval b s\<^isub>1; (c,s\<^isub>1) \<Rightarrow> s\<^isub>2; (WHILE b DO c, s\<^isub>2) \<Rightarrow> s\<^isub>3 \<rbrakk> \<Longrightarrow> |
22 WhileTrue: "\<lbrakk> bval b s\<^isub>1; (c,s\<^isub>1) \<Rightarrow> s\<^isub>2; (WHILE b DO c, s\<^isub>2) \<Rightarrow> s\<^isub>3 \<rbrakk> \<Longrightarrow> |
23 (WHILE b DO c, s\<^isub>1) \<Rightarrow> s\<^isub>3" |
23 (WHILE b DO c, s\<^isub>1) \<Rightarrow> s\<^isub>3" |
24 text_raw{*}\end{isaverbatimwrite}*} |
24 text_raw{*}\end{isaverbatimwrite}*} |
25 |
25 |
|
26 text_raw{*\begin{isaverbatimwrite}\newcommand{\BigStepEx}{% *} |
26 schematic_lemma ex: "(''x'' ::= N 5; ''y'' ::= V ''x'', s) \<Rightarrow> ?t" |
27 schematic_lemma ex: "(''x'' ::= N 5; ''y'' ::= V ''x'', s) \<Rightarrow> ?t" |
27 apply(rule Semi) |
28 apply(rule Semi) |
28 apply(rule Assign) |
29 apply(rule Assign) |
29 apply simp |
30 apply simp |
30 apply(rule Assign) |
31 apply(rule Assign) |
31 done |
32 done |
|
33 text_raw{*}\end{isaverbatimwrite}*} |
32 |
34 |
33 thm ex[simplified] |
35 thm ex[simplified] |
34 |
36 |
35 text{* We want to execute the big-step rules: *} |
37 text{* We want to execute the big-step rules: *} |
36 |
38 |
226 |
228 |
227 text {* |
229 text {* |
228 This is the proof as you might present it in a lecture. The remaining |
230 This is the proof as you might present it in a lecture. The remaining |
229 cases are simple enough to be proved automatically: |
231 cases are simple enough to be proved automatically: |
230 *} |
232 *} |
231 text_raw{*\begin{isaverbatimwrite}\newcommand{\BigStepDet2}{% *} |
233 text_raw{*\begin{isaverbatimwrite}\newcommand{\BigStepDetLong}{% *} |
232 theorem |
234 theorem |
233 "(c,s) \<Rightarrow> t \<Longrightarrow> (c,s) \<Rightarrow> t' \<Longrightarrow> t' = t" |
235 "(c,s) \<Rightarrow> t \<Longrightarrow> (c,s) \<Rightarrow> t' \<Longrightarrow> t' = t" |
234 proof (induction arbitrary: t' rule: big_step.induct) |
236 proof (induction arbitrary: t' rule: big_step.induct) |
235 -- "the only interesting case, @{text WhileTrue}:" |
237 -- "the only interesting case, @{text WhileTrue}:" |
236 fix b c s s1 t t' |
238 fix b c s s1 t t' |