| author | wenzelm | 
| Mon, 26 Jun 2000 16:54:38 +0200 | |
| changeset 9152 | 034cb4ac78b8 | 
| parent 8161 | bde1391fd0a5 | 
| child 9169 | 85a47aa21f74 | 
| permissions | -rw-r--r-- | 
| 2278 | 1 | (* Title: HOLCF/Up1.ML | 
| 2 | ID: $Id$ | |
| 3 | Author: Franz Regensburger | |
| 4 | Copyright 1993 Technische Universitaet Muenchen | |
| 5 | *) | |
| 6 | ||
| 7 | open Up1; | |
| 8 | ||
| 2640 | 9 | qed_goal "Abs_Up_inverse2" thy "Rep_Up (Abs_Up y) = y" | 
| 10 | (fn prems => | |
| 11 | [ | |
| 4098 | 12 | (simp_tac (simpset() addsimps [Up_def,Abs_Up_inverse]) 1) | 
| 2640 | 13 | ]); | 
| 14 | ||
| 15 | qed_goalw "Exh_Up" thy [Iup_def ] | |
| 16 | "z = Abs_Up(Inl ()) | (? x. z = Iup x)" | |
| 2278 | 17 | (fn prems => | 
| 18 | [ | |
| 19 | (rtac (Rep_Up_inverse RS subst) 1), | |
| 2640 | 20 |         (res_inst_tac [("s","Rep_Up z")] sumE 1),
 | 
| 2278 | 21 | (rtac disjI1 1), | 
| 22 |         (res_inst_tac [("f","Abs_Up")] arg_cong 1),
 | |
| 2640 | 23 | (rtac (unit_eq RS subst) 1), | 
| 2278 | 24 | (atac 1), | 
| 25 | (rtac disjI2 1), | |
| 26 | (rtac exI 1), | |
| 27 |         (res_inst_tac [("f","Abs_Up")] arg_cong 1),
 | |
| 28 | (atac 1) | |
| 29 | ]); | |
| 30 | ||
| 2640 | 31 | qed_goal "inj_Abs_Up" thy "inj(Abs_Up)" | 
| 2278 | 32 | (fn prems => | 
| 33 | [ | |
| 34 | (rtac inj_inverseI 1), | |
| 2640 | 35 | (rtac Abs_Up_inverse2 1) | 
| 2278 | 36 | ]); | 
| 37 | ||
| 2640 | 38 | qed_goal "inj_Rep_Up" thy "inj(Rep_Up)" | 
| 2278 | 39 | (fn prems => | 
| 40 | [ | |
| 41 | (rtac inj_inverseI 1), | |
| 42 | (rtac Rep_Up_inverse 1) | |
| 43 | ]); | |
| 44 | ||
| 2640 | 45 | qed_goalw "inject_Iup" thy [Iup_def] "Iup x=Iup y ==> x=y" | 
| 2278 | 46 | (fn prems => | 
| 47 | [ | |
| 48 | (cut_facts_tac prems 1), | |
| 49 | (rtac (inj_Inr RS injD) 1), | |
| 50 | (rtac (inj_Abs_Up RS injD) 1), | |
| 51 | (atac 1) | |
| 52 | ]); | |
| 53 | ||
| 2640 | 54 | qed_goalw "defined_Iup" thy [Iup_def] "Iup x~=Abs_Up(Inl ())" | 
| 2278 | 55 | (fn prems => | 
| 56 | [ | |
| 57 | (rtac notI 1), | |
| 58 | (rtac notE 1), | |
| 59 | (rtac Inl_not_Inr 1), | |
| 60 | (rtac sym 1), | |
| 61 | (etac (inj_Abs_Up RS injD) 1) | |
| 62 | ]); | |
| 63 | ||
| 64 | ||
| 2640 | 65 | qed_goal "upE" thy | 
| 66 | "[| p=Abs_Up(Inl ()) ==> Q; !!x. p=Iup(x)==>Q|] ==>Q" | |
| 2278 | 67 | (fn prems => | 
| 68 | [ | |
| 69 | (rtac (Exh_Up RS disjE) 1), | |
| 70 | (eresolve_tac prems 1), | |
| 71 | (etac exE 1), | |
| 72 | (eresolve_tac prems 1) | |
| 73 | ]); | |
| 74 | ||
| 2640 | 75 | qed_goalw "Ifup1" thy [Ifup_def] | 
| 76 | "Ifup(f)(Abs_Up(Inl ()))=UU" | |
| 2278 | 77 | (fn prems => | 
| 78 | [ | |
| 2640 | 79 | (stac Abs_Up_inverse2 1), | 
| 2278 | 80 | (stac sum_case_Inl 1), | 
| 81 | (rtac refl 1) | |
| 82 | ]); | |
| 83 | ||
| 2640 | 84 | qed_goalw "Ifup2" thy [Ifup_def,Iup_def] | 
| 2278 | 85 | "Ifup(f)(Iup(x))=f`x" | 
| 86 | (fn prems => | |
| 87 | [ | |
| 2640 | 88 | (stac Abs_Up_inverse2 1), | 
| 2278 | 89 | (stac sum_case_Inr 1), | 
| 90 | (rtac refl 1) | |
| 91 | ]); | |
| 92 | ||
| 8161 | 93 | val Up0_ss = (simpset_of Cfun3.thy) delsimps [range_composition] | 
| 94 | addsimps [Ifup1,Ifup2]; | |
| 2278 | 95 | |
| 2640 | 96 | qed_goalw "less_up1a" thy [less_up_def] | 
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 97 | "Abs_Up(Inl ())<< z" | 
| 2278 | 98 | (fn prems => | 
| 99 | [ | |
| 2640 | 100 | (stac Abs_Up_inverse2 1), | 
| 2278 | 101 | (stac sum_case_Inl 1), | 
| 102 | (rtac TrueI 1) | |
| 103 | ]); | |
| 104 | ||
| 2640 | 105 | qed_goalw "less_up1b" thy [Iup_def,less_up_def] | 
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 106 | "~(Iup x) << (Abs_Up(Inl ()))" | 
| 2278 | 107 | (fn prems => | 
| 108 | [ | |
| 109 | (rtac notI 1), | |
| 110 | (rtac iffD1 1), | |
| 111 | (atac 2), | |
| 2640 | 112 | (stac Abs_Up_inverse2 1), | 
| 113 | (stac Abs_Up_inverse2 1), | |
| 2278 | 114 | (stac sum_case_Inr 1), | 
| 115 | (stac sum_case_Inl 1), | |
| 116 | (rtac refl 1) | |
| 117 | ]); | |
| 118 | ||
| 2640 | 119 | qed_goalw "less_up1c" thy [Iup_def,less_up_def] | 
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 120 | " (Iup x) << (Iup y)=(x<<y)" | 
| 2278 | 121 | (fn prems => | 
| 122 | [ | |
| 2640 | 123 | (stac Abs_Up_inverse2 1), | 
| 124 | (stac Abs_Up_inverse2 1), | |
| 2278 | 125 | (stac sum_case_Inr 1), | 
| 126 | (stac sum_case_Inr 1), | |
| 127 | (rtac refl 1) | |
| 128 | ]); | |
| 129 | ||
| 130 | ||
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 131 | qed_goal "refl_less_up" thy "(p::'a u) << p" | 
| 2278 | 132 | (fn prems => | 
| 133 | [ | |
| 134 |         (res_inst_tac [("p","p")] upE 1),
 | |
| 135 | (hyp_subst_tac 1), | |
| 136 | (rtac less_up1a 1), | |
| 137 | (hyp_subst_tac 1), | |
| 138 | (rtac (less_up1c RS iffD2) 1), | |
| 139 | (rtac refl_less 1) | |
| 140 | ]); | |
| 141 | ||
| 2640 | 142 | qed_goal "antisym_less_up" thy | 
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 143 | "!!p1.[|(p1::'a u) << p2;p2 << p1|] ==> p1=p2" | 
| 2278 | 144 | (fn _ => | 
| 145 | [ | |
| 146 |         (res_inst_tac [("p","p1")] upE 1),
 | |
| 147 | (hyp_subst_tac 1), | |
| 148 |         (res_inst_tac [("p","p2")] upE 1),
 | |
| 149 | (etac sym 1), | |
| 150 | (hyp_subst_tac 1), | |
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 151 |         (res_inst_tac [("P","(Iup x) << (Abs_Up(Inl ()))")] notE 1),
 | 
| 2278 | 152 | (rtac less_up1b 1), | 
| 153 | (atac 1), | |
| 154 | (hyp_subst_tac 1), | |
| 155 |         (res_inst_tac [("p","p2")] upE 1),
 | |
| 156 | (hyp_subst_tac 1), | |
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 157 |         (res_inst_tac [("P","(Iup x) << (Abs_Up(Inl ()))")] notE 1),
 | 
| 2278 | 158 | (rtac less_up1b 1), | 
| 159 | (atac 1), | |
| 160 | (hyp_subst_tac 1), | |
| 161 | (rtac arg_cong 1), | |
| 162 | (rtac antisym_less 1), | |
| 163 | (etac (less_up1c RS iffD1) 1), | |
| 164 | (etac (less_up1c RS iffD1) 1) | |
| 165 | ]); | |
| 166 | ||
| 2640 | 167 | qed_goal "trans_less_up" thy | 
| 3323 
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
 slotosch parents: 
