src/ZF/Constructible/Separation.thy
changeset 13634 99a593b49b04
parent 13628 87482b5e3f2e
child 13687 22dce9134953
equal deleted inserted replaced
13633:b03a36b8d528 13634:99a593b49b04
     1 (*  Title:      ZF/Constructible/Separation.thy
     1 (*  Title:      ZF/Constructible/Separation.thy
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   2002  University of Cambridge
       
     5 *)
     4 *)
     6 
     5 
     7 header{*Early Instances of Separation and Strong Replacement*}
     6 header{*Early Instances of Separation and Strong Replacement*}
     8 
     7 
     9 theory Separation = L_axioms + WF_absolute:
     8 theory Separation = L_axioms + WF_absolute:
   268 apply (rule_tac env = "[p,z,n,A]" in mem_iff_sats)
   267 apply (rule_tac env = "[p,z,n,A]" in mem_iff_sats)
   269 apply (rule sep_rules | simp)+
   268 apply (rule sep_rules | simp)+
   270 done
   269 done
   271 
   270 
   272 
   271 
   273 subsection{*Separation for Order-Isomorphisms*}
   272 subsection{*Separation for a Theorem about @{term "is_recfun"}*}
   274 
       
   275 lemma well_ord_iso_Reflects:
       
   276   "REFLECTS[\<lambda>x. x\<in>A -->
       
   277                 (\<exists>y[L]. \<exists>p[L]. fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r),
       
   278         \<lambda>i x. x\<in>A --> (\<exists>y \<in> Lset(i). \<exists>p \<in> Lset(i).
       
   279                 fun_apply(**Lset(i),f,x,y) & pair(**Lset(i),y,x,p) & p \<in> r)]"
       
   280 by (intro FOL_reflections function_reflections)
       
   281 
       
   282 lemma well_ord_iso_separation:
       
   283      "[| L(A); L(f); L(r) |]
       
   284       ==> separation (L, \<lambda>x. x\<in>A --> (\<exists>y[L]. (\<exists>p[L].
       
   285                      fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r)))"
       
   286 apply (rule gen_separation [OF well_ord_iso_Reflects, of "{A,f,r}"], simp)
       
   287 apply (drule mem_Lset_imp_subset_Lset, clarsimp)
       
   288 apply (rule DPow_LsetI)
       
   289 apply (rule imp_iff_sats)
       
   290 apply (rule_tac env = "[x,A,f,r]" in mem_iff_sats)
       
   291 apply (rule sep_rules | simp)+
       
   292 done
       
   293 
       
   294 
       
   295 subsection{*Separation for @{term "obase"}*}
       
   296 
       
   297 lemma obase_reflects:
       
   298   "REFLECTS[\<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
       
   299              ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
       
   300              order_isomorphism(L,par,r,x,mx,g),
       
   301         \<lambda>i a. \<exists>x \<in> Lset(i). \<exists>g \<in> Lset(i). \<exists>mx \<in> Lset(i). \<exists>par \<in> Lset(i).
       
   302              ordinal(**Lset(i),x) & membership(**Lset(i),x,mx) & pred_set(**Lset(i),A,a,r,par) &
       
   303              order_isomorphism(**Lset(i),par,r,x,mx,g)]"
       
   304 by (intro FOL_reflections function_reflections fun_plus_reflections)
       
   305 
       
   306 lemma obase_separation:
       
   307      --{*part of the order type formalization*}
       
   308      "[| L(A); L(r) |]
       
   309       ==> separation(L, \<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
       
   310              ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
       
   311              order_isomorphism(L,par,r,x,mx,g))"
       
   312 apply (rule gen_separation [OF obase_reflects, of "{A,r}"], simp)
       
   313 apply (drule mem_Lset_imp_subset_Lset, clarsimp)
       
   314 apply (rule DPow_LsetI)
       
   315 apply (rule bex_iff_sats conj_iff_sats)+
       
   316 apply (rule_tac env = "[x,a,A,r]" in ordinal_iff_sats)
       
   317 apply (rule sep_rules | simp)+
       
   318 done
       
   319 
       
   320 
       
   321 subsection{*Separation for a Theorem about @{term "obase"}*}
       
   322 
       
   323 lemma obase_equals_reflects:
       
   324   "REFLECTS[\<lambda>x. x\<in>A --> ~(\<exists>y[L]. \<exists>g[L].
       
   325                 ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
       
   326                 membership(L,y,my) & pred_set(L,A,x,r,pxr) &
       
   327                 order_isomorphism(L,pxr,r,y,my,g))),
       
   328         \<lambda>i x. x\<in>A --> ~(\<exists>y \<in> Lset(i). \<exists>g \<in> Lset(i).
       
   329                 ordinal(**Lset(i),y) & (\<exists>my \<in> Lset(i). \<exists>pxr \<in> Lset(i).
       
   330                 membership(**Lset(i),y,my) & pred_set(**Lset(i),A,x,r,pxr) &
       
   331                 order_isomorphism(**Lset(i),pxr,r,y,my,g)))]"
       
   332 by (intro FOL_reflections function_reflections fun_plus_reflections)
       
   333 
       
   334 lemma obase_equals_separation:
       
   335      "[| L(A); L(r) |]
       
   336       ==> separation (L, \<lambda>x. x\<in>A --> ~(\<exists>y[L]. \<exists>g[L].
       
   337                               ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
       
   338                               membership(L,y,my) & pred_set(L,A,x,r,pxr) &
       
   339                               order_isomorphism(L,pxr,r,y,my,g))))"
       
   340 apply (rule gen_separation [OF obase_equals_reflects, of "{A,r}"], simp)
       
   341 apply (drule mem_Lset_imp_subset_Lset, clarsimp)
       
   342 apply (rule DPow_LsetI)
       
   343 apply (rule imp_iff_sats ball_iff_sats disj_iff_sats not_iff_sats)+
       
   344 apply (rule_tac env = "[x,A,r]" in mem_iff_sats)
       
   345 apply (rule sep_rules | simp)+
       
   346 done
       
   347 
       
   348 
       
   349 subsection{*Replacement for @{term "omap"}*}
       
   350 
       
   351 lemma omap_reflects:
       
   352  "REFLECTS[\<lambda>z. \<exists>a[L]. a\<in>B & (\<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
       
   353      ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
       
   354      pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g)),
       
   355  \<lambda>i z. \<exists>a \<in> Lset(i). a\<in>B & (\<exists>x \<in> Lset(i). \<exists>g \<in> Lset(i). \<exists>mx \<in> Lset(i).
       
   356         \<exists>par \<in> Lset(i).
       
   357          ordinal(**Lset(i),x) & pair(**Lset(i),a,x,z) &
       
   358          membership(**Lset(i),x,mx) & pred_set(**Lset(i),A,a,r,par) &
       
   359          order_isomorphism(**Lset(i),par,r,x,mx,g))]"
       
   360 by (intro FOL_reflections function_reflections fun_plus_reflections)
       
   361 
       
   362 lemma omap_replacement:
       
   363      "[| L(A); L(r) |]
       
   364       ==> strong_replacement(L,
       
   365              \<lambda>a z. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
       
   366              ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
       
   367              pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g))"
       
   368 apply (rule strong_replacementI)
       
   369 apply (rename_tac B)
       
   370 apply (rule_tac u="{A,r,B}" in gen_separation [OF omap_reflects], simp)
       
   371 apply (drule mem_Lset_imp_subset_Lset, clarsimp)
       
   372 apply (rule DPow_LsetI)
       
   373 apply (rule bex_iff_sats conj_iff_sats)+
       
   374 apply (rule_tac env = "[a,z,A,B,r]" in mem_iff_sats)
       
   375 apply (rule sep_rules | simp)+
       
   376 done
       
   377 
       
   378 
       
   379 subsection{*Separation for a Theorem about @{term "obase"}*}
       
   380 
   273 
   381 lemma is_recfun_reflects:
   274 lemma is_recfun_reflects:
   382   "REFLECTS[\<lambda>x. \<exists>xa[L]. \<exists>xb[L].
   275   "REFLECTS[\<lambda>x. \<exists>xa[L]. \<exists>xb[L].
   383                 pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
   276                 pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
   384                 (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
   277                 (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
   414   apply (rule M_basic_axioms.intro)
   307   apply (rule M_basic_axioms.intro)
   415        apply (assumption | rule
   308        apply (assumption | rule
   416 	 Inter_separation Diff_separation cartprod_separation image_separation
   309 	 Inter_separation Diff_separation cartprod_separation image_separation
   417 	 converse_separation restrict_separation
   310 	 converse_separation restrict_separation
   418 	 comp_separation pred_separation Memrel_separation
   311 	 comp_separation pred_separation Memrel_separation
   419 	 funspace_succ_replacement well_ord_iso_separation
   312 	 funspace_succ_replacement is_recfun_separation)+
   420 	 obase_separation obase_equals_separation
       
   421 	 omap_replacement is_recfun_separation)+
       
   422   done
   313   done
   423 
   314 
   424 theorem M_basic_L: "PROP M_basic(L)"
   315 theorem M_basic_L: "PROP M_basic(L)"
   425 by (rule M_basic.intro [OF M_trivial_L M_basic_axioms_L])
   316 by (rule M_basic.intro [OF M_trivial_L M_basic_axioms_L])
   426 
   317 
   467   and is_recfun_cut = M_basic.is_recfun_cut [OF M_basic_L]
   358   and is_recfun_cut = M_basic.is_recfun_cut [OF M_basic_L]
   468   and is_recfun_functional = M_basic.is_recfun_functional [OF M_basic_L]
   359   and is_recfun_functional = M_basic.is_recfun_functional [OF M_basic_L]
   469   and is_recfun_relativize = M_basic.is_recfun_relativize [OF M_basic_L]
   360   and is_recfun_relativize = M_basic.is_recfun_relativize [OF M_basic_L]
   470   and is_recfun_restrict = M_basic.is_recfun_restrict [OF M_basic_L]
   361   and is_recfun_restrict = M_basic.is_recfun_restrict [OF M_basic_L]
   471   and univalent_is_recfun = M_basic.univalent_is_recfun [OF M_basic_L]
   362   and univalent_is_recfun = M_basic.univalent_is_recfun [OF M_basic_L]
   472   and exists_is_recfun_indstep = M_basic.exists_is_recfun_indstep [OF M_basic_L]
       
   473   and wellfounded_exists_is_recfun = M_basic.wellfounded_exists_is_recfun [OF M_basic_L]
   363   and wellfounded_exists_is_recfun = M_basic.wellfounded_exists_is_recfun [OF M_basic_L]
   474   and wf_exists_is_recfun = M_basic.wf_exists_is_recfun [OF M_basic_L]
   364   and wf_exists_is_recfun = M_basic.wf_exists_is_recfun [OF M_basic_L]
   475   and is_recfun_abs = M_basic.is_recfun_abs [OF M_basic_L]
   365   and is_recfun_abs = M_basic.is_recfun_abs [OF M_basic_L]
   476   and irreflexive_abs = M_basic.irreflexive_abs [OF M_basic_L]
   366   and irreflexive_abs = M_basic.irreflexive_abs [OF M_basic_L]
   477   and transitive_rel_abs = M_basic.transitive_rel_abs [OF M_basic_L]
   367   and transitive_rel_abs = M_basic.transitive_rel_abs [OF M_basic_L]
   497 
   387 
   498 lemmas pred_closed = M_basic.pred_closed [OF M_basic_L]
   388 lemmas pred_closed = M_basic.pred_closed [OF M_basic_L]
   499   and membership_abs = M_basic.membership_abs [OF M_basic_L]
   389   and membership_abs = M_basic.membership_abs [OF M_basic_L]
   500   and M_Memrel_iff = M_basic.M_Memrel_iff [OF M_basic_L]
   390   and M_Memrel_iff = M_basic.M_Memrel_iff [OF M_basic_L]
   501   and Memrel_closed = M_basic.Memrel_closed [OF M_basic_L]
   391   and Memrel_closed = M_basic.Memrel_closed [OF M_basic_L]
   502   and wellordered_iso_predD = M_basic.wellordered_iso_predD [OF M_basic_L]
       
   503   and wellordered_iso_pred_eq = M_basic.wellordered_iso_pred_eq [OF M_basic_L]
       
   504   and wellfounded_on_asym = M_basic.wellfounded_on_asym [OF M_basic_L]
   392   and wellfounded_on_asym = M_basic.wellfounded_on_asym [OF M_basic_L]
   505   and wellordered_asym = M_basic.wellordered_asym [OF M_basic_L]
   393   and wellordered_asym = M_basic.wellordered_asym [OF M_basic_L]
   506   and ord_iso_pred_imp_lt = M_basic.ord_iso_pred_imp_lt [OF M_basic_L]
       
   507   and obase_iff = M_basic.obase_iff [OF M_basic_L]
       
   508   and omap_iff = M_basic.omap_iff [OF M_basic_L]
       
   509   and omap_unique = M_basic.omap_unique [OF M_basic_L]
       
   510   and omap_yields_Ord = M_basic.omap_yields_Ord [OF M_basic_L]
       
   511   and otype_iff = M_basic.otype_iff [OF M_basic_L]
       
   512   and otype_eq_range = M_basic.otype_eq_range [OF M_basic_L]
       
   513   and Ord_otype = M_basic.Ord_otype [OF M_basic_L]
       
   514   and domain_omap = M_basic.domain_omap [OF M_basic_L]
       
   515   and omap_subset = M_basic.omap_subset [OF M_basic_L]
       
   516   and omap_funtype = M_basic.omap_funtype [OF M_basic_L]
       
   517   and wellordered_omap_bij = M_basic.wellordered_omap_bij [OF M_basic_L]
       
   518   and omap_ord_iso = M_basic.omap_ord_iso [OF M_basic_L]
       
   519   and Ord_omap_image_pred = M_basic.Ord_omap_image_pred [OF M_basic_L]
       
   520   and restrict_omap_ord_iso = M_basic.restrict_omap_ord_iso [OF M_basic_L]
       
   521   and obase_equals = M_basic.obase_equals [OF M_basic_L]
       
   522   and omap_ord_iso_otype = M_basic.omap_ord_iso_otype [OF M_basic_L]
       
   523   and obase_exists = M_basic.obase_exists [OF M_basic_L]
       
   524   and omap_exists = M_basic.omap_exists [OF M_basic_L]
       
   525   and otype_exists = M_basic.otype_exists [OF M_basic_L]
       
   526   and omap_ord_iso_otype' = M_basic.omap_ord_iso_otype' [OF M_basic_L]
       
   527   and ordertype_exists = M_basic.ordertype_exists [OF M_basic_L]
       
   528   and relativized_imp_well_ord = M_basic.relativized_imp_well_ord [OF M_basic_L]
       
   529   and well_ord_abs = M_basic.well_ord_abs [OF M_basic_L]
       
   530 
   394 
   531 declare cartprod_closed [intro, simp]
   395 declare cartprod_closed [intro, simp]
   532 declare sum_closed [intro, simp]
   396 declare sum_closed [intro, simp]
   533 declare converse_closed [intro, simp]
   397 declare converse_closed [intro, simp]
   534 declare converse_abs [simp]
   398 declare converse_abs [simp]