src/ZF/IMP/Denotation.ML
author wenzelm
Sat, 02 Sep 2000 21:51:14 +0200
changeset 9805 10b617bdd028
parent 9177 199b43f712af
child 11320 56aa53caf333
permissions -rw-r--r--
added "slowsimp", "bestsimp";
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 511
diff changeset
     1
(*  Title:      ZF/IMP/Denotation.ML
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 511
diff changeset
     3
    Author:     Heiko Loetzbeyer & Robert Sandner, TUM
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     4
    Copyright   1994 TUM
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     5
*)
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     6
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
     7
(** Rewrite Rules for A,B,C **)
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
     8
Addsimps [A_nat_def,A_loc_def,A_op1_def,A_op2_def];
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
     9
Addsimps [B_true_def,B_false_def,B_op_def,B_not_def,B_and_def,B_or_def];
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    10
Addsimps [C_skip_def,C_assign_def,C_comp_def,C_if_def,C_while_def]; 
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    11
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    12
(** Type_intr for A **)
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    13
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    14
Goal "[|a:aexp; sigma:loc->nat|] ==> A(a,sigma):nat";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    15
by (etac aexp.induct 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    16
by (ALLGOALS Asm_simp_tac);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    17
by (ALLGOALS (fast_tac (claset() addSIs [apply_type])));
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    18
qed "A_type";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    19
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    20
(** Type_intr for B **)
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    21
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    22
Goal "[|b:bexp; sigma:loc->nat|] ==> B(b,sigma):bool";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    23
by (etac bexp.induct 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    24
by (ALLGOALS Asm_simp_tac);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    25
by (ALLGOALS (fast_tac (claset() addSIs [apply_type,A_type]@bool_typechecks)));
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    26
qed "B_type";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    27
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    28
(** C_subset **)
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    29
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    30
Goal "c:com ==> C(c) <= (loc->nat)*(loc->nat)";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    31
by (etac com.induct 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    32
by (ALLGOALS Asm_simp_tac);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    33
by (ALLGOALS (fast_tac (claset() addDs [lfp_subset RS subsetD])));
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    34
qed "C_subset";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    35
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    36
(** Type_elims for C **)
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    37
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    38
Goal "[| <x,y>:C(c); c:com |] ==> x:loc->nat & y:loc->nat";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    39
by (blast_tac (claset() addDs [C_subset RS subsetD]) 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    40
qed "C_type_D";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    41
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    42
Goal "[| x:C(c); c:com |] ==> fst(x):loc->nat";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    43
by (dtac (C_subset RS subsetD) 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    44
by (atac 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    45
by (etac SigmaE 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    46
by (Asm_simp_tac 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    47
qed "C_type_fst";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    48
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    49
AddDs [C_type_D, C_type_fst];
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    50
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    51
(** bnd_mono (nat->nat*nat->nat,Gamma(b,c) **)
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    52
9177
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    53
Goalw [bnd_mono_def,Gamma_def]
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    54
     "c:com ==> bnd_mono ((loc->nat)*(loc->nat),Gamma(b,c))";
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    55
by (Blast_tac 1);
199b43f712af fixed some weak elim rules
paulson
parents: 4298
diff changeset
    56
qed "Gamma_bnd_mono";
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    57
4298
b69eedd3aa6c Tidying and modification to cope with iffCE
paulson
parents: 4091
diff changeset
    58
(** End ***)