src/LCF/ex/Ex1.ML
author wenzelm
Mon, 22 Jun 1998 15:09:59 +0200
changeset 5061 f947332d5465
parent 4905 be73ddff6c5a
child 17248 81bf91654e73
permissions -rw-r--r--
isatool fixgoal;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4905
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     1
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     2
simpset_ref() := LCF_ss;
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     3
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     4
Addsimps [P_strict,K];
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     5
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     6
val H_unfold = prove_goal thy "H = K(H)"
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     7
 (fn _ => [stac H 1, rtac (FIX_eq RS sym) 1]);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     8
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
     9
bind_thm ("H_unfold", H_unfold);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    10
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    11
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    12
val H_strict = prove_goal thy "H(UU)=UU"
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    13
 (fn _ => [stac H_unfold 1, Simp_tac 1]);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    14
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    15
bind_thm ("H_strict", H_strict);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    16
Addsimps [H_strict];
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    17
5061
f947332d5465 isatool fixgoal;
wenzelm
parents: 4905
diff changeset
    18
Goal "ALL x. H(FIX(K,x)) = FIX(K,x)";
4905
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    19
by (induct_tac "K" 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    20
by (Simp_tac 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    21
by (simp_tac (simpset() setloop (split_tac [COND_cases_iff])) 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    22
by (strip_tac 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    23
by (stac H_unfold 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    24
by (Asm_simp_tac 1);
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    25
qed "H_idemp_lemma";
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    26
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    27
val H_idemp = rewrite_rule [mk_meta_eq (H RS sym)] H_idemp_lemma;
be73ddff6c5a proper thy files;
wenzelm
parents:
diff changeset
    28
bind_thm ("H_idemp", H_idemp);