| author | wenzelm | 
| Thu, 08 Nov 2001 23:52:56 +0100 | |
| changeset 12106 | 4a8558dbb6a0 | 
| parent 11589 | 9a6d4511bb3c | 
| child 12372 | cd3a09c7dac9 | 
| permissions | -rw-r--r-- | 
| 1461 | 1 | (* Title: ZF/upair | 
| 0 | 2 | ID: $Id$ | 
| 1461 | 3 | Author: Lawrence C Paulson, Cambridge University Computer Laboratory | 
| 0 | 4 | Copyright 1991 University of Cambridge | 
| 5 | ||
| 6 | UNORDERED pairs in Zermelo-Fraenkel Set Theory | |
| 7 | ||
| 8 | Observe the order of dependence: | |
| 9 | Upair is defined in terms of Replace | |
| 10 | Un is defined in terms of Upair and Union (similarly for Int) | |
| 11 | cons is defined in terms of Upair and Un | |
| 12 |     Ordered pairs and descriptions are defined using cons ("set notation")
 | |
| 13 | *) | |
| 14 | ||
| 15 | (*** Lemmas about power sets ***) | |
| 16 | ||
| 9907 | 17 | bind_thm ("Pow_bottom", empty_subsetI RS PowI);         (* 0 : Pow(B) *)
 | 
| 18 | bind_thm ("Pow_top", subset_refl RS PowI);              (* A : Pow(A) *)
 | |
