equal
deleted
inserted
replaced
69 (* --------------------------------------------------------*) |
69 (* --------------------------------------------------------*) |
70 section"less_lift"; |
70 section"less_lift"; |
71 (* --------------------------------------------------------*) |
71 (* --------------------------------------------------------*) |
72 |
72 |
73 goal thy "(x::'a lift) << y = (x=y | x=UU)"; |
73 goal thy "(x::'a lift) << y = (x=y | x=UU)"; |
74 br (inst_lift_po RS ssubst) 1; |
74 by (stac inst_lift_po 1); |
75 by (Simp_tac 1); |
75 by (Simp_tac 1); |
76 qed"less_lift"; |
76 qed"less_lift"; |
77 |
77 |
78 |
78 |
79 (* ---------------------------------------------------------- *) |
79 (* ---------------------------------------------------------- *) |
94 by (fast_tac (HOL_cs addSEs prems) 1); |
94 by (fast_tac (HOL_cs addSEs prems) 1); |
95 qed"Lift_cases"; |
95 qed"Lift_cases"; |
96 |
96 |
97 goal thy |
97 goal thy |
98 "P(lift_case a b x) = ((x=UU --> P a) & (!y. x = Def y --> P(b y)))"; |
98 "P(lift_case a b x) = ((x=UU --> P a) & (!y. x = Def y --> P(b y)))"; |
99 by(lift.induct_tac "x" 1); |
99 by (lift.induct_tac "x" 1); |
100 by(ALLGOALS Asm_simp_tac); |
100 by (ALLGOALS Asm_simp_tac); |
101 qed "expand_lift_case"; |
101 qed "expand_lift_case"; |
102 |
102 |
103 goal thy "(x~=UU)=(? y.x=Def y)"; |
103 goal thy "(x~=UU)=(? y.x=Def y)"; |
104 br iffI 1; |
104 by (rtac iffI 1); |
105 br Lift_cases 1; |
105 by (rtac Lift_cases 1); |
106 by (REPEAT (fast_tac (HOL_cs addSIs lift.distinct) 1)); |
106 by (REPEAT (fast_tac (HOL_cs addSIs lift.distinct) 1)); |
107 qed"not_Undef_is_Def"; |
107 qed"not_Undef_is_Def"; |
108 |
108 |
109 (* For x~=UU in assumptions def_tac replaces x by (Def a) in conclusion *) |
109 (* For x~=UU in assumptions def_tac replaces x by (Def a) in conclusion *) |
110 val def_tac = etac (not_Undef_is_Def RS iffD1 RS exE) THEN' Asm_simp_tac; |
110 val def_tac = etac (not_Undef_is_Def RS iffD1 RS exE) THEN' Asm_simp_tac; |
124 goal thy "Def x << Def y = (x = y)"; |
124 goal thy "Def x << Def y = (x = y)"; |
125 by (stac (hd lift.inject RS sym) 1); |
125 by (stac (hd lift.inject RS sym) 1); |
126 back(); |
126 back(); |
127 by (rtac iffI 1); |
127 by (rtac iffI 1); |
128 by (asm_full_simp_tac (!simpset addsimps [inst_lift_po] ) 1); |
128 by (asm_full_simp_tac (!simpset addsimps [inst_lift_po] ) 1); |
129 be (antisym_less_inverse RS conjunct1) 1; |
129 by (etac (antisym_less_inverse RS conjunct1) 1); |
130 qed"Def_inject_less_eq"; |
130 qed"Def_inject_less_eq"; |
131 |
131 |
132 goal thy "Def x << y = (Def x = y)"; |
132 goal thy "Def x << y = (Def x = y)"; |
133 by (simp_tac (!simpset addsimps [less_lift]) 1); |
133 by (simp_tac (!simpset addsimps [less_lift]) 1); |
134 qed"Def_less_is_eq"; |
134 qed"Def_less_is_eq"; |
144 qed"ax_flat_lift"; |
144 qed"ax_flat_lift"; |
145 |
145 |
146 (* Two specific lemmas for the combination of LCF and HOL terms *) |
146 (* Two specific lemmas for the combination of LCF and HOL terms *) |
147 |
147 |
148 goal thy "!!f.[|cont g; cont f|] ==> cont(%x. ((f x)`(g x)) s)"; |
148 goal thy "!!f.[|cont g; cont f|] ==> cont(%x. ((f x)`(g x)) s)"; |
149 br cont2cont_CF1L 1; |
149 by (rtac cont2cont_CF1L 1); |
150 by (REPEAT (resolve_tac cont_lemmas1 1)); |
150 by (REPEAT (resolve_tac cont_lemmas1 1)); |
151 auto(); |
151 by (Auto_tac()); |
152 qed"cont_fapp_app"; |
152 qed"cont_fapp_app"; |
153 |
153 |
154 goal thy "!!f.[|cont g; cont f|] ==> cont(%x. ((f x)`(g x)) s t)"; |
154 goal thy "!!f.[|cont g; cont f|] ==> cont(%x. ((f x)`(g x)) s t)"; |
155 br cont2cont_CF1L 1; |
155 by (rtac cont2cont_CF1L 1); |
156 be cont_fapp_app 1; |
156 by (etac cont_fapp_app 1); |
157 ba 1; |
157 by (assume_tac 1); |
158 qed"cont_fapp_app_app"; |
158 qed"cont_fapp_app_app"; |
159 |
159 |
160 |
160 |
161 (* continuity of if then else *) |
161 (* continuity of if then else *) |
162 val prems = goal thy "[| cont f1; cont f2 |] ==> \ |
162 val prems = goal thy "[| cont f1; cont f2 |] ==> \ |