301 (*** Closure under product/sum applied to elements -- thus Vfrom(A,i) |
301 (*** Closure under product/sum applied to elements -- thus Vfrom(A,i) |
302 is a model of simple type theory provided A is a transitive set |
302 is a model of simple type theory provided A is a transitive set |
303 and i is a limit ordinal |
303 and i is a limit ordinal |
304 ***) |
304 ***) |
305 |
305 |
306 (*There are three nearly identical proofs below -- needs a general theorem |
306 (*General theorem for membership in Vfrom(A,i) when i is a limit ordinal*) |
307 for proving ...a...b : Vfrom(A,i) where i is a limit ordinal*) |
307 val [aprem,bprem,limiti,step] = goal Univ.thy |
|
308 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); \ |
|
309 \ !!x y j. [| j<i; 1:j; x: Vfrom(A,j); y: Vfrom(A,j) \ |
|
310 \ |] ==> EX k. h(x,y): Vfrom(A,k) & k<i |] ==> \ |
|
311 \ h(a,b) : Vfrom(A,i)"; |
|
312 (*Infer that a, b occur at ordinals x,xa < i.*) |
|
313 by (rtac ([aprem,limiti] MRS Limit_VfromE) 1); |
|
314 by (rtac ([bprem,limiti] MRS Limit_VfromE) 1); |
|
315 by (res_inst_tac [("j1", "x Un xa Un succ(1)")] (step RS exE) 1); |
|
316 by (DO_GOAL [etac conjE, etac Limit_VfromI, rtac limiti, atac] 5); |
|
317 by (etac (Vfrom_UnI2 RS Vfrom_UnI1) 4); |
|
318 by (etac (Vfrom_UnI1 RS Vfrom_UnI1) 3); |
|
319 by (rtac (succI1 RS UnI2) 2); |
|
320 by (REPEAT (ares_tac [limiti, Limit_has_0, Limit_has_succ, Un_least_lt] 1)); |
|
321 val in_Vfrom_limit = result(); |
308 |
322 |
309 (** products **) |
323 (** products **) |
310 |
324 |
311 goal Univ.thy |
325 goal Univ.thy |
312 "!!A. [| a: Vfrom(A,i); b: Vfrom(A,i); Transset(A) |] ==> \ |
326 "!!A. [| a: Vfrom(A,j); b: Vfrom(A,j); Transset(A) |] ==> \ |
313 \ a*b : Vfrom(A, succ(succ(succ(i))))"; |
327 \ a*b : Vfrom(A, succ(succ(succ(j))))"; |
314 by (dtac Transset_Vfrom 1); |
328 by (dtac Transset_Vfrom 1); |
315 by (rtac subset_mem_Vfrom 1); |
329 by (rtac subset_mem_Vfrom 1); |
316 by (rewtac Transset_def); |
330 by (rewtac Transset_def); |
317 by (fast_tac (ZF_cs addIs [Pair_in_Vfrom]) 1); |
331 by (fast_tac (ZF_cs addIs [Pair_in_Vfrom]) 1); |
318 val prod_in_Vfrom = result(); |
332 val prod_in_Vfrom = result(); |
319 |
333 |
320 val [aprem,bprem,limiti,transset] = goal Univ.thy |
334 val [aprem,bprem,limiti,transset] = goal Univ.thy |
321 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
335 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
322 \ a*b : Vfrom(A,i)"; |
336 \ a*b : Vfrom(A,i)"; |
323 (*Infer that a, b occur at ordinals x,xa < i.*) |
337 by (rtac ([aprem,bprem,limiti] MRS in_Vfrom_limit) 1); |
324 by (rtac ([aprem,limiti] MRS Limit_VfromE) 1); |
338 by (REPEAT (ares_tac [exI, conjI, prod_in_Vfrom, transset, |
325 by (rtac ([bprem,limiti] MRS Limit_VfromE) 1); |
339 limiti RS Limit_has_succ] 1)); |
326 by (rtac ([prod_in_Vfrom, limiti] MRS Limit_VfromI) 1); |
|
327 by (etac (Vfrom_UnI1 RS Vfrom_UnI2) 1); |
|
328 by (etac (Vfrom_UnI2 RS Vfrom_UnI2) 1); |
|
329 (*Infer that succ(succ(succ(x Un xa))) < i *) |
|
330 by (REPEAT (ares_tac [limiti, Limit_has_succ, Un_least_lt, transset] 1)); |
|
331 val prod_in_Vfrom_limit = result(); |
340 val prod_in_Vfrom_limit = result(); |
332 |
341 |
333 (** Disjoint sums, aka Quine ordered pairs **) |
342 (** Disjoint sums, aka Quine ordered pairs **) |
334 |
343 |
335 goalw Univ.thy [sum_def] |
344 goalw Univ.thy [sum_def] |
336 "!!A. [| a: Vfrom(A,i); b: Vfrom(A,i); Transset(A); 1:i |] ==> \ |
345 "!!A. [| a: Vfrom(A,j); b: Vfrom(A,j); Transset(A); 1:j |] ==> \ |
337 \ a+b : Vfrom(A, succ(succ(succ(i))))"; |
346 \ a+b : Vfrom(A, succ(succ(succ(j))))"; |
338 by (dtac Transset_Vfrom 1); |
347 by (dtac Transset_Vfrom 1); |
339 by (rtac subset_mem_Vfrom 1); |
348 by (rtac subset_mem_Vfrom 1); |
340 by (rewtac Transset_def); |
349 by (rewtac Transset_def); |
341 by (fast_tac (ZF_cs addIs [zero_in_Vfrom, Pair_in_Vfrom, |
350 by (fast_tac (ZF_cs addIs [zero_in_Vfrom, Pair_in_Vfrom, |
342 i_subset_Vfrom RS subsetD]) 1); |
351 i_subset_Vfrom RS subsetD]) 1); |
343 val sum_in_Vfrom = result(); |
352 val sum_in_Vfrom = result(); |
344 |
353 |
345 val [aprem,bprem,limiti,transset] = goal Univ.thy |
354 val [aprem,bprem,limiti,transset] = goal Univ.thy |
346 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
355 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
347 \ a+b : Vfrom(A,i)"; |
356 \ a+b : Vfrom(A,i)"; |
348 (*Infer that a, b occur at ordinals x,xa < i.*) |
357 by (rtac ([aprem,bprem,limiti] MRS in_Vfrom_limit) 1); |
349 by (rtac ([aprem,limiti] MRS Limit_VfromE) 1); |
358 by (REPEAT (ares_tac [exI, conjI, sum_in_Vfrom, transset, |
350 by (rtac ([bprem,limiti] MRS Limit_VfromE) 1); |
359 limiti RS Limit_has_succ] 1)); |
351 by (rtac ([sum_in_Vfrom, limiti] MRS Limit_VfromI) 1); |
|
352 by (rtac (succI1 RS UnI1) 4); |
|
353 (*Infer that succ(succ(succ(succ(1) Un (x Un xa)))) < i *) |
|
354 by (etac (Vfrom_UnI1 RS Vfrom_UnI2) 1); |
|
355 by (etac (Vfrom_UnI2 RS Vfrom_UnI2) 1); |
|
356 by (REPEAT (ares_tac [limiti, Limit_has_0, Limit_has_succ, Un_least_lt, |
|
357 transset] 1)); |
|
358 val sum_in_Vfrom_limit = result(); |
360 val sum_in_Vfrom_limit = result(); |
359 |
361 |
360 (** function space! **) |
362 (** function space! **) |
361 |
363 |
362 goalw Univ.thy [Pi_def] |
364 goalw Univ.thy [Pi_def] |
363 "!!A. [| a: Vfrom(A,i); b: Vfrom(A,i); Transset(A) |] ==> \ |
365 "!!A. [| a: Vfrom(A,j); b: Vfrom(A,j); Transset(A) |] ==> \ |
364 \ a->b : Vfrom(A, succ(succ(succ(succ(i)))))"; |
366 \ a->b : Vfrom(A, succ(succ(succ(succ(j)))))"; |
365 by (dtac Transset_Vfrom 1); |
367 by (dtac Transset_Vfrom 1); |
366 by (rtac subset_mem_Vfrom 1); |
368 by (rtac subset_mem_Vfrom 1); |
367 by (rtac (Collect_subset RS subset_trans) 1); |
369 by (rtac (Collect_subset RS subset_trans) 1); |
368 by (rtac (Vfrom RS ssubst) 1); |
370 by (rtac (Vfrom RS ssubst) 1); |
369 by (rtac (subset_trans RS subset_trans) 1); |
371 by (rtac (subset_trans RS subset_trans) 1); |
375 val fun_in_Vfrom = result(); |
377 val fun_in_Vfrom = result(); |
376 |
378 |
377 val [aprem,bprem,limiti,transset] = goal Univ.thy |
379 val [aprem,bprem,limiti,transset] = goal Univ.thy |
378 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
380 "[| a: Vfrom(A,i); b: Vfrom(A,i); Limit(i); Transset(A) |] ==> \ |
379 \ a->b : Vfrom(A,i)"; |
381 \ a->b : Vfrom(A,i)"; |
380 (*Infer that a, b occur at ordinals x,xa < i.*) |
382 by (rtac ([aprem,bprem,limiti] MRS in_Vfrom_limit) 1); |
381 by (rtac ([aprem,limiti] MRS Limit_VfromE) 1); |
383 by (REPEAT (ares_tac [exI, conjI, fun_in_Vfrom, transset, |
382 by (rtac ([bprem,limiti] MRS Limit_VfromE) 1); |
384 limiti RS Limit_has_succ] 1)); |
383 by (rtac ([fun_in_Vfrom, limiti] MRS Limit_VfromI) 1); |
|
384 (*Infer that succ(succ(succ(x Un xa))) < i *) |
|
385 by (etac (Vfrom_UnI1 RS Vfrom_UnI2) 1); |
|
386 by (etac (Vfrom_UnI2 RS Vfrom_UnI2) 1); |
|
387 by (REPEAT (ares_tac [limiti, Limit_has_succ, Un_least_lt, transset] 1)); |
|
388 val fun_in_Vfrom_limit = result(); |
385 val fun_in_Vfrom_limit = result(); |
389 |
386 |
390 |
387 |
391 (*** The set Vset(i) ***) |
388 (*** The set Vset(i) ***) |
392 |
389 |