| 0 | 19 | |
| 20 | ||
| 21 | (*** Unordered pairs - Upair ***) | |
| 22 | ||
| 9211 | 23 | Goalw [Upair_def] "c : Upair(a,b) <-> (c=a | c=b)"; | 
| 24 | by (Blast_tac 1) ; | |
| 25 | qed "Upair_iff"; | |
| 2469 | 26 | |
| 27 | Addsimps [Upair_iff]; | |
| 0 | 28 | |
| 9180 | 29 | Goal "a : Upair(a,b)"; | 
| 30 | by (Simp_tac 1); | |
| 31 | qed "UpairI1"; | |
| 0 | 32 | |
| 9180 | 33 | Goal "b : Upair(a,b)"; | 
| 34 | by (Simp_tac 1); | |
| 35 | qed "UpairI2"; | |
| 36 | ||
| 37 | val major::prems= Goal | |
| 38 | "[| a : Upair(b,c); a=b ==> P; a=c ==> P |] ==> P"; | |
| 39 | by (rtac (major RS (Upair_iff RS iffD1 RS disjE)) 1); | |
| 40 | by (REPEAT (eresolve_tac prems 1)) ; | |
| 41 | qed "UpairE"; | |
| 0 | 42 | |
| 2469 | 43 | AddSIs [UpairI1,UpairI2]; | 
| 44 | AddSEs [UpairE]; | |
| 45 | ||
| 0 | 46 | (*** Rules for binary union -- Un -- defined via Upair ***) | 
| 47 | ||
| 9211 | 48 | Goalw [Un_def] "c : A Un B <-> (c:A | c:B)"; | 
| 49 | by (Blast_tac 1); | |
| 50 | qed "Un_iff"; | |
| 2469 | 51 | |
| 52 | Addsimps [Un_iff]; | |
| 0 | 53 | |
| 9180 | 54 | Goal "c : A ==> c : A Un B"; | 
| 55 | by (Asm_simp_tac 1); | |
| 56 | qed "UnI1"; | |
| 2469 | 57 | |
| 9180 | 58 | Goal "c : B ==> c : A Un B"; | 
| 59 | by (Asm_simp_tac 1); | |
| 60 | qed "UnI2"; | |
| 61 | ||
| 62 | val major::prems= Goal | |
| 63 | "[| c : A Un B; c:A ==> P; c:B ==> P |] ==> P"; | |
| 64 | by (rtac (major RS (Un_iff RS iffD1 RS disjE)) 1); | |
| 65 | by (REPEAT (eresolve_tac prems 1)) ; | |
| 66 | qed "UnE"; | |
| 0 | 67 | |
| 572 | 68 | (*Stronger version of the rule above*) | 
| 9180 | 69 | val major::prems = Goal | 
| 70 | "[| c : A Un B; c:A ==> P; [| c:B; c~:A |] ==> P |] ==> P"; | |
| 71 | by (rtac (major RS UnE) 1); | |
| 72 | by (eresolve_tac prems 1); | |
| 73 | by (rtac classical 1); | |
| 74 | by (eresolve_tac prems 1); | |
| 75 | by (swap_res_tac prems 1); | |
| 76 | by (etac notnotD 1); | |
| 77 | qed "UnE'"; | |
| 572 | 78 | |
| 2469 | 79 | (*Classical introduction rule: no commitment to A vs B*) | 
| 9180 | 80 | val prems = Goal "(c ~: B ==> c : A) ==> c : A Un B"; | 
| 81 | by (Simp_tac 1); | |
| 82 | by (blast_tac (claset() addSIs prems) 1); | |
| 83 | qed "UnCI"; | |
| 0 | 84 | |
| 2469 | 85 | AddSIs [UnCI]; | 
| 86 | AddSEs [UnE]; | |
| 11589 | 87 | AddXEs [UnI1, UnI2]; | 
| 0 | 88 | |
| 89 | ||
| 90 | (*** Rules for small intersection -- Int -- defined via Upair ***) | |
| 91 | ||
| 9211 | 92 | Goalw [Int_def] "c : A Int B <-> (c:A & c:B)"; | 
| 93 | by (Blast_tac 1); | |
| 94 | qed "Int_iff"; | |
| 2469 | 95 | |
| 96 | Addsimps [Int_iff]; | |
| 97 | ||
| 9180 | 98 | Goal "[| c : A; c : B |] ==> c : A Int B"; | 
| 99 | by (Asm_simp_tac 1); | |
| 100 | qed "IntI"; | |
| 0 | 101 | |
| 9180 | 102 | Goal "c : A Int B ==> c : A"; | 
| 103 | by (Asm_full_simp_tac 1); | |
| 104 | qed "IntD1"; | |
| 0 | 105 | |
| 9180 | 106 | Goal "c : A Int B ==> c : B"; | 
| 107 | by (Asm_full_simp_tac 1); | |
| 108 | qed "IntD2"; | |
| 0 | 109 | |
| 9180 | 110 | val prems = Goal "[| c : A Int B; [| c:A; c:B |] ==> P |] ==> P"; | 
| 111 | by (resolve_tac prems 1); | |
| 112 | by (REPEAT (resolve_tac (prems RL [IntD1,IntD2]) 1)) ; | |
| 113 | qed "IntE"; | |
| 0 | 114 | |
| 2469 | 115 | AddSIs [IntI]; | 
| 116 | AddSEs [IntE]; | |
| 0 | 117 | |
| 118 | (*** Rules for set difference -- defined via Upair ***) | |
| 119 | ||
| 9211 | 120 | Goalw [Diff_def] "c : A-B <-> (c:A & c~:B)"; | 
| 121 | by (Blast_tac 1); | |
| 122 | qed "Diff_iff"; | |
| 2469 | 123 | |
| 124 | Addsimps [Diff_iff]; | |
| 125 | ||
| 9180 | 126 | Goal "[| c : A; c ~: B |] ==> c : A - B"; | 
| 127 | by (Asm_simp_tac 1); | |
| 128 | qed "DiffI"; | |
| 0 | 129 | |
| 9180 | 130 | Goal "c : A - B ==> c : A"; | 
| 131 | by (Asm_full_simp_tac 1); | |
| 132 | qed "DiffD1"; | |
| 0 | 133 | |
| 9180 | 134 | Goal "c : A - B ==> c ~: B"; | 
| 135 | by (Asm_full_simp_tac 1); | |
| 136 | qed "DiffD2"; | |
| 0 | 137 | |
| 9180 | 138 | val prems = Goal "[| c : A - B; [| c:A; c~:B |] ==> P |] ==> P"; | 
| 139 | by (resolve_tac prems 1); | |
| 140 | by (REPEAT (ares_tac (prems RL [DiffD1, DiffD2]) 1)) ; | |
| 141 | qed "DiffE"; | |
| 0 | 142 | |
| 2469 | 143 | AddSIs [DiffI]; | 
| 144 | AddSEs [DiffE]; | |
| 0 | 145 | |
| 146 | (*** Rules for cons -- defined via Un and Upair ***) | |
| 147 | ||
| 9211 | 148 | Goalw [cons_def] "a : cons(b,A) <-> (a=b | a:A)"; | 
| 149 | by (Blast_tac 1); | |
| 150 | qed "cons_iff"; | |
| 2469 | 151 | |
| 152 | Addsimps [cons_iff]; | |
| 0 | 153 | |
| 9180 | 154 | Goal "a : cons(a,B)"; | 
| 155 | by (Simp_tac 1); | |
| 156 | qed "consI1"; | |
| 2469 | 157 | |
| 158 | Addsimps [consI1]; | |
| 6153 | 159 | AddTCs [consI1]; (*risky as a typechecking rule, but solves otherwise | 
| 160 | unconstrained goals of the form x : ?A*) | |
| 0 | 161 | |
| 9180 | 162 | Goal "a : B ==> a : cons(b,B)"; | 
| 163 | by (Asm_simp_tac 1); | |
| 164 | qed "consI2"; | |
| 2469 | 165 | |
| 9180 | 166 | val major::prems= Goal | 
| 167 | "[| a : cons(b,A); a=b ==> P; a:A ==> P |] ==> P"; | |
| 168 | by (rtac (major RS (cons_iff RS iffD1 RS disjE)) 1); | |
| 169 | by (REPEAT (eresolve_tac (prems @ [UpairE]) 1)) ; | |
| 170 | qed "consE"; | |
| 0 | 171 | |
| 572 | 172 | (*Stronger version of the rule above*) | 
| 9180 | 173 | val major::prems = Goal | 
| 174 | "[| a : cons(b,A); a=b ==> P; [| a:A; a~=b |] ==> P |] ==> P"; | |
| 175 | by (rtac (major RS consE) 1); | |
| 176 | by (eresolve_tac prems 1); | |
| 177 | by (rtac classical 1); | |
| 178 | by (eresolve_tac prems 1); | |
| 179 | by (swap_res_tac prems 1); | |
| 180 | by (etac notnotD 1); | |
| 181 | qed "consE'"; | |
| 572 | 182 | |
| 2469 | 183 | (*Classical introduction rule*) | 
| 9180 | 184 | val prems = Goal "(a~:B ==> a=b) ==> a: cons(b,B)"; | 
| 185 | by (Simp_tac 1); | |
| 186 | by (blast_tac (claset() addSIs prems) 1); | |
| 187 | qed "consCI"; | |
| 0 | 188 | |
| 2469 | 189 | AddSIs [consCI]; | 
| 190 | AddSEs [consE]; | |
| 0 | 191 | |
| 9180 | 192 | Goal "cons(a,B) ~= 0"; | 
| 193 | by (blast_tac (claset() addEs [equalityE]) 1) ; | |
| 194 | qed "cons_not_0"; | |
| 1609 | 195 | |
| 2469 | 196 | bind_thm ("cons_neq_0", cons_not_0 RS notE);
 | 
