src/ZF/Constructible/Rank_Separation.thy
author wenzelm
Thu Dec 14 11:24:26 2017 +0100 (21 months ago)
changeset 67198 694f29a5433b
parent 61798 27f3c10b0b50
child 67399 eab6ce8368fa
permissions -rw-r--r--
merged
paulson@13634
     1
(*  Title:      ZF/Constructible/Rank_Separation.thy
paulson@13634
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@13634
     3
*)
paulson@13634
     4
wenzelm@60770
     5
section \<open>Separation for Facts About Order Types, Rank Functions and 
wenzelm@60770
     6
      Well-Founded Relations\<close>
paulson@13634
     7
haftmann@16417
     8
theory Rank_Separation imports Rank Rec_Separation begin
paulson@13634
     9
paulson@13634
    10
wenzelm@60770
    11
text\<open>This theory proves all instances needed for locales
wenzelm@61798
    12
 \<open>M_ordertype\<close> and  \<open>M_wfrank\<close>.  But the material is not
wenzelm@60770
    13
 needed for proving the relative consistency of AC.\<close>
paulson@13634
    14
wenzelm@61798
    15
subsection\<open>The Locale \<open>M_ordertype\<close>\<close>
paulson@13634
    16
wenzelm@60770
    17
subsubsection\<open>Separation for Order-Isomorphisms\<close>
paulson@13634
    18
paulson@13634
    19
lemma well_ord_iso_Reflects:
paulson@46823
    20
  "REFLECTS[\<lambda>x. x\<in>A \<longrightarrow>
paulson@13634
    21
                (\<exists>y[L]. \<exists>p[L]. fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r),
