| author | wenzelm |
| Sun, 16 Jul 2000 20:49:56 +0200 | |
| changeset 9355 | 1b2cd40579c6 |
| parent 9190 | b86ff604729f |
| child 9403 | aad13b59b8d9 |
| 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 "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
|
34 |
by (auto_tac (claset() addSIs [image_eqI], |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
35 |
simpset() addsimps [extend_set_def])); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
36 |
qed "extend_set_eq_image"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
37 |
Addsimps [extend_set_eq_image]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
38 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
39 |
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
|
40 |
by (Simp_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
41 |
qed "Init_rename"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
42 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
43 |
Goalw [rename_def, rename_act_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
44 |
"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
|
45 |
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
|
46 |
qed "Acts_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 |
Addsimps [Init_rename, Acts_rename]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
49 |
|
| 8327 | 50 |
(*Useful if we don't assume bij h*) |
51 |
Goalw [rename_def, rename_act_def, extend_def] |
|
52 |
"Acts (rename h F) = insert Id (rename_act h `` Acts F)"; |
|
53 |
by (asm_simp_tac (simpset() addsimps [export Acts_extend]) 1); |
|
54 |
qed "raw_Acts_rename"; |
|
55 |
||
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
56 |
Goalw [rename_act_def, extend_act_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
57 |
"(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
|
58 |
by Auto_tac; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
59 |
qed "rename_actI"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
60 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
61 |
Goalw [rename_act_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
62 |
"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
|
63 |
by (rtac trans 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
64 |
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
|
65 |
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
|
66 |
qed "mem_rename_act_iff"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
67 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
68 |
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
|
69 |
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
|
70 |
qed "Domain_rename_act"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
71 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
72 |
(*** inverse properties ***) |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
73 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
74 |
Goalw [bij_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
75 |
"bij h \ |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
76 |
\ ==> 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
|
77 |
by (rtac ext 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
78 |
by (auto_tac (claset() addSIs [image_eqI], |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
79 |
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
|
80 |
surj_f_inv_f])); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
81 |
qed "extend_set_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
82 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
83 |
(** for "rename" (programs) **) |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
84 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
85 |
Goal "bij h \ |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
86 |
\ ==> 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
|
87 |
by (rtac ext 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
88 |
by (auto_tac (claset() addSIs [image_eqI], |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
89 |
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
|
90 |
surj_f_inv_f])); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
91 |
qed "extend_act_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
92 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
93 |
Goal "bij h \ |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
94 |
\ ==> 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
|
95 |
by (ftac bij_imp_bij_inv 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
96 |
by (rtac ext 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
97 |
by (rtac program_equalityI 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
98 |
by (asm_simp_tac |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
99 |
(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
|
100 |
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
|
101 |
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
|
102 |
qed "extend_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
103 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
104 |
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
|
105 |
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
|
106 |
export extend_inverse]) 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
107 |
qed "rename_inv_rename"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
108 |
Addsimps [rename_inv_rename]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
109 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
110 |
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
|
111 |
by (ftac bij_imp_bij_inv 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
112 |
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
|
113 |
qed "rename_rename_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
114 |
Addsimps [rename_rename_inv]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
115 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
116 |
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
|
117 |
by (rtac (inv_equality RS sym) 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
118 |
by Auto_tac; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
119 |
qed "rename_inv_eq"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
120 |
|
| 8327 | 121 |
(** (rename h) is bijective <=> h is bijective **) |
122 |
||
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
123 |
Goal "bij h ==> inj (rename h)"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
124 |
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
|
125 |
rename_inv_eq RS sym]) 1); |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
126 |
qed "inj_rename"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
127 |
|
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
128 |
Goal "bij h ==> surj (rename h)"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
129 |
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
|
130 |
rename_inv_eq RS sym]) 1); |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
131 |
qed "surj_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 ==> bij (rename h)"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
134 |
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
|
135 |
qed "bij_rename"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
136 |
|
| 8327 | 137 |
Goalw [inj_on_def] "inj (rename h) ==> inj h"; |
138 |
by Auto_tac; |
|
139 |
by (dres_inst_tac [("x", "mk_program ({x}, {})")] spec 1);
|
|
140 |
by (dres_inst_tac [("x", "mk_program ({y}, {})")] spec 1);
|
|
141 |
by (auto_tac (claset(), |
|
142 |
simpset() addsimps [program_equality_iff, raw_Acts_rename])); |
|
143 |
qed "inj_rename_imp_inj"; |
|
144 |
||
145 |
Goalw [surj_def] "surj (rename h) ==> surj h"; |
|
146 |
by Auto_tac; |
|
147 |
by (dres_inst_tac [("x", "mk_program ({y}, {})")] spec 1);
|
|
| 9190 | 148 |
by (auto_tac (claset(), |
| 8327 | 149 |
simpset() addsimps [program_equality_iff, raw_Acts_rename])); |
150 |
qed "surj_rename_imp_surj"; |
|
151 |
||
152 |
Goalw [bij_def] "bij (rename h) ==> bij h"; |
|
153 |
by (asm_simp_tac |
|
154 |
(simpset() addsimps [inj_rename_imp_inj, surj_rename_imp_surj]) 1); |
|
155 |
qed "bij_rename_imp_bij"; |
|
156 |
||
157 |
Goal "bij (rename h) = bij h"; |
|
158 |
by (blast_tac (claset() addIs [bij_rename, bij_rename_imp_bij]) 1); |
|
159 |
qed "bij_rename_iff"; |
|
160 |
AddIffs [bij_rename_iff]; |
|
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
161 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
162 |
(*** the lattice operations ***) |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
163 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
164 |
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
|
165 |
by (Asm_simp_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
166 |
qed "rename_SKIP"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
167 |
Addsimps [rename_SKIP]; |
|
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] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
170 |
"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
|
171 |
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
|
172 |
qed "rename_Join"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
173 |
Addsimps [rename_Join]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
174 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
175 |
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
|
176 |
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
|
177 |
qed "rename_JN"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
178 |
Addsimps [rename_JN]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
179 |
|
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
180 |
|
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
181 |
(*** Strong Safety: co, stable ***) |
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
182 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
183 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
184 |
"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
|
185 |
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
|
186 |
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
|
187 |
qed "rename_constrains"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
188 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
189 |
Goalw [stable_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
190 |
"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
|
191 |
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
|
192 |
qed "rename_stable"; |
|
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 |
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
|
195 |
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
|
196 |
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
|
197 |
qed "rename_invariant"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
198 |
|
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
199 |
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
|
200 |
by (asm_simp_tac |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
201 |
(simpset() addsimps [increasing_def, rename_stable RS sym, |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
202 |
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
|
203 |
qed "rename_increasing"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
204 |
|
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
205 |
|
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
206 |
(*** Weak Safety: Co, Stable ***) |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
207 |
|
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
208 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
209 |
"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
|
210 |
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
|
211 |
qed "reachable_rename_eq"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
212 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
213 |
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
|
214 |
by (asm_simp_tac |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
215 |
(simpset() addsimps [Constrains_def, reachable_rename_eq, |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
216 |
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
|
217 |
qed "rename_Constrains"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
218 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
219 |
Goalw [Stable_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
220 |
"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
|
221 |
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
|
222 |
qed "rename_Stable"; |
|
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 |
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
|
225 |
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
|
226 |
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
|
227 |
qed "rename_Always"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
228 |
|
|
8311
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
229 |
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
|
230 |
by (asm_simp_tac |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
231 |
(simpset() addsimps [Increasing_def, rename_Stable RS sym, |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
232 |
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
|
233 |
qed "rename_Increasing"; |
|
6218522253e7
new mostly working version; Alloc nearly converted to "Rename"
paulson
parents:
8256
diff
changeset
|
234 |
|
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
235 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
236 |
(*** Progress: transient, ensures ***) |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
237 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
238 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
239 |
"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
|
240 |
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
|
241 |
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
|
242 |
qed "rename_transient"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
243 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
244 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
245 |
"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
|
246 |
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
|
247 |
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
|
248 |
qed "rename_ensures"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
249 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
250 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
251 |
"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
|
252 |
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
|
253 |
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
|
254 |
qed "rename_leadsTo"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
255 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
256 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
257 |
"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
|
258 |
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
|
259 |
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
|
260 |
qed "rename_LeadsTo"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
261 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
262 |
Goalw [rename_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
263 |
"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
|
264 |
\ (rename h `` Y)) = \ |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
265 |
\ (F : X guarantees[v] Y)"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
266 |
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
|
267 |
by (assume_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
268 |
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
|
269 |
qed "rename_rename_guarantees_eq"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
270 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
271 |
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
|
272 |
\ (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
|
273 |
\ (rename (inv h) `` Y))"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
274 |
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
|
275 |
by (assume_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
276 |
by (asm_simp_tac |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
277 |
(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
|
278 |
qed "rename_guarantees_eq_rename_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
279 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
280 |
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
|
281 |
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
|
282 |
by (assume_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
283 |
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
|
284 |
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
|
285 |
qed "rename_preserves"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
286 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
287 |
|
| 8314 | 288 |
(*** "image" versions of the rules, for lifting "guarantees" properties ***) |
289 |
||
290 |
||
291 |
(*Tactic used in all the proofs. Better would have been to prove one |
|
292 |
meta-theorem, but how can we handle the polymorphism? E.g. in |
|
293 |
rename_constrains the two appearances of "co" have different types!*) |
|
294 |
fun rename_image_tac ths = |
|
295 |
EVERY [Auto_tac, |
|
296 |
(rename_tac "F" 2), |
|
297 |
(subgoal_tac "EX G. F = rename h G" 2), |
|
298 |
(auto_tac (claset() addSIs [surj_rename RS surj_f_inv_f RS sym], |
|
299 |
simpset() addsimps ths))]; |
|
300 |
||
301 |
Goal "bij h ==> rename h `` (A co B) = (h `` A) co (h``B)"; |
|
302 |
by (rename_image_tac [rename_constrains]); |
|
303 |
qed "rename_image_constrains"; |
|
304 |
||
305 |
Goal "bij h ==> rename h `` stable A = stable (h `` A)"; |
|
306 |
by (rename_image_tac [rename_stable]); |
|
307 |
qed "rename_image_stable"; |
|
308 |
||
309 |
Goal "bij h ==> rename h `` increasing func = increasing (func o inv h)"; |
|
310 |
by (rename_image_tac [rename_increasing, o_def, bij_is_inj]); |
|
311 |
qed "rename_image_increasing"; |
|
312 |
||
313 |
Goal "bij h ==> rename h `` invariant A = invariant (h `` A)"; |
|
314 |
by (rename_image_tac [rename_invariant]); |
|
315 |
qed "rename_image_invariant"; |
|
316 |
||
317 |
Goal "bij h ==> rename h `` (A Co B) = (h `` A) Co (h``B)"; |
|
318 |
by (rename_image_tac [rename_Constrains]); |
|
319 |
qed "rename_image_Constrains"; |
|
320 |
||
321 |
Goal "bij h ==> rename h `` Stable A = Stable (h `` A)"; |
|
322 |
by (rename_image_tac [rename_Stable]); |
|
323 |
qed "rename_image_Stable"; |
|
324 |
||
325 |
Goal "bij h ==> rename h `` Increasing func = Increasing (func o inv h)"; |
|
326 |
by (rename_image_tac [rename_Increasing, o_def, bij_is_inj]); |
|
327 |
qed "rename_image_Increasing"; |
|
328 |
||
329 |
Goal "bij h ==> rename h `` Always A = Always (h `` A)"; |
|
330 |
by (rename_image_tac [rename_Always]); |
|
331 |
qed "rename_image_Always"; |
|
332 |
||
333 |
Goal "bij h ==> rename h `` (A leadsTo B) = (h `` A) leadsTo (h``B)"; |
|
334 |
by (rename_image_tac [rename_leadsTo]); |
|
335 |
qed "rename_image_leadsTo"; |
|
336 |
||
337 |
Goal "bij h ==> rename h `` (A LeadsTo B) = (h `` A) LeadsTo (h``B)"; |
|
338 |
by (rename_image_tac [rename_LeadsTo]); |
|
339 |
qed "rename_image_LeadsTo"; |
|
340 |
||
341 |
||
342 |
||
343 |
||
|
8256
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
344 |
(** junk |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
345 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
346 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
347 |
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
|
348 |
"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
|
349 |
by Auto_tac; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
350 |
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
|
351 |
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
|
352 |
by Auto_tac; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
353 |
qed "project_act_inverse"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
354 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
355 |
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
|
356 |
by (rtac program_equalityI 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
357 |
by (Asm_simp_tac 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
358 |
by (asm_simp_tac |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
359 |
(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
|
360 |
image_eq_UN, export extend_act_Id, |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
361 |
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
|
362 |
qed "rename_rename_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
363 |
Addsimps [rename_rename_inv]; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
364 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
365 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
366 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
367 |
Goalw [bij_def] |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
368 |
"bij h \ |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
369 |
\ ==> 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
|
370 |
by (rtac ext 1); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
371 |
by (auto_tac (claset() addSIs [image_eqI], |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
372 |
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
|
373 |
surj_f_inv_f])); |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
374 |
qed "extend_set_inv"; |
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
375 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
376 |
|
|
6ba8fa2b0638
Rename: theory for applying a bijection over states to a UNITY program
paulson
parents:
diff
changeset
|
377 |
***) |