src/HOL/IMP/Collecting.thy
changeset 51630 603436283686
parent 51629 f0b375b69292
child 52019 a4cbca8f7342
equal deleted inserted replaced
51629:f0b375b69292 51630:603436283686
    19 "Step f g S (IF b THEN {P1} C1 ELSE {P2} C2 {Q}) =
    19 "Step f g S (IF b THEN {P1} C1 ELSE {P2} C2 {Q}) =
    20   IF b THEN {g b S} Step f g P1 C1 ELSE {g (Not b) S} Step f g P2 C2
    20   IF b THEN {g b S} Step f g P1 C1 ELSE {g (Not b) S} Step f g P2 C2
    21   {post C1 \<squnion> post C2}" |
    21   {post C1 \<squnion> post C2}" |
    22 "Step f g S ({I} WHILE b DO {P} C {Q}) =
    22 "Step f g S ({I} WHILE b DO {P} C {Q}) =
    23   {S \<squnion> post C} WHILE b DO {g b I} Step f g P C {g (Not b) I}"
    23   {S \<squnion> post C} WHILE b DO {g b I} Step f g P C {g (Not b) I}"
    24 
       
    25 (* Could hide f and g like this:
       
    26 consts fa :: "vname \<Rightarrow> aexp \<Rightarrow> 'a \<Rightarrow> 'a::sup"
       
    27        fb :: "bexp \<Rightarrow> 'a \<Rightarrow> 'a::sup"
       
    28 abbreviation "STEP == Step fa fb"
       
    29 thm Step.simps[where f = fa and g = fb]
       
    30 *)
       
    31 
    24 
    32 lemma strip_Step[simp]: "strip(Step f g S C) = strip C"
    25 lemma strip_Step[simp]: "strip(Step f g S C) = strip C"
    33 by(induct C arbitrary: S) auto
    26 by(induct C arbitrary: S) auto
    34 
    27 
    35 
    28