2640diff
changeset | 168 | "[|(p1::'a u) << p2;p2 << p3|] ==> p1 << p3" | 
| 2278 | 169 | (fn prems => | 
| 170 | [ | |
| 171 | (cut_facts_tac prems 1), | |
| 172 |         (res_inst_tac [("p","p1")] upE 1),
 | |
| 173 | (hyp_subst_tac 1), | |
| 174 | (rtac less_up1a 1), | |
| 175 | (hyp_subst_tac 1), | |
| 176 |         (res_inst_tac [("p","p2")] upE 1),
 | |
| 177 | (hyp_subst_tac 1), | |
| 178 | (rtac notE 1), | |
| 179 | (rtac less_up1b 1), | |
| 180 | (atac 1), | |
| 181 | (hyp_subst_tac 1), | |
| 182 |         (res_inst_tac [("p","p3")] upE 1),
 | |
| 183 | (hyp_subst_tac 1), | |
| 184 | (rtac notE 1), | |
| 185 | (rtac less_up1b 1), | |
| 186 | (atac 1), | |
| 187 | (hyp_subst_tac 1), | |
| 188 | (rtac (less_up1c RS iffD2) 1), | |
| 189 | (rtac trans_less 1), | |
| 190 | (etac (less_up1c RS iffD1) 1), | |
| 191 | (etac (less_up1c RS iffD1) 1) | |
| 192 | ]); | |
| 193 |