equal
deleted
inserted
replaced
17 begin |
17 begin |
18 fun Step :: "'a \<Rightarrow> 'a acom \<Rightarrow> 'a acom" where |
18 fun Step :: "'a \<Rightarrow> 'a acom \<Rightarrow> 'a acom" where |
19 "Step S (SKIP {Q}) = (SKIP {S})" | |
19 "Step S (SKIP {Q}) = (SKIP {S})" | |
20 "Step S (x ::= e {Q}) = |
20 "Step S (x ::= e {Q}) = |
21 x ::= e {f x e S}" | |
21 x ::= e {f x e S}" | |
22 "Step S (C1; C2) = Step S C1; Step (post C1) C2" | |
22 "Step S (C1;; C2) = Step S C1;; Step (post C1) C2" | |
23 "Step S (IF b THEN {P1} C1 ELSE {P2} C2 {Q}) = |
23 "Step S (IF b THEN {P1} C1 ELSE {P2} C2 {Q}) = |
24 IF b THEN {g b S} Step P1 C1 ELSE {g (Not b) S} Step P2 C2 |
24 IF b THEN {g b S} Step P1 C1 ELSE {g (Not b) S} Step P2 C2 |
25 {post C1 \<squnion> post C2}" | |
25 {post C1 \<squnion> post C2}" | |
26 "Step S ({I} WHILE b DO {P} C {Q}) = |
26 "Step S ({I} WHILE b DO {P} C {Q}) = |
27 {S \<squnion> post C} WHILE b DO {g b I} Step P C {g (Not b) I}" |
27 {S \<squnion> post C} WHILE b DO {g b I} Step P C {g (Not b) I}" |
67 by (cases c) (auto simp:less_eq_acom_def anno_def) |
67 by (cases c) (auto simp:less_eq_acom_def anno_def) |
68 |
68 |
69 lemma Assign_le[simp]: "x ::= e {S} \<le> c \<longleftrightarrow> (\<exists>S'. c = x ::= e {S'} \<and> S \<le> S')" |
69 lemma Assign_le[simp]: "x ::= e {S} \<le> c \<longleftrightarrow> (\<exists>S'. c = x ::= e {S'} \<and> S \<le> S')" |
70 by (cases c) (auto simp:less_eq_acom_def anno_def) |
70 by (cases c) (auto simp:less_eq_acom_def anno_def) |
71 |
71 |
72 lemma Seq_le[simp]: "C1;C2 \<le> C \<longleftrightarrow> (\<exists>C1' C2'. C = C1';C2' \<and> C1 \<le> C1' \<and> C2 \<le> C2')" |
72 lemma Seq_le[simp]: "C1;;C2 \<le> C \<longleftrightarrow> (\<exists>C1' C2'. C = C1';;C2' \<and> C1 \<le> C1' \<and> C2 \<le> C2')" |
73 apply (cases C) |
73 apply (cases C) |
74 apply(auto simp: less_eq_acom_annos list_all2_append size_annos_same2) |
74 apply(auto simp: less_eq_acom_annos list_all2_append size_annos_same2) |
75 done |
75 done |
76 |
76 |
77 lemma If_le[simp]: "IF b THEN {p1} C1 ELSE {p2} C2 {S} \<le> C \<longleftrightarrow> |
77 lemma If_le[simp]: "IF b THEN {p1} C1 ELSE {p2} C2 {S} \<le> C \<longleftrightarrow> |