116 be eta_subst 1; |
116 be eta_subst 1; |
117 qed "eta_decr"; |
117 qed "eta_decr"; |
118 |
118 |
119 (*** Confluence of eta ***) |
119 (*** Confluence of eta ***) |
120 |
120 |
121 goalw Eta.thy [id_def] |
121 goalw Eta.thy [square_def,id_def] "square eta eta (eta^=) (eta^=)"; |
122 "!x y. x-e> y --> (!z. x-e>z --> (? u. y -e>= u & z -e>= u))"; |
|
123 br eta.mutual_induct 1; |
122 br eta.mutual_induct 1; |
124 by(ALLGOALS(fast_tac (eta_cs addSEs [eta_decr,not_free_eta] addss !simpset))); |
123 by(ALLGOALS(fast_tac (eta_cs addSEs [eta_decr,not_free_eta] addss !simpset))); |
125 val lemma = result() RS spec RS spec RS mp RS spec RS mp; |
124 val lemma = result(); |
126 |
|
127 goalw Eta.thy [diamond_def,commute_def,square_def] "diamond(eta^=)"; |
|
128 by(fast_tac (eta_cs addEs [lemma]) 1); |
|
129 qed "diamond_refl_eta"; |
|
130 |
125 |
131 goal Eta.thy "confluent(eta)"; |
126 goal Eta.thy "confluent(eta)"; |
132 by(stac (rtrancl_reflcl RS sym) 1); |
127 by(rtac (lemma RS square_reflcl_confluent) 1); |
133 by(rtac (diamond_refl_eta RS diamond_confluent) 1); |
|
134 qed "eta_confluent"; |
128 qed "eta_confluent"; |
135 |
129 |
136 (*** Congruence rules for ->> ***) |
130 (*** Congruence rules for -e>> ***) |
137 |
131 |
138 goal Eta.thy "!!s. s -e>> s' ==> Fun s -e>> Fun s'"; |
132 goal Eta.thy "!!s. s -e>> s' ==> Fun s -e>> Fun s'"; |
139 be rtrancl_induct 1; |
133 be rtrancl_induct 1; |
140 by (ALLGOALS(fast_tac (eta_cs addIs [rtrancl_refl,rtrancl_into_rtrancl]))); |
134 by (ALLGOALS(fast_tac (eta_cs addIs [rtrancl_refl,rtrancl_into_rtrancl]))); |
141 qed "rtrancl_eta_Fun"; |
135 qed "rtrancl_eta_Fun"; |
155 addIs [rtrancl_trans]) 1); |
149 addIs [rtrancl_trans]) 1); |
156 qed "rtrancl_eta_App"; |
150 qed "rtrancl_eta_App"; |
157 |
151 |
158 (*** Commutation of beta and eta ***) |
152 (*** Commutation of beta and eta ***) |
159 |
153 |
160 goal Eta.thy "!!s. s -> t ==> !i. free t i --> free s i"; |
154 goal Eta.thy "!s t. s -> t --> (!i. free t i --> free s i)"; |
161 be (beta.mutual_induct RS spec RS spec RSN (2,rev_mp)) 1; |
155 br beta.mutual_induct 1; |
162 by(ALLGOALS(Asm_full_simp_tac)); |
156 by(ALLGOALS(Asm_full_simp_tac)); |
163 bind_thm("free_beta", result() RS spec RS mp); |
157 bind_thm("free_beta", result() RS spec RS spec RS mp RS spec RS mp); |
164 |
158 |
165 goalw Eta.thy [decr_def] "!s t. s -> t --> (!i. decr s i -> decr t i)"; |
159 goalw Eta.thy [decr_def] "!s t. s -> t --> (!i. decr s i -> decr t i)"; |
166 br beta.mutual_induct 1; |
160 br beta.mutual_induct 1; |
167 by(ALLGOALS(asm_full_simp_tac (!simpset addsimps [subst_subst RS sym]))); |
161 by(ALLGOALS(asm_full_simp_tac (!simpset addsimps [subst_subst RS sym]))); |
168 bind_thm("beta_decr", result() RS spec RS spec RS mp RS spec); |
162 bind_thm("beta_decr", result() RS spec RS spec RS mp RS spec); |