8011
|
1 |
(* Title: HOL/MicroJava/BV/Convert.ML
|
|
2 |
ID: $Id$
|
|
3 |
Author: Cornelia Pusch
|
|
4 |
Copyright 1999 Technische Universitaet Muenchen
|
|
5 |
*)
|
|
6 |
|
8139
|
7 |
|
|
8 |
Goalw[sup_ty_opt_def] "G \\<turnstile> t <=o t";
|
|
9 |
by (exhaust_tac "t" 1);
|
|
10 |
by Auto_tac;
|
|
11 |
qed "sup_ty_opt_refl";
|
|
12 |
Addsimps [sup_ty_opt_refl];
|
|
13 |
|
|
14 |
Goalw[sup_loc_def] "G \\<turnstile> t <=l t";
|
|
15 |
by (induct_tac "t" 1);
|
|
16 |
by Auto_tac;
|
|
17 |
qed "sup_loc_refl";
|
|
18 |
Addsimps [sup_loc_refl];
|
|
19 |
|
|
20 |
Goalw[sup_state_def] "G \\<turnstile> s <=s s";
|
|
21 |
by Auto_tac;
|
|
22 |
qed "sup_state_refl";
|
|
23 |
Addsimps [sup_state_refl];
|
|
24 |
|
8011
|
25 |
val widen_PrimT_conv1 =
|
|
26 |
prove_typerel "(G \\<turnstile> PrimT x \\<preceq> T) = (T = PrimT x)"
|
|
27 |
[ prove_widen_lemma "G\\<turnstile>S\\<preceq>T \\<Longrightarrow> S = PrimT x \\<longrightarrow> T = PrimT x"];
|
|
28 |
Addsimps [widen_PrimT_conv1];
|
|
29 |
|
8023
|
30 |
Goalw [sup_ty_opt_def] "(G \\<turnstile> None <=o any) = (any = None)";
|
8011
|
31 |
by(simp_tac (simpset() addsplits [option.split]) 1);
|
|
32 |
qed "anyConvNone";
|
|
33 |
Addsimps [anyConvNone];
|
|
34 |
|
8023
|
35 |
Goalw [sup_ty_opt_def] "(G \\<turnstile> Some ty' <=o Some ty) = (G \\<turnstile> ty' \\<preceq> ty)";
|
8011
|
36 |
by(Simp_tac 1);
|
|
37 |
qed "SomeanyConvSome";
|
|
38 |
Addsimps [SomeanyConvSome];
|
|
39 |
|
|
40 |
Goal
|
8023
|
41 |
"(G \\<turnstile> Some(PrimT Integer) <=o X) = (X=None \\<or> (X=Some(PrimT Integer)))";
|
8011
|
42 |
by (simp_tac (simpset() setloop (split_tac [ty.split,option.split]) addsimps [sup_ty_opt_def]) 1);
|
|
43 |
qed "sup_PTS_eq";
|
|
44 |
|
|
45 |
|
|
46 |
|
8119
|
47 |
Goalw [sup_loc_def] "CFS \\<turnstile> [] <=l XT = (XT=[])";
|
|
48 |
by(Simp_tac 1);
|
8011
|
49 |
qed "sup_loc_Nil";
|
8119
|
50 |
AddIffs [sup_loc_Nil];
|
|
51 |
|
8011
|
52 |
|
8119
|
53 |
Goalw [sup_loc_def]
|
8023
|
54 |
"CFS \\<turnstile> (Y#YT) <=l XT = (\\<exists>X XT'. XT=X#XT' \\<and> CFS \\<turnstile> Y <=o X \\<and> CFS \\<turnstile> YT <=l XT')";
|
8119
|
55 |
by(simp_tac (simpset() addsimps [list_all2_Cons1]) 1);
|
8011
|
56 |
qed "sup_loc_Cons";
|
8119
|
57 |
AddIffs [sup_loc_Cons];
|
8139
|
58 |
|