| 197 | ||
| 198 | Addsimps [cons_not_0, cons_not_0 RS not_sym]; | |
| 199 | ||
| 1609 | 200 | |
| 0 | 201 | (*** Singletons - using cons ***) | 
| 202 | ||
| 9180 | 203 | Goal "a : {b} <-> a=b";
 | 
| 204 | by (Simp_tac 1); | |
| 205 | qed "singleton_iff"; | |
| 2469 | 206 | |
| 9180 | 207 | Goal "a : {a}";
 | 
| 208 | by (rtac consI1 1) ; | |
| 209 | qed "singletonI"; | |
| 0 | 210 | |
| 2469 | 211 | bind_thm ("singletonE", make_elim (singleton_iff RS iffD1));
 | 
| 0 | 212 | |
| 2469 | 213 | AddSIs [singletonI]; | 
| 214 | AddSEs [singletonE]; | |
| 0 | 215 | |
| 216 | (*** Rules for Descriptions ***) | |
| 217 | ||
| 9211 | 218 | val [pa,eq] = Goalw [the_def] | 
| 219 | "[| P(a); !!x. P(x) ==> x=a |] ==> (THE x. P(x)) = a"; | |
| 220 | by (fast_tac (claset() addSIs [pa] addEs [eq RS subst]) 1) ; | |
| 221 | qed "the_equality"; | |
| 0 | 222 | |
| 5506 | 223 | AddIs [the_equality]; | 
| 224 | ||
| 0 | 225 | (* Only use this if you already know EX!x. P(x) *) | 
| 8127 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 226 | Goal "[| EX! x. P(x); P(a) |] ==> (THE x. P(x)) = a"; | 
| 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 227 | by (Blast_tac 1); | 
| 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 228 | qed "the_equality2"; | 
| 0 | 229 | |
| 8127 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 230 | Goal "EX! x. P(x) ==> P(THE x. P(x))"; | 
| 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 231 | by (etac ex1E 1); | 
| 8183 | 232 | by (stac the_equality 1); | 
| 8127 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 233 | by (REPEAT (Blast_tac 1)); | 
| 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 234 | qed "theI"; | 
| 0 | 235 | |
| 435 | 236 | (*the_cong is no longer necessary: if (ALL y.P(y)<->Q(y)) then | 
| 237 | (THE x.P(x)) rewrites to (THE x. Q(x)) *) | |
| 238 | ||
| 239 | (*If it's "undefined", it's zero!*) | |
| 9180 | 240 | Goalw [the_def] "~ (EX! x. P(x)) ==> (THE x. P(x))=0"; | 
| 8127 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 241 | by (blast_tac (claset() addSEs [ReplaceE]) 1); | 
| 
68c6159440f1
new lemmas for Ntree recursor example;  more simprules;  more lemmas borrowed
 paulson parents: 