paulson@46823
    22
        \<lambda>i x. x\<in>A \<longrightarrow> (\<exists>y \<in> Lset(i). \<exists>p \<in> Lset(i).
paulson@13807
    23
                fun_apply(##Lset(i),f,x,y) & pair(##Lset(i),y,x,p) & p \<in> r)]"
paulson@13634
    24
by (intro FOL_reflections function_reflections)
paulson@13634
    25
paulson@13634
    26
lemma well_ord_iso_separation:
paulson@13634
    27
     "[| L(A); L(f); L(r) |]
paulson@46823
    28
      ==> separation (L, \<lambda>x. x\<in>A \<longrightarrow> (\<exists>y[L]. (\<exists>p[L].
paulson@13634
    29
                     fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r)))"
paulson@13687
    30
apply (rule gen_separation_multi [OF well_ord_iso_Reflects, of "{A,f,r}"], 
paulson@13687
    31
       auto)
paulson@13687
    32
apply (rule_tac env="[A,f,r]" in DPow_LsetI)
paulson@13634
    33
apply (rule sep_rules | simp)+
paulson@13634
    34
done
paulson@13634
    35
paulson@13634
    36
wenzelm@60770
    37
subsubsection\<open>Separation for @{term "obase"}\<close>
paulson@13634
    38
paulson@13634
    39
lemma obase_reflects:
paulson@13634
    40
  "REFLECTS[\<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
paulson@13634
    41
             ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
paulson@13634
    42
             order_isomorphism(L,par,r,x,mx,g),
paulson@13634
    43
        \<lambda>i a. \<exists>x \<in> Lset(i). \<exists>g \<in> Lset(i). \<exists>mx \<in> Lset(i). \<exists>par \<in> Lset(i).
paulson@13807
    44
             ordinal(##Lset(i),x) & membership(##Lset(i),x,mx) & pred_set(##Lset(i),A,a,r,par) &
paulson@13807
    45
             order_isomorphism(##Lset(i),par,r,x,mx,g)]"
paulson@13634
    46
by (intro FOL_reflections function_reflections fun_plus_reflections)
paulson@13634
    47
paulson@13634
    48
lemma obase_separation:
wenzelm@61798
    49
     \<comment>\<open>part of the order type formalization\<close>
paulson@13634
    50
     "[| L(A); L(r) |]
paulson@13634
    51
      ==> separation(L, \<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
paulson@13634
    52
             ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
paulson@13634
    53
             order_isomorphism(L,par,r,x,mx,g))"
paulson@13687
    54
apply (rule gen_separation_multi [OF obase_reflects, of "{A,r}"], auto)
paulson@13687
    55
apply (rule_tac env="[A,r]" in DPow_LsetI)
paulson@13687
    56
apply (rule ordinal_iff_sats sep_rules | simp)+
paulson@13634
    57
done
paulson@13634
    58
paulson@13634
    59
wenzelm@60770
    60
subsubsection\<open>Separation for a Theorem about @{term "obase"}\<close>
paulson@13634
    61
paulson@13634
    62
lemma obase_equals_reflects:
paulson@46823
    63
  "REFLECTS[\<lambda>x. x\<in>A \<longrightarrow> ~(\<exists>y[L]. \<exists>g[L].
paulson@13634
    64
                ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
paulson@13634
    65
                membership(L,y,my) & pred_set(L,A,x,r,pxr) &
paulson@13634
    66
                order_isomorphism(L,pxr,r,y,my,g))),
paulson@46823
    67
        \<lambda>i x. x\<in>A \<longrightarrow> ~(\<exists>y \<in> Lset(i). \<exists>g \<in> Lset(i).
paulson@13807
    68
                ordinal(##Lset(i),y) & (\<exists>my \<in> Lset(i). \<exists>pxr \<in> Lset(i).
paulson@13807
    69
                membership(##Lset(i),y,my) & pred_set(##Lset(i),A,x,r,pxr) &
paulson@13807
    70
                order_isomorphism(##Lset(i),pxr,r,y,my,g)))]"
paulson@13634
    71
by (intro FOL_reflections function_reflections fun_plus_reflections)
paulson@13634
    72
paulson@13634
    73
lemma obase_equals_separation:
paulson@13634
    74
     "[| L(A); L(r) |]
paulson@46823
    75
      ==> separation (L, \<lambda>x. x\<in>A \<longrightarrow> ~(\<exists>y[L]. \<exists>g[L].
paulson@13634
    76
                              ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
paulson@13634
    77
                              membership(L,y,my) & pred_set(L,A,x,r,pxr) &
paulson@13634
    78
                              order_isomorphism(L,pxr,r,y,my,g))))"
paulson@13687
    79
apply (rule gen_separation_multi [OF obase_equals_reflects, of "{A,r}"], auto)
paulson@13687
    80
apply (rule_tac env="[A,r]" in DPow_LsetI)
paulson@13634
    81
apply (rule sep_rules | simp)+
paulson@13634
    82
done
paulson@13634
    83
paulson@13634
    84
wenzelm@60770
    85
subsubsection\<open>Replacement for @{term "omap"}\<close>
paulson@13634
    86
paulson@13634
    87
lemma omap_reflects:
paulson@13634
    88
 "REFLECTS[\<lambda>z. \<exists>a[L]. a\<in>B & (\<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
paulson@13634
    89
     ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
paulson@13634
    90
     pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g)),
paulson@13634
    91
 \<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).
paulson@13634
    92
        \<exists>par \<in> Lset(i).
paulson@13807
    93
         ordinal(##Lset(i),x) & pair(##Lset(i),a,x,z) &
paulson@13807
    94
         membership(##Lset(i),x,mx) & pred_set(##Lset(i),A,a,r,par) &
paulson@13807
    95
         order_isomorphism(##Lset(i),par,r,x,mx,g))]"
paulson@13634
    96
by (intro FOL_reflections function_reflections fun_plus_reflections)
paulson@13634
    97
paulson@13634
    98
lemma omap_replacement:
paulson@13634
    99
     "[| L(A); L(r) |]
paulson@13634
   100
      ==> strong_replacement(L,
paulson@13634
   101
             \<lambda>a z. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
paulson@13634
   102
             ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
paulson@13634
   103
             pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g))"
paulson@13634
   104
apply (rule strong_replacementI)
paulson@13687
   105
apply (rule_tac u="{A,r,B}" in gen_separation_multi [OF omap_reflects], auto)
paulson@13687
   106
apply (rule_tac env="[A,B,r]" in DPow_LsetI)
paulson@13634
   107
apply (rule sep_rules | simp)+
paulson@13634
   108
done
paulson@13634
   109
paulson@13634
   110
paulson@13634
   111
wenzelm@61798
   112
subsection\<open>Instantiating the locale \<open>M_ordertype\<close>\<close>
wenzelm@60770
   113
text\<open>Separation (and Strong Replacement) for basic set-theoretic constructions
wenzelm@60770
   114
such as intersection, Cartesian Product and image.\<close>
paulson@13634
   115
paulson@13634
   116
lemma M_ordertype_axioms_L: "M_ordertype_axioms(L)"
paulson@13634
   117
  apply (rule M_ordertype_axioms.intro)
paulson@13634
   118
       apply (assumption | rule well_ord_iso_separation
wenzelm@32960
   119
         obase_separation obase_equals_separation
wenzelm@32960
   120
         omap_replacement)+
paulson@13634
   121
  done
paulson@13634
   122
paulson@13634
   123
theorem M_ordertype_L: "PROP M_ordertype(L)"
ballarin@19931
   124
  apply (rule M_ordertype.intro)
ballarin@19931
   125
   apply (rule M_basic_L)
ballarin@19931
   126
  apply (rule M_ordertype_axioms_L) 
ballarin@19931
   127
  done
paulson@13634
   128
paulson@13634
   129
wenzelm@61798
   130
subsection\<open>The Locale \<open>M_wfrank\<close>\<close>
paulson@13634
   131
wenzelm@60770
   132
subsubsection\<open>Separation for @{term "wfrank"}\<close>
paulson@13634
   133
paulson@13634
   134
lemma wfrank_Reflects:
paulson@46823
   135
 "REFLECTS[\<lambda>x. \<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   136
              ~ (\<exists>f[L]. M_is_recfun(L, %x f y. is_range(L,f,y), rplus, x, f)),
paulson@46823
   137
      \<lambda>i x. \<forall>rplus \<in> Lset(i). tran_closure(##Lset(i),r,rplus) \<longrightarrow>
paulson@13634
   138
         ~ (\<exists>f \<in> Lset(i).
paulson@13807
   139
            M_is_recfun(##Lset(i), %x f y. is_range(##Lset(i),f,y),
paulson@13634
   140
                        rplus, x, f))]"
paulson@13634
   141
by (intro FOL_reflections function_reflections is_recfun_reflection tran_closure_reflection)
paulson@13634
   142
paulson@13634
   143
lemma wfrank_separation:
paulson@13634
   144
     "L(r) ==>
paulson@46823
   145
      separation (L, \<lambda>x. \<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   146
         ~ (\<exists>f[L]. M_is_recfun(L, %x f y. is_range(L,f,y), rplus, x, f)))"
paulson@13634
   147
apply (rule gen_separation [OF wfrank_Reflects], simp)
paulson@13687
   148
apply (rule_tac env="[r]" in DPow_LsetI)
paulson@13687
   149
apply (rule sep_rules tran_closure_iff_sats is_recfun_iff_sats | simp)+
paulson@13634
   150
done
paulson@13634
   151
paulson@13634
   152
wenzelm@60770
   153
subsubsection\<open>Replacement for @{term "wfrank"}\<close>
paulson@13634
   154
paulson@13634
   155
lemma wfrank_replacement_Reflects:
paulson@13634
   156
 "REFLECTS[\<lambda>z. \<exists>x[L]. x \<in> A &
paulson@46823
   157
        (\<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   158
         (\<exists>y[L]. \<exists>f[L]. pair(L,x,y,z)  &
paulson@13634
   159
                        M_is_recfun(L, %x f y. is_range(L,f,y), rplus, x, f) &
paulson@13634
   160
                        is_range(L,f,y))),
paulson@13634
   161
 \<lambda>i z. \<exists>x \<in> Lset(i). x \<in> A &
paulson@46823
   162
      (\<forall>rplus \<in> Lset(i). tran_closure(##Lset(i),r,rplus) \<longrightarrow>
paulson@13807
   163
       (\<exists>y \<in> Lset(i). \<exists>f \<in> Lset(i). pair(##Lset(i),x,y,z)  &
paulson@13807
   164
         M_is_recfun(##Lset(i), %x f y. is_range(##Lset(i),f,y), rplus, x, f) &
paulson@13807
   165
         is_range(##Lset(i),f,y)))]"
paulson@13634
   166
by (intro FOL_reflections function_reflections fun_plus_reflections
paulson@13634
   167
             is_recfun_reflection tran_closure_reflection)
paulson@13634
   168
paulson@13634
   169
lemma wfrank_strong_replacement:
paulson@13634
   170
     "L(r) ==>
paulson@13634
   171
      strong_replacement(L, \<lambda>x z.
paulson@46823
   172
         \<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   173
         (\<exists>y[L]. \<exists>f[L]. pair(L,x,y,z)  &
paulson@13634
   174
                        M_is_recfun(L, %x f y. is_range(L,f,y), rplus, x, f) &
paulson@13634
   175
                        is_range(L,f,y)))"
paulson@13634
   176
apply (rule strong_replacementI)
paulson@13687
   177
apply (rule_tac u="{r,B}" 
paulson@13687
   178
         in gen_separation_multi [OF wfrank_replacement_Reflects], 
paulson@13687
   179
       auto)
paulson@13687
   180
apply (rule_tac env="[r,B]" in DPow_LsetI)
paulson@13687
   181
apply (rule sep_rules tran_closure_iff_sats is_recfun_iff_sats | simp)+
paulson@13634
   182
done
paulson@13634
   183
paulson@13634
   184
wenzelm@61798
   185
subsubsection\<open>Separation for Proving \<open>Ord_wfrank_range\<close>\<close>
paulson@13634
   186
paulson@13634
   187
lemma Ord_wfrank_Reflects:
paulson@46823
   188
 "REFLECTS[\<lambda>x. \<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   189
          ~ (\<forall>f[L]. \<forall>rangef[L].
paulson@46823
   190
             is_range(L,f,rangef) \<longrightarrow>
paulson@46823
   191
             M_is_recfun(L, \<lambda>x f y. is_range(L,f,y), rplus, x, f) \<longrightarrow>
paulson@13634
   192
             ordinal(L,rangef)),
paulson@46823
   193
      \<lambda>i x. \<forall>rplus \<in> Lset(i). tran_closure(##Lset(i),r,rplus) \<longrightarrow>
paulson@13634
   194
          ~ (\<forall>f \<in> Lset(i). \<forall>rangef \<in> Lset(i).
paulson@46823
   195
             is_range(##Lset(i),f,rangef) \<longrightarrow>
paulson@13807
   196
             M_is_recfun(##Lset(i), \<lambda>x f y. is_range(##Lset(i),f,y),
paulson@46823
   197
                         rplus, x, f) \<longrightarrow>
paulson@13807
   198
             ordinal(##Lset(i),rangef))]"
paulson@13634
   199
by (intro FOL_reflections function_reflections is_recfun_reflection
paulson@13634
   200
          tran_closure_reflection ordinal_reflection)
paulson@13634
   201
paulson@13634
   202
lemma  Ord_wfrank_separation:
paulson@13634
   203
     "L(r) ==>
paulson@13634
   204
      separation (L, \<lambda>x.
paulson@46823
   205
         \<forall>rplus[L]. tran_closure(L,r,rplus) \<longrightarrow>
paulson@13634
   206
          ~ (\<forall>f[L]. \<forall>rangef[L].
paulson@46823
   207
             is_range(L,f,rangef) \<longrightarrow>
paulson@46823
   208
             M_is_recfun(L, \<lambda>x f y. is_range(L,f,y), rplus, x, f) \<longrightarrow>
paulson@13634
   209
             ordinal(L,rangef)))"
paulson@13634
   210
apply (rule gen_separation [OF Ord_wfrank_Reflects], simp)
paulson@13687
   211
apply (rule_tac env="[r]" in DPow_LsetI)
paulson@13687
   212
apply (rule sep_rules tran_closure_iff_sats is_recfun_iff_sats | simp)+
paulson@13634
   213
done
paulson@13634
   214
paulson@13634
   215
wenzelm@61798
   216
subsubsection\<open>Instantiating the locale \<open>M_wfrank\<close>\<close>
paulson@13634
   217
paulson@13634
   218
lemma M_wfrank_axioms_L: "M_wfrank_axioms(L)"
paulson@13634
   219
  apply (rule M_wfrank_axioms.intro)
paulson@13634
   220
   apply (assumption | rule
paulson@13634
   221
     wfrank_separation wfrank_strong_replacement Ord_wfrank_separation)+
paulson@13634
   222
  done
paulson@13634
   223
paulson@13634
   224
theorem M_wfrank_L: "PROP M_wfrank(L)"
paulson@13634
   225
  apply (rule M_wfrank.intro)
ballarin@19931
   226
   apply (rule M_trancl_L)
paulson@13634
   227
  apply (rule M_wfrank_axioms_L) 
paulson@13634
   228
  done
paulson@13634
   229
paulson@13634
   230
lemmas exists_wfrank = M_wfrank.exists_wfrank [OF M_wfrank_L]
paulson@13634
   231
  and M_wellfoundedrank = M_wfrank.M_wellfoundedrank [OF M_wfrank_L]
paulson@13634
   232
  and Ord_wfrank_range = M_wfrank.Ord_wfrank_range [OF M_wfrank_L]
paulson@13634
   233
  and Ord_range_wellfoundedrank = M_wfrank.Ord_range_wellfoundedrank [OF M_wfrank_L]
paulson@13634
   234
  and function_wellfoundedrank = M_wfrank.function_wellfoundedrank [OF M_wfrank_L]
paulson@13634
   235
  and domain_wellfoundedrank = M_wfrank.domain_wellfoundedrank [OF M_wfrank_L]
paulson@13634
   236
  and wellfoundedrank_type = M_wfrank.wellfoundedrank_type [OF M_wfrank_L]
paulson@13634
   237
  and Ord_wellfoundedrank = M_wfrank.Ord_wellfoundedrank [OF M_wfrank_L]
paulson@13634
   238
  and wellfoundedrank_eq = M_wfrank.wellfoundedrank_eq [OF M_wfrank_L]
paulson@13634
   239
  and wellfoundedrank_lt = M_wfrank.wellfoundedrank_lt [OF M_wfrank_L]
paulson@13634
   240
  and wellfounded_imp_subset_rvimage = M_wfrank.wellfounded_imp_subset_rvimage [OF M_wfrank_L]
paulson@13634
   241
  and wellfounded_imp_wf = M_wfrank.wellfounded_imp_wf [OF M_wfrank_L]
paulson@13634
   242
  and wellfounded_on_imp_wf_on = M_wfrank.wellfounded_on_imp_wf_on [OF M_wfrank_L]
paulson@13634
   243
  and wf_abs = M_wfrank.wf_abs [OF M_wfrank_L]
paulson@13634
   244
  and wf_on_abs = M_wfrank.wf_on_abs [OF M_wfrank_L]
paulson@13634
   245
paulson@13634
   246
end