8 |
8 |
9 open CCL; |
9 open CCL; |
10 |
10 |
11 val ccl_data_defs = [apply_def,fix_def]; |
11 val ccl_data_defs = [apply_def,fix_def]; |
12 |
12 |
13 val CCL_ss = set_ss addsimps [po_refl RS P_iff_T]; |
13 val CCL_ss = set_ss addsimps [po_refl]; |
14 |
14 |
15 (*** Congruence Rules ***) |
15 (*** Congruence Rules ***) |
16 |
16 |
17 (*similar to AP_THM in Gordon's HOL*) |
17 (*similar to AP_THM in Gordon's HOL*) |
18 qed_goal "fun_cong" CCL.thy "(f::'a=>'b) = g ==> f(x)=g(x)" |
18 qed_goal "fun_cong" CCL.thy "(f::'a=>'b) = g ==> f(x)=g(x)" |
153 by (ALLGOALS (simp_tac ccl_ss)); |
153 by (ALLGOALS (simp_tac ccl_ss)); |
154 by (ALLGOALS (fast_tac set_cs)); |
154 by (ALLGOALS (fast_tac set_cs)); |
155 qed "POgen_mono"; |
155 qed "POgen_mono"; |
156 |
156 |
157 goalw CCL.thy [POgen_def,SIM_def] |
157 goalw CCL.thy [POgen_def,SIM_def] |
158 "<t,t'> : POgen(R) <-> t= bot | (t=true & t'=true) | (t=false & t'=false) | \ |
158 "<t,t'> : POgen(R) <-> t= bot | (t=true & t'=true) | (t=false & t'=false) | \ |
159 \ (EX a a' b b'. t=<a,b> & t'=<a',b'> & <a,a'> : R & <b,b'> : R) | \ |
159 \ (EX a a' b b'. t=<a,b> & t'=<a',b'> & <a,a'> : R & <b,b'> : R) | \ |
160 \ (EX f f'. t=lam x. f(x) & t'=lam x. f'(x) & (ALL x. <f(x),f'(x)> : R))"; |
160 \ (EX f f'. t=lam x. f(x) & t'=lam x. f'(x) & (ALL x. <f(x),f'(x)> : R))"; |
161 by (rtac (iff_refl RS XHlemma2) 1); |
161 by (rtac (iff_refl RS XHlemma2) 1); |
162 qed "POgenXH"; |
162 qed "POgenXH"; |
163 |
163 |
164 goal CCL.thy |
164 goal CCL.thy |
165 "t [= t' <-> t=bot | (t=true & t'=true) | (t=false & t'=false) | \ |
165 "t [= t' <-> t=bot | (t=true & t'=true) | (t=false & t'=false) | \ |
166 \ (EX a a' b b'. t=<a,b> & t'=<a',b'> & a [= a' & b [= b') | \ |
166 \ (EX a a' b b'. t=<a,b> & t'=<a',b'> & a [= a' & b [= b') | \ |
167 \ (EX f f'. t=lam x. f(x) & t'=lam x. f'(x) & (ALL x. f(x) [= f'(x)))"; |
167 \ (EX f f'. t=lam x. f(x) & t'=lam x. f'(x) & (ALL x. f(x) [= f'(x)))"; |
168 by (simp_tac (ccl_ss addsimps [PO_iff]) 1); |
168 by (simp_tac (ccl_ss addsimps [PO_iff] delsimps ex_simps) 1); |
169 br (rewrite_rule [POgen_def,SIM_def] |
169 br (rewrite_rule [POgen_def,SIM_def] |
170 (POgen_mono RS (PO_def RS def_gfp_Tarski) RS XHlemma1)) 1; |
170 (POgen_mono RS (PO_def RS def_gfp_Tarski) RS XHlemma1)) 1; |
171 by (rtac (iff_refl RS XHlemma2) 1); |
171 by (rtac (iff_refl RS XHlemma2) 1); |
172 qed "poXH"; |
172 qed "poXH"; |
173 |
173 |
184 bind_thm("bot_poleast", result() RS mp); |
184 bind_thm("bot_poleast", result() RS mp); |
185 |
185 |
186 goal CCL.thy "<a,b> [= <a',b'> <-> a [= a' & b [= b'"; |
186 goal CCL.thy "<a,b> [= <a',b'> <-> a [= a' & b [= b'"; |
187 by (rtac (poXH RS iff_trans) 1); |
187 by (rtac (poXH RS iff_trans) 1); |
188 by (simp_tac ccl_ss 1); |
188 by (simp_tac ccl_ss 1); |
189 by (fast_tac ccl_cs 1); |
|
190 qed "po_pair"; |
189 qed "po_pair"; |
191 |
190 |
192 goal CCL.thy "lam x. f(x) [= lam x. f'(x) <-> (ALL x. f(x) [= f'(x))"; |
191 goal CCL.thy "lam x. f(x) [= lam x. f'(x) <-> (ALL x. f(x) [= f'(x))"; |
193 by (rtac (poXH RS iff_trans) 1); |
192 by (rtac (poXH RS iff_trans) 1); |
194 by (simp_tac ccl_ss 1); |
193 by (simp_tac ccl_ss 1); |