src/HOL/Induct/Com.ML
changeset 5143 b94cd208f073
parent 5069 3ea049f7979d
child 5223 4cb05273f764
equal deleted inserted replaced
5142:c56aa8b59dc0 5143:b94cd208f073
    17 val exec_WHILE_case = exec.mk_cases exp.simps "(WHILE b DO c,s) -[eval]-> t";
    17 val exec_WHILE_case = exec.mk_cases exp.simps "(WHILE b DO c,s) -[eval]-> t";
    18 
    18 
    19 AddSEs exec_elim_cases;
    19 AddSEs exec_elim_cases;
    20 
    20 
    21 (*This theorem justifies using "exec" in the inductive definition of "eval"*)
    21 (*This theorem justifies using "exec" in the inductive definition of "eval"*)
    22 Goalw exec.defs "!!A B. A<=B ==> exec(A) <= exec(B)";
    22 Goalw exec.defs "A<=B ==> exec(A) <= exec(B)";
    23 by (rtac lfp_mono 1);
    23 by (rtac lfp_mono 1);
    24 by (REPEAT (ares_tac basic_monos 1));
    24 by (REPEAT (ares_tac basic_monos 1));
    25 qed "exec_mono";
    25 qed "exec_mono";
    26 
    26 
    27 
    27 
    28 Unify.trace_bound := 30;
    28 Unify.trace_bound := 30;
    29 Unify.search_bound := 60;
    29 Unify.search_bound := 60;
    30 
    30 
    31 (*Command execution is functional (deterministic) provided evaluation is*)
    31 (*Command execution is functional (deterministic) provided evaluation is*)
    32 Goal "!!x. Function ev ==> Function(exec ev)";
    32 Goal "Function ev ==> Function(exec ev)";
    33 by (simp_tac (simpset() addsimps [Function_def, Unique_def]) 1);
    33 by (simp_tac (simpset() addsimps [Function_def, Unique_def]) 1);
    34 by (REPEAT (rtac allI 1));
    34 by (REPEAT (rtac allI 1));
    35 by (rtac impI 1);
    35 by (rtac impI 1);
    36 by (etac exec.induct 1);
    36 by (etac exec.induct 1);
    37 by (Blast_tac 3);
    37 by (Blast_tac 3);
    46 
    46 
    47 Goalw [assign_def] "(s[v/x])x = v";
    47 Goalw [assign_def] "(s[v/x])x = v";
    48 by (Simp_tac 1);
    48 by (Simp_tac 1);
    49 qed "assign_same";
    49 qed "assign_same";
    50 
    50 
    51 Goalw [assign_def] "!!y. y~=x ==> (s[v/x])y = s y";
    51 Goalw [assign_def] "y~=x ==> (s[v/x])y = s y";
    52 by (Asm_simp_tac 1);
    52 by (Asm_simp_tac 1);
    53 qed "assign_different";
    53 qed "assign_different";
    54 
    54 
    55 Goalw [assign_def] "s[s x/x] = s";
    55 Goalw [assign_def] "s[s x/x] = s";
    56 by (rtac ext 1);
    56 by (rtac ext 1);