src/HOLCF/IMP/HoareEx.ML
changeset 4423 a129b817b58a
parent 4098 71e05eb27fb6
child 4833 2e53109d4bc8
equal deleted inserted replaced
4422:21238c9d363e 4423:a129b817b58a
     6 Correctness of while-loop.
     6 Correctness of while-loop.
     7 *)
     7 *)
     8 
     8 
     9 val prems = goalw thy [hoare_valid_def]
     9 val prems = goalw thy [hoare_valid_def]
    10 "|= {A} c {A} ==> |= {A} WHILE b DO c {%s. A s & ~b s}";
    10 "|= {A} c {A} ==> |= {A} WHILE b DO c {%s. A s & ~b s}";
    11 by(cut_facts_tac prems 1);
    11 by (cut_facts_tac prems 1);
    12 by (Simp_tac 1);
    12 by (Simp_tac 1);
    13 by (rtac fix_ind 1);
    13 by (rtac fix_ind 1);
    14   (* simplifier with enhanced adm-tactic: *)
    14   (* simplifier with enhanced adm-tactic: *)
    15   by (Simp_tac 1);
    15   by (Simp_tac 1);
    16  by (Simp_tac 1);
    16  by (Simp_tac 1);
    17 by (simp_tac (simpset() setloop (split_tac[expand_if])) 1);
    17 by (simp_tac (simpset() setloop (split_tac[expand_if])) 1);
    18 by(Blast_tac 1);
    18 by (Blast_tac 1);
    19 qed "WHILE_rule_sound";
    19 qed "WHILE_rule_sound";