6163diff
changeset | 242 | qed "the_0"; | 
| 0 | 243 | |
| 5506 | 244 | (*Easier to apply than theI: conclusion has only one occurrence of P*) | 
| 245 | val prems = | |
| 246 | Goal "[| ~ Q(0) ==> EX! x. P(x); !!x. P(x) ==> Q(x) |] ==> Q(THE x. P(x))"; | |
| 247 | by (rtac classical 1); | |
| 248 | by (resolve_tac prems 1); | |
| 249 | by (rtac theI 1); | |
| 250 | by (rtac classical 1); | |
| 251 | by (resolve_tac prems 1); | |
| 6163 | 252 | by (etac (the_0 RS subst) 1); | 
| 253 | by (assume_tac 1); | |
| 5506 | 254 | qed "theI2"; | 
| 255 | ||
| 0 | 256 | (*** if -- a conditional expression for formulae ***) | 
| 257 | ||
| 6068 | 258 | Goalw [if_def] "(if True then a else b) = a"; | 
| 5506 | 259 | by (Blast_tac 1); | 
| 760 | 260 | qed "if_true"; | 
| 0 | 261 | |
| 6068 | 262 | Goalw [if_def] "(if False then a else b) = b"; | 
| 5506 | 263 | by (Blast_tac 1); | 
| 760 | 264 | qed "if_false"; | 
| 0 | 265 | |
| 6 
8ce8c4d13d4d
Installation of new simplifier for ZF.  Deleted all congruence rules not
 lcp parents: 
0diff
changeset | 266 | (*Never use with case splitting, or if P is known to be true or false*) | 
| 5325 
f7a5e06adea1
Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
 paulson parents: 
5242diff
changeset | 267 | val prems = Goalw [if_def] | 
| 6068 | 268 | "[| P<->Q; Q ==> a=c; ~Q ==> b=d |] \ | 
| 269 | \ ==> (if P then a else b) = (if Q then c else d)"; | |
| 4091 | 270 | by (simp_tac (simpset() addsimps prems addcongs [conj_cong]) 1); | 
| 760 | 271 | qed "if_cong"; | 
| 0 | 272 | |
| 9570 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 273 | (*Prevents simplification of x and y: faster and allows the execution | 
| 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 274 | of functional programs. NOW THE DEFAULT.*) | 
| 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 275 | Goal "P<->Q ==> (if P then x else y) = (if Q then x else y)"; | 
| 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 276 | by (Asm_simp_tac 1); | 
| 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 277 | qed "if_weak_cong"; | 
| 
e16e168984e1
installation of cancellation simprocs for the integers
 paulson parents: 
