author | wenzelm |
Mon, 13 Mar 2000 13:21:39 +0100 | |
changeset 8434 | 5e4bba59bfaa |
parent 8327 | 108fcc85a767 |
child 8948 | b797cfa3548d |
permissions | -rw-r--r-- |
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
1 |
(* Title: HOL/UNITY/Rename.ML |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
2 |
ID: $Id$ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
4 |
Copyright 2000 University of Cambridge |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
5 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
6 |
*) |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
7 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
8 |
Addsimps [image_inv_f_f, image_surj_f_inv_f]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
9 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
10 |
Goal "bij h ==> good_map (%(x,u). h x)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
11 |
by (rtac good_mapI 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
12 |
by (rewrite_goals_tac [bij_def, inj_on_def, surj_def]); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
13 |
by Auto_tac; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
14 |
qed "good_map_bij"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
15 |
Addsimps [good_map_bij]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
16 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
17 |
fun bij_export th = good_map_bij RS export th |> simplify (simpset()); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
18 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
19 |
Goalw [bij_def, split_def] "bij h ==> fst (inv (%(x,u). h x) s) = inv h s"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
20 |
by (Clarify_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
21 |
by (subgoal_tac "surj (%p. h (fst p))" 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
22 |
by (asm_full_simp_tac (simpset() addsimps [surj_def]) 2); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
23 |
by (etac injD 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
24 |
by (asm_simp_tac (simpset() addsimps [surj_f_inv_f]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
25 |
by (etac surj_f_inv_f 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
26 |
qed "fst_o_inv_eq_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
27 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
28 |
Goal "bij h ==> z : h``A = (inv h z : A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
29 |
by (auto_tac (claset() addSIs [image_eqI], |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
30 |
simpset() addsimps [bij_is_inj, bij_is_surj RS surj_f_inv_f])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
31 |
qed "mem_rename_set_iff"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
32 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
33 |
Goal "bij h ==> h``{s. P s} = {s. P (inv h s)}"; |
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
34 |
by (auto_tac (claset() addSIs [image_eqI], |
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
35 |
simpset() addsimps [bij_is_inj, bij_is_surj RS surj_f_inv_f])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
36 |
qed "rename_set_eq_Collect"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
37 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
38 |
Goal "extend_set (%(x,u). h x) A = h``A"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
39 |
by (auto_tac (claset() addSIs [image_eqI], |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
40 |
simpset() addsimps [extend_set_def])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
41 |
qed "extend_set_eq_image"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
42 |
Addsimps [extend_set_eq_image]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
43 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
44 |
Goalw [rename_def] "Init (rename h F) = h``(Init F)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
45 |
by (Simp_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
46 |
qed "Init_rename"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
47 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
48 |
Goalw [rename_def, rename_act_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
49 |
"bij h ==> Acts (rename h F) = (rename_act h `` Acts F)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
50 |
by (asm_simp_tac (simpset() addsimps [export Acts_extend]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
51 |
qed "Acts_rename"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
52 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
53 |
Addsimps [Init_rename, Acts_rename]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
54 |
|
8327 | 55 |
(*Useful if we don't assume bij h*) |
56 |
Goalw [rename_def, rename_act_def, extend_def] |
|
57 |
"Acts (rename h F) = insert Id (rename_act h `` Acts F)"; |
|
58 |
by (asm_simp_tac (simpset() addsimps [export Acts_extend]) 1); |
|
59 |
qed "raw_Acts_rename"; |
|
60 |
||
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
61 |
Goalw [rename_act_def, extend_act_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
62 |
"(s,s') : act ==> (h s, h s') : rename_act h act"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
63 |
by Auto_tac; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
64 |
qed "rename_actI"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
65 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
66 |
Goalw [rename_act_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
67 |
"bij h ==> ((s,s') : rename_act h act) = ((inv h s, inv h s') : act)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
68 |
by (rtac trans 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
69 |
by (etac (bij_export mem_extend_act_iff) 2); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
70 |
by (asm_simp_tac (simpset() addsimps [bij_is_surj RS surj_f_inv_f]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
71 |
qed "mem_rename_act_iff"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
72 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
73 |
Goalw [rename_act_def] "Domain (rename_act h act) = h``(Domain act)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
74 |
by (asm_simp_tac (simpset() addsimps [export Domain_extend_act]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
75 |
qed "Domain_rename_act"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
76 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
77 |
(*** inverse properties ***) |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
78 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
79 |
Goalw [bij_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
80 |
"bij h \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
81 |
\ ==> extend_set (%(x,u::'c). inv h x) = project_set (%(x,u::'c). h x)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
82 |
by (rtac ext 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
83 |
by (auto_tac (claset() addSIs [image_eqI], |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
84 |
simpset() addsimps [extend_set_def, project_set_def, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
85 |
surj_f_inv_f])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
86 |
qed "extend_set_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
87 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
88 |
(** for "rename" (programs) **) |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
89 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
90 |
Goal "bij h \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
91 |
\ ==> extend_act (%(x,u::'c). inv h x) = project_act (%(x,u::'c). h x)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
92 |
by (rtac ext 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
93 |
by (auto_tac (claset() addSIs [image_eqI], |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
94 |
simpset() addsimps [extend_act_def, project_act_def, bij_def, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
95 |
surj_f_inv_f])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
96 |
qed "extend_act_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
97 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
98 |
Goal "bij h \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
99 |
\ ==> extend (%(x,u::'c). inv h x) = project (%(x,u::'c). h x) UNIV"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
100 |
by (ftac bij_imp_bij_inv 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
101 |
by (rtac ext 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
102 |
by (rtac program_equalityI 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
103 |
by (asm_simp_tac |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
104 |
(simpset() addsimps [export project_act_Id, export Acts_extend, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
105 |
insert_Id_image_Acts, extend_act_inv]) 2); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
106 |
by (asm_simp_tac (simpset() addsimps [extend_set_inv]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
107 |
qed "extend_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
108 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
109 |
Goal "bij h ==> rename (inv h) (rename h F) = F"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
110 |
by (asm_simp_tac (simpset() addsimps [rename_def, extend_inv, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
111 |
export extend_inverse]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
112 |
qed "rename_inv_rename"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
113 |
Addsimps [rename_inv_rename]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
114 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
115 |
Goal "bij h ==> rename h (rename (inv h) F) = F"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
116 |
by (ftac bij_imp_bij_inv 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
117 |
by (etac (inv_inv_eq RS subst) 1 THEN etac rename_inv_rename 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
118 |
qed "rename_rename_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
119 |
Addsimps [rename_rename_inv]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
120 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
121 |
Goal "bij h ==> rename (inv h) = inv (rename h)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
122 |
by (rtac (inv_equality RS sym) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
123 |
by Auto_tac; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
124 |
qed "rename_inv_eq"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
125 |
|
8327 | 126 |
(** (rename h) is bijective <=> h is bijective **) |
127 |
||
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
128 |
Goal "bij h ==> inj (rename h)"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
129 |
by (asm_simp_tac (simpset() addsimps [inj_iff, expand_fun_eq, o_def, |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
130 |
rename_inv_eq RS sym]) 1); |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
131 |
qed "inj_rename"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
132 |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
133 |
Goal "bij h ==> surj (rename h)"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
134 |
by (asm_simp_tac (simpset() addsimps [surj_iff, expand_fun_eq, o_def, |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
135 |
rename_inv_eq RS sym]) 1); |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
136 |
qed "surj_rename"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
137 |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
138 |
Goal "bij h ==> bij (rename h)"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
139 |
by (blast_tac (claset() addIs [bijI, inj_rename, surj_rename]) 1); |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
140 |
qed "bij_rename"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
141 |
|
8327 | 142 |
Goalw [inj_on_def] "inj (rename h) ==> inj h"; |
143 |
by Auto_tac; |
|
144 |
by (dres_inst_tac [("x", "mk_program ({x}, {})")] spec 1); |
|
145 |
by (dres_inst_tac [("x", "mk_program ({y}, {})")] spec 1); |
|
146 |
by (auto_tac (claset(), |
|
147 |
simpset() addsimps [program_equality_iff, raw_Acts_rename])); |
|
148 |
qed "inj_rename_imp_inj"; |
|
149 |
||
150 |
Goalw [surj_def] "surj (rename h) ==> surj h"; |
|
151 |
by Auto_tac; |
|
152 |
by (dres_inst_tac [("x", "mk_program ({y}, {})")] spec 1); |
|
153 |
by (auto_tac (claset() addSEs [equalityE], |
|
154 |
simpset() addsimps [program_equality_iff, raw_Acts_rename])); |
|
155 |
qed "surj_rename_imp_surj"; |
|
156 |
||
157 |
Goalw [bij_def] "bij (rename h) ==> bij h"; |
|
158 |
by (asm_simp_tac |
|
159 |
(simpset() addsimps [inj_rename_imp_inj, surj_rename_imp_surj]) 1); |
|
160 |
qed "bij_rename_imp_bij"; |
|
161 |
||
162 |
Goal "bij (rename h) = bij h"; |
|
163 |
by (blast_tac (claset() addIs [bij_rename, bij_rename_imp_bij]) 1); |
|
164 |
qed "bij_rename_iff"; |
|
165 |
AddIffs [bij_rename_iff]; |
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
166 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
167 |
(*** the lattice operations ***) |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
168 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
169 |
Goalw [rename_def] "bij h ==> rename h SKIP = SKIP"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
170 |
by (Asm_simp_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
171 |
qed "rename_SKIP"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
172 |
Addsimps [rename_SKIP]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
173 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
174 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
175 |
"bij h ==> rename h (F Join G) = rename h F Join rename h G"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
176 |
by (asm_simp_tac (simpset() addsimps [export extend_Join]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
177 |
qed "rename_Join"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
178 |
Addsimps [rename_Join]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
179 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
180 |
Goalw [rename_def] "bij h ==> rename h (JOIN I F) = (JN i:I. rename h (F i))"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
181 |
by (asm_simp_tac (simpset() addsimps [export extend_JN]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
182 |
qed "rename_JN"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
183 |
Addsimps [rename_JN]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
184 |
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
185 |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
186 |
(*** Strong Safety: co, stable ***) |
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
187 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
188 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
189 |
"bij h ==> (rename h F : (h``A) co (h``B)) = (F : A co B)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
190 |
by (REPEAT (stac (extend_set_eq_image RS sym) 1)); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
191 |
by (etac (good_map_bij RS export extend_constrains) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
192 |
qed "rename_constrains"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
193 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
194 |
Goalw [stable_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
195 |
"bij h ==> (rename h F : stable (h``A)) = (F : stable A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
196 |
by (asm_simp_tac (simpset() addsimps [rename_constrains]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
197 |
qed "rename_stable"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
198 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
199 |
Goal "bij h ==> (rename h F : invariant (h``A)) = (F : invariant A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
200 |
by (asm_simp_tac (simpset() addsimps [invariant_def, rename_stable, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
201 |
bij_is_inj RS inj_image_subset_iff]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
202 |
qed "rename_invariant"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
203 |
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
204 |
Goal "bij h ==> (rename h F : increasing func) = (F : increasing (func o h))"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
205 |
by (asm_simp_tac |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
206 |
(simpset() addsimps [increasing_def, rename_stable RS sym, |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
207 |
bij_image_Collect_eq, bij_is_surj RS surj_f_inv_f]) 1); |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
208 |
qed "rename_increasing"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
209 |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
210 |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
211 |
(*** Weak Safety: Co, Stable ***) |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
212 |
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
213 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
214 |
"bij h ==> reachable (rename h F) = h `` (reachable F)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
215 |
by (asm_simp_tac (simpset() addsimps [export reachable_extend_eq]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
216 |
qed "reachable_rename_eq"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
217 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
218 |
Goal "bij h ==> (rename h F : (h``A) Co (h``B)) = (F : A Co B)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
219 |
by (asm_simp_tac |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
220 |
(simpset() addsimps [Constrains_def, reachable_rename_eq, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
221 |
rename_constrains, bij_is_inj, image_Int RS sym]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
222 |
qed "rename_Constrains"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
223 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
224 |
Goalw [Stable_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
225 |
"bij h ==> (rename h F : Stable (h``A)) = (F : Stable A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
226 |
by (asm_simp_tac (simpset() addsimps [rename_Constrains]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
227 |
qed "rename_Stable"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
228 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
229 |
Goal "bij h ==> (rename h F : Always (h``A)) = (F : Always A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
230 |
by (asm_simp_tac (simpset() addsimps [Always_def, rename_Stable, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
231 |
bij_is_inj RS inj_image_subset_iff]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
232 |
qed "rename_Always"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
233 |
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
234 |
Goal "bij h ==> (rename h F : Increasing func) = (F : Increasing (func o h))"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
235 |
by (asm_simp_tac |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
236 |
(simpset() addsimps [Increasing_def, rename_Stable RS sym, |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
237 |
bij_image_Collect_eq, bij_is_surj RS surj_f_inv_f]) 1); |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
238 |
qed "rename_Increasing"; |
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
239 |
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
240 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
241 |
(*** Progress: transient, ensures ***) |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
242 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
243 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
244 |
"bij h ==> (rename h F : transient (h``A)) = (F : transient A)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
245 |
by (stac (extend_set_eq_image RS sym) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
246 |
by (etac (good_map_bij RS export extend_transient) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
247 |
qed "rename_transient"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
248 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
249 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
250 |
"bij h ==> (rename h F : (h``A) ensures (h``B)) = (F : A ensures B)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
251 |
by (REPEAT (stac (extend_set_eq_image RS sym) 1)); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
252 |
by (etac (good_map_bij RS export extend_ensures) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
253 |
qed "rename_ensures"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
254 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
255 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
256 |
"bij h ==> (rename h F : (h``A) leadsTo (h``B)) = (F : A leadsTo B)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
257 |
by (REPEAT (stac (extend_set_eq_image RS sym) 1)); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
258 |
by (etac (good_map_bij RS export extend_leadsTo) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
259 |
qed "rename_leadsTo"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
260 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
261 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
262 |
"bij h ==> (rename h F : (h``A) LeadsTo (h``B)) = (F : A LeadsTo B)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
263 |
by (REPEAT (stac (extend_set_eq_image RS sym) 1)); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
264 |
by (etac (good_map_bij RS export extend_LeadsTo) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
265 |
qed "rename_LeadsTo"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
266 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
267 |
Goalw [rename_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
268 |
"bij h ==> (rename h F : (rename h `` X) guarantees[v o inv h] \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
269 |
\ (rename h `` Y)) = \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
270 |
\ (F : X guarantees[v] Y)"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
271 |
by (stac (good_map_bij RS export extend_guarantees_eq RS sym) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
272 |
by (assume_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
273 |
by (asm_simp_tac (simpset() addsimps [fst_o_inv_eq_inv, o_def]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
274 |
qed "rename_rename_guarantees_eq"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
275 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
276 |
Goal "bij h ==> (rename h F : X guarantees[v] Y) = \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
277 |
\ (F : (rename (inv h) `` X) guarantees[v o h] \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
278 |
\ (rename (inv h) `` Y))"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
279 |
by (stac (rename_rename_guarantees_eq RS sym) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
280 |
by (assume_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
281 |
by (asm_simp_tac |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
282 |
(simpset() addsimps [image_eq_UN, o_def, bij_is_surj RS surj_f_inv_f]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
283 |
qed "rename_guarantees_eq_rename_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
284 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
285 |
Goal "bij h ==> (rename h G : preserves v) = (G : preserves (v o h))"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
286 |
by (stac (good_map_bij RS export extend_preserves RS sym) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
287 |
by (assume_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
288 |
by (asm_simp_tac (simpset() addsimps [o_def, fst_o_inv_eq_inv, rename_def, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
289 |
bij_is_surj RS surj_f_inv_f]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
290 |
qed "rename_preserves"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
291 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
292 |
|
8314 | 293 |
(*** "image" versions of the rules, for lifting "guarantees" properties ***) |
294 |
||
295 |
||
296 |
(*Tactic used in all the proofs. Better would have been to prove one |
|
297 |
meta-theorem, but how can we handle the polymorphism? E.g. in |
|
298 |
rename_constrains the two appearances of "co" have different types!*) |
|
299 |
fun rename_image_tac ths = |
|
300 |
EVERY [Auto_tac, |
|
301 |
(rename_tac "F" 2), |
|
302 |
(subgoal_tac "EX G. F = rename h G" 2), |
|
303 |
(auto_tac (claset() addSIs [surj_rename RS surj_f_inv_f RS sym], |
|
304 |
simpset() addsimps ths))]; |
|
305 |
||
306 |
Goal "bij h ==> rename h `` (A co B) = (h `` A) co (h``B)"; |
|
307 |
by (rename_image_tac [rename_constrains]); |
|
308 |
qed "rename_image_constrains"; |
|
309 |
||
310 |
Goal "bij h ==> rename h `` stable A = stable (h `` A)"; |
|
311 |
by (rename_image_tac [rename_stable]); |
|
312 |
qed "rename_image_stable"; |
|
313 |
||
314 |
Goal "bij h ==> rename h `` increasing func = increasing (func o inv h)"; |
|
315 |
by (rename_image_tac [rename_increasing, o_def, bij_is_inj]); |
|
316 |
qed "rename_image_increasing"; |
|
317 |
||
318 |
Goal "bij h ==> rename h `` invariant A = invariant (h `` A)"; |
|
319 |
by (rename_image_tac [rename_invariant]); |
|
320 |
qed "rename_image_invariant"; |
|
321 |
||
322 |
Goal "bij h ==> rename h `` (A Co B) = (h `` A) Co (h``B)"; |
|
323 |
by (rename_image_tac [rename_Constrains]); |
|
324 |
qed "rename_image_Constrains"; |
|
325 |
||
326 |
Goal "bij h ==> rename h `` Stable A = Stable (h `` A)"; |
|
327 |
by (rename_image_tac [rename_Stable]); |
|
328 |
qed "rename_image_Stable"; |
|
329 |
||
330 |
Goal "bij h ==> rename h `` Increasing func = Increasing (func o inv h)"; |
|
331 |
by (rename_image_tac [rename_Increasing, o_def, bij_is_inj]); |
|
332 |
qed "rename_image_Increasing"; |
|
333 |
||
334 |
Goal "bij h ==> rename h `` Always A = Always (h `` A)"; |
|
335 |
by (rename_image_tac [rename_Always]); |
|
336 |
qed "rename_image_Always"; |
|
337 |
||
338 |
Goal "bij h ==> rename h `` (A leadsTo B) = (h `` A) leadsTo (h``B)"; |
|
339 |
by (rename_image_tac [rename_leadsTo]); |
|
340 |
qed "rename_image_leadsTo"; |
|
341 |
||
342 |
Goal "bij h ==> rename h `` (A LeadsTo B) = (h `` A) LeadsTo (h``B)"; |
|
343 |
by (rename_image_tac [rename_LeadsTo]); |
|
344 |
qed "rename_image_LeadsTo"; |
|
345 |
||
346 |
||
347 |
||
348 |
||
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
349 |
(** junk |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
350 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
351 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
352 |
Goalw [extend_act_def, project_act_def, surj_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
353 |
"surj h ==> extend_act (%(x,u). h x) (project_act (%(x,u). h x) act) = act"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
354 |
by Auto_tac; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
355 |
by (forw_inst_tac [("x", "a")] spec 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
356 |
by (dres_inst_tac [("x", "b")] spec 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
357 |
by Auto_tac; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
358 |
qed "project_act_inverse"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
359 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
360 |
Goal "bij h ==> rename h (rename (inv h) F) = F"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
361 |
by (rtac program_equalityI 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
362 |
by (Asm_simp_tac 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
363 |
by (asm_simp_tac |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
364 |
(simpset() addsimps [rename_def, inverse_def, export Acts_extend, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
365 |
image_eq_UN, export extend_act_Id, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
366 |
bij_is_surj RS project_act_inverse]) 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
367 |
qed "rename_rename_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
368 |
Addsimps [rename_rename_inv]; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
369 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
370 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
371 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
372 |
Goalw [bij_def] |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
373 |
"bij h \ |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
374 |
\ ==> extend_set (%(x,u::'c). inv h x) = inv (extend_set (%(x,u::'c). h x))"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
375 |
by (rtac ext 1); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
376 |
by (auto_tac (claset() addSIs [image_eqI], |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
377 |
simpset() addsimps [extend_set_def, project_set_def, |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
378 |
surj_f_inv_f])); |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
379 |
qed "extend_set_inv"; |
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
380 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
381 |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
382 |
***) |