9211diff
changeset | 278 | |
| 0 | 279 | (*Not needed for rewriting, since P would rewrite to True anyway*) | 
| 6068 | 280 | Goalw [if_def] "P ==> (if P then a else b) = a"; | 
| 5506 | 281 | by (Blast_tac 1); | 
| 760 | 282 | qed "if_P"; | 
| 0 | 283 | |
| 284 | (*Not needed for rewriting, since P would rewrite to False anyway*) | |
| 6068 | 285 | Goalw [if_def] "~P ==> (if P then a else b) = b"; | 
| 5506 | 286 | by (Blast_tac 1); | 
| 760 | 287 | qed "if_not_P"; | 
| 0 | 288 | |
| 2469 | 289 | Addsimps [if_true, if_false]; | 
| 0 | 290 | |
| 9180 | 291 | Goal "P(if Q then x else y) <-> ((Q --> P(x)) & (~Q --> P(y)))"; | 
| 292 | by (case_tac "Q" 1); | |
| 293 | by (Asm_simp_tac 1); | |
| 294 | by (Asm_simp_tac 1) ; | |
| 295 | qed "split_if"; | |
| 0 | 296 | |
| 3914 | 297 | (** Rewrite rules for boolean case-splitting: faster than | 
| 5116 
8eb343ab5748
Renamed expand_if to split_if and setloop split_tac to addsplits,
 paulson parents: 
4091diff
changeset | 298 | addsplits[split_if] | 
| 3914 | 299 | **) | 
| 300 | ||
| 8551 | 301 | bind_thm ("split_if_eq1", inst "P" "%x. x = ?b" split_if);
 | 
| 302 | bind_thm ("split_if_eq2", inst "P" "%x. ?a = x" split_if);
 | |
| 3914 | 303 | |
| 8551 | 304 | bind_thm ("split_if_mem1", inst "P" "%x. x : ?b" split_if);
 | 
| 305 | bind_thm ("split_if_mem2", inst "P" "%x. ?a : x" split_if);
 | |
| 3914 | 306 | |
| 9907 | 307 | bind_thms ("split_ifs", [split_if_eq1, split_if_eq2, split_if_mem1, split_if_mem2]);
 | 
| 3914 | 308 | |
| 5116 
8eb343ab5748
Renamed expand_if to split_if and setloop split_tac to addsplits,
 paulson parents: 
4091diff
changeset | 309 | (*Logically equivalent to split_if_mem2*) | 
| 9180 | 310 | Goal "a: (if P then x else y) <-> P & a:x | ~P & a:y"; | 
| 311 | by (simp_tac (simpset() addsplits [split_if]) 1) ; | |
| 312 | qed "if_iff"; | |
| 1017 
6a402dc505cf
Proved if_iff and used it to simplify proof of if_type.
 lcp parents: 
985diff
changeset | 313 | |
| 9180 | 314 | val prems = Goal | 
| 315 | "[| P ==> a: A; ~P ==> b: A |] ==> (if P then a else b): A"; | |
| 316 | by (simp_tac (simpset() addsimps prems addsplits [split_if]) 1) ; | |
| 317 | qed "if_type"; | |
| 318 | ||
| 6153 | 319 | AddTCs [if_type]; | 
| 0 | 320 | |
| 321 | (*** Foundation lemmas ***) | |
| 322 | ||
| 437 | 323 | (*was called mem_anti_sym*) | 
| 9180 | 324 | val prems = Goal "[| a:b; ~P ==> b:a |] ==> P"; | 
| 325 | by (rtac classical 1); | |
| 326 | by (res_inst_tac [("A1","{a,b}")] (foundation RS disjE) 1);
 | |
| 327 | by (REPEAT (blast_tac (claset() addIs prems addSEs [equalityE]) 1)); | |
| 328 | qed "mem_asym"; | |
| 0 | 329 | |
| 437 | 330 | (*was called mem_anti_refl*) | 
| 9180 | 331 | Goal "a:a ==> P"; | 
| 332 | by (blast_tac (claset() addIs [mem_asym]) 1); | |
| 333 | qed "mem_irrefl"; | |
| 0 | 334 | |
| 2469 | 335 | (*mem_irrefl should NOT be added to default databases: | 
| 336 | it would be tried on most goals, making proofs slower!*) | |
| 337 | ||
| 9180 | 338 | Goal "a ~: a"; | 
| 339 | by (rtac notI 1); | |
| 340 | by (etac mem_irrefl 1); | |
| 341 | qed "mem_not_refl"; | |
| 0 | 342 | |
| 435 | 343 | (*Good for proving inequalities by rewriting*) | 
| 9180 | 344 | Goal "a:A ==> a ~= A"; | 
| 345 | by (blast_tac (claset() addSEs [mem_irrefl]) 1); | |
| 346 | qed "mem_imp_not_eq"; | |
| 435 | 347 | |
| 0 | 348 | (*** Rules for succ ***) | 
| 349 | ||
| 9211 | 350 | Goalw [succ_def] "i : succ(j) <-> i=j | i:j"; | 
| 351 | by (Blast_tac 1); | |
| 352 | qed "succ_iff"; | |
| 2469 | 353 | |
| 9211 | 354 | Goalw [succ_def] "i : succ(i)"; | 
| 355 | by (rtac consI1 1) ; | |
| 356 | qed "succI1"; | |
| 0 | 357 | |
| 2469 | 358 | Addsimps [succI1]; | 
| 359 | ||
| 9211 | 360 | Goalw [succ_def] "i : j ==> i : succ(j)"; | 
| 361 | by (etac consI2 1) ; | |
| 362 | qed "succI2"; | |
| 0 | 363 | |
| 9211 | 364 | val major::prems= Goalw [succ_def] | 
| 365 | "[| i : succ(j); i=j ==> P; i:j ==> P |] ==> P"; | |
| 366 | by (rtac (major RS consE) 1); | |
| 367 | by (REPEAT (eresolve_tac prems 1)) ; | |
| 368 | qed "succE"; | |
| 0 | 369 | |
| 14 
1c0926788772
ex/{bin.ML,comb.ML,prop.ML}: replaced NewSext by Syntax.simple_sext
 lcp parents: 
6diff
changeset | 370 | (*Classical introduction rule*) | 
| 9180 | 371 | val [prem]= Goal "(i~:j ==> i=j) ==> i: succ(j)"; | 
| 372 | by (rtac (disjCI RS (succ_iff RS iffD2)) 1); | |
| 373 | by (etac prem 1) ; | |
| 374 | qed "succCI"; | |
| 14 
1c0926788772
ex/{bin.ML,comb.ML,prop.ML}: replaced NewSext by Syntax.simple_sext
 lcp parents: 
6diff
changeset | 375 | |
| 2469 | 376 | AddSIs [succCI]; | 
| 377 | AddSEs [succE]; | |
| 378 | ||
| 9180 | 379 | Goal "succ(n) ~= 0"; | 
| 380 | by (blast_tac (claset() addSEs [equalityE]) 1) ; | |
| 381 | qed "succ_not_0"; | |
| 0 | 382 | |
| 2469 | 383 | bind_thm ("succ_neq_0", succ_not_0 RS notE);
 | 
| 384 | ||
| 385 | Addsimps [succ_not_0, succ_not_0 RS not_sym]; | |
| 386 | AddSEs [succ_neq_0, sym RS succ_neq_0]; | |
| 387 | ||
| 0 | 388 | |
| 389 | (* succ(c) <= B ==> c : B *) | |
| 9907 | 390 | bind_thm ("succ_subsetD", succI1 RSN (2,subsetD));
 | 
| 0 | 391 | |
| 1609 | 392 | (* succ(b) ~= b *) | 
| 393 | bind_thm ("succ_neq_self", succI1 RS mem_imp_not_eq RS not_sym);
 | |
| 394 | ||
| 9180 | 395 | Goal "succ(m) = succ(n) <-> m=n"; | 
| 396 | by (blast_tac (claset() addEs [mem_asym] addSEs [equalityE]) 1) ; | |
| 397 | qed "succ_inject_iff"; | |
| 0 | 398 | |
| 2469 | 399 | bind_thm ("succ_inject", succ_inject_iff RS iffD1);
 | 
| 0 | 400 | |
| 2469 | 401 | Addsimps [succ_inject_iff]; | 
| 402 | AddSDs [succ_inject]; | |
| 0 | 403 | |
| 2877 | 404 | (*Not needed now that cons is available. Deletion reduces the search space.*) | 
| 405 | Delrules [UpairI1,UpairI2,UpairE]; |