(* Title: ZF/Constructible/Relative.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory With modifications by E. Gunther, M. Pagano, and P. Sánchez Terraf *)
section‹Relativization and Absoluteness›
theory Relative imports ZF begin
subsection‹Relativized versions of standard set-theoretic concepts›
definition
pre_image :: "[i==>o,i,i,i] ==> o"where "pre_image(M,r,A,z) ≡ ∀x[M]. x ∈ z ⟷ (∃w[M]. w∈r ∧ (∃y[M]. y∈A ∧ pair(M,x,y,w)))"
definition
is_domain :: "[i==>o,i,i] ==> o"where "is_domain(M,r,z) ≡ ∀x[M]. x ∈ z ⟷ (∃w[M]. w∈r ∧ (∃y[M]. pair(M,x,y,w)))"
definition
image :: "[i==>o,i,i,i] ==> o"where "image(M,r,A,z) ≡ ∀y[M]. y ∈ z ⟷ (∃w[M]. w∈r ∧ (∃x[M]. x∈A ∧ pair(M,x,y,w)))"
definition
is_range :: "[i==>o,i,i] ==> o"where 🍋‹the cleaner 🍋‹∃r'[M]. is_converse(M,r,r') ∧ is_domain(M,r',z)› unfortunately needs an instance of separation in order to prove 🍋‹M(converse(r))›.› "is_range(M,r,z) ≡ ∀y[M]. y ∈ z ⟷ (∃w[M]. w∈r ∧ (∃x[M]. pair(M,x,y,w)))"
definition
successor_ordinal :: "[i==>o,i] ==> o"where 🍋‹a successor ordinal is any ordinal that is neither empty nor limit› "successor_ordinal(M,a) ≡ ordinal(M,a) ∧¬ empty(M,a) ∧¬ limit_ordinal(M,a)"
definition
finite_ordinal :: "[i==>o,i] ==> o"where 🍋‹an ordinal is finite if neither it nor any of its elements are limit› "finite_ordinal(M,a) ≡ ordinal(M,a) ∧¬ limit_ordinal(M,a) ∧ (∀x[M]. x∈a ⟶¬ limit_ordinal(M,x))"
definition
omega :: "[i==>o,i] ==> o"where 🍋‹omega is a limit ordinal none of whose elements are limit› "omega(M,a) ≡ limit_ordinal(M,a) ∧ (∀x[M]. x∈a ⟶¬ limit_ordinal(M,x))"
text‹Useful when absoluteness reasoning has replaced the predicates by terms› lemma triv_Relation1: "Relation1(M, A, λx y. y = f(x), f)" by (simp add: Relation1_def)
lemma triv_Relation2: "Relation2(M, A, B, λx y a. a = f(x,y), f)" by (simp add: Relation2_def)
subsection‹The relativized ZF axioms›
definition
extensionality :: "(i==>o) ==> o"where "extensionality(M) ≡ ∀x[M]. ∀y[M]. (∀z[M]. z ∈ x ⟷ z ∈ y) ⟶ x=y"
definition
separation :: "[i==>o, i==>o] ==> o"where 🍋‹The formula ‹P›should only involve parameters belonging to ‹M›and all its quantifiers must be relativized to ‹M›. We do not have separation as a scheme; every instance that we need must be assumed (and later proved) separately.› "separation(M,P) ≡ ∀z[M]. ∃y[M]. ∀x[M]. x ∈ y ⟷ x ∈ z ∧ P(x)"
text‹The class M is assumed to be transitive and inhabited› locale M_trans = fixes M assumes transM: "[y∈x; M(x)]==> M(y)" and M_inhabited: "∃x . M(x)"
lemma (in M_trans) nonempty [simp]: "M(0)" proof - have"M(x) ⟶ M(0)"for x proof (rule_tac P="λw. M(w) ⟶ M(0)"in eps_induct)
{ fix x assume"∀y∈x. M(y) ⟶ M(0)""M(x)"
consider (a) "∃y. y∈x" | (b) "x=0"by auto then have"M(x) ⟶ M(0)" proof cases case a thenshow ?thesis using‹∀y∈x._›‹M(x)› transM by auto next case b thenshow ?thesis by simp qed
} thenshow"M(x) ⟶ M(0)"if"∀y∈x. M(y) ⟶ M(0)"for x using that by auto qed with M_inhabited show"M(0)"using M_inhabited by blast qed
text‹The class M is assumed to be transitive and to satisfy some relativized ZF axioms› locale M_trivial = M_trans + assumes upair_ax: "upair_ax(M)" and Union_ax: "Union_ax(M)"
lemma (in M_trans) rall_abs [simp]: "M(A) ==> (∀x[M]. x∈A ⟶ P(x)) ⟷ (∀x∈A. P(x))" by (blast intro: transM)
lemma (in M_trans) rex_abs [simp]: "M(A) ==> (∃x[M]. x∈A ∧ P(x)) ⟷ (∃x∈A. P(x))" by (blast intro: transM)
text‹Simplifies proofs of equalities when there's an iff-equality available for rewriting, universally quantified over M. But it's not the only way to prove such equalities: its premises 🍋‹M(A)›and 🍋‹M(B)› can be too strong.› lemma (in M_trans) M_equalityI: "[∧x. M(x) ==> x∈A ⟷ x∈B; M(A); M(B)]==> A=B" by (blast dest: transM)
(*The first premise can't simply be assumed as a schema. It is essential to take care when asserting instances of Replacement. Let K be a nonconstructible subset of nat and define f(x) = x if x ∈ K and f(x)=0 otherwise. Then RepFun(nat,f) = cons(0,K), a nonconstructible set. So we cannot assume that M(X) implies M(RepFun(X,f)) even for f ∈ M -> M. *) lemma (in M_trans) RepFun_closed: "[strong_replacement(M, λx y. y = f(x)); M(A); ∀x∈A. M(f(x))] ==> M(RepFun(A,f))" apply (simp add: RepFun_def) done
lemma Replace_conj_eq: "{y . x ∈ A, x∈A ∧ y=f(x)} = {y . x∈A, y=f(x)}" by simp
text‹Better than ‹RepFun_closed›when having the formula 🍋‹x∈A› makes relativization easier.› lemma (in M_trans) RepFun_closed2: "[strong_replacement(M, λx y. x∈A ∧ y = f(x)); M(A); ∀x∈A. M(f(x))] ==> M(RepFun(A, λx. f(x)))" apply (simp add: RepFun_def) apply (frule strong_replacement_closed, assumption) apply (auto dest: transM simp add: Replace_conj_eq univalent_def) done
subsubsection ‹Absoluteness for 🍋‹Lambda›\›
definition
is_lambda :: "[i==>o, i, [i,i]==>o, i] ==> o"where "is_lambda(M, A, is_b, z) ≡ ∀p[M]. p ∈ z ⟷ (∃u[M]. ∃v[M]. u∈A ∧ pair(M,u,v,p) ∧ is_b(u,v))"
lemma (in M_trivial) lam_closed: "[strong_replacement(M, λx y. y = ); M(A); ∀x∈A. M(b(x))] ==> M(λx∈A. b(x))" by (simp add: lam_def, blast intro: RepFun_closed dest: transM)
text‹Better than ‹lam_closed›: has the formula 🍋‹x∈A›\› lemma (in M_trivial) lam_closed2: "[strong_replacement(M, λx y. x∈A ∧ y = ⟨x, b(x)⟩); M(A); ∀m[M]. m∈A ⟶ M(b(m))]==> M(Lambda(A,b))" apply (simp add: lam_def) apply (blast intro: RepFun_closed2 dest: transM) done
text‹What about ‹Pow_abs›? Powerset is NOT absolute! This result is one direction of absoluteness.›
lemma (in M_trans) powerset_Pow: "powerset(M, x, Pow(x))" by (simp add: powerset_def)
text‹But we can't prove that the powerset in ‹M›includes the real powerset.›
lemma (in M_trans) powerset_imp_subset_Pow: "[powerset(M,x,y); M(y)]==> y ⊆ Pow(x)" apply (simp add: powerset_def) apply (blast dest: transM) done
lemma (in M_trans) powerset_abs: assumes "M(y)" shows "powerset(M,x,y) ⟷ y = {a∈Pow(x) . M(a)}" proof (intro iffI equalityI) (* First show the converse implication by double inclusion *) assume"powerset(M,x,y)" with‹M(y)› show"y ⊆ {a∈Pow(x) . M(a)}" using powerset_imp_subset_Pow transM by blast from‹powerset(M,x,y)› show"{a∈Pow(x) . M(a)} ⊆ y" using transM unfolding powerset_def by auto next(* we show the direct implication *) assume "y = {a ∈ Pow(x) . M(a)}" then show"powerset(M, x, y)" unfolding powerset_def subset_def using transM by blast qed
subsubsection‹Absoluteness for the Natural Numbers›
lemma (in M_trivial) nat_into_M [intro]: "n ∈ nat ==> M(n)" by (induct n rule: nat_induct, simp_all)
(*NOT for the simplifier. The assumption M(z') is apparently necessary, but causes the error "Failed congruence proof!" It may be better to replace is_nat_case by nat_case before attempting congruence reasoning.*) lemma is_nat_case_cong: "[a = a'; k = k'; z = z'; M(z'); ∧x y. [M(x); M(y)]==> is_b(x,y) ⟷ is_b'(x,y)] ==> is_nat_case(M, a, is_b, k, z) ⟷ is_nat_case(M, a', is_b', k', z')" by (simp add: is_nat_case_def)
subsection‹Absoluteness for Ordinals› text‹These results constitute Theorem IV 5.1 of Kunen (page 126).›
lemma (in M_trans) lt_closed: "[j]==> M(j)" by (blast dest: ltD intro: transM)
lemma (in M_trans) transitive_set_abs [simp]: "M(a) ==> transitive_set(M,a) ⟷ Transset(a)" by (simp add: transitive_set_def Transset_def)
lemma (in M_trans) ordinal_abs [simp]: "M(a) ==> ordinal(M,a) ⟷ Ord(a)" by (simp add: ordinal_def Ord_def)
lemma (in M_trivial) number1_abs [simp]: "M(a) ==> number1(M,a) ⟷ a = 1" by (simp add: number1_def)
lemma (in M_trivial) number2_abs [simp]: "M(a) ==> number2(M,a) ⟷ a = succ(1)" by (simp add: number2_def)
lemma (in M_trivial) number3_abs [simp]: "M(a) ==> number3(M,a) ⟷ a = succ(succ(1))" by (simp add: number3_def)
text‹Kunen continued to 20...›
(*Could not get this to work. The \<lambda>x\<in>nat is essential because everything but the recursion variable must stay unchanged. But then the recursion equations only hold for x∈nat (or in some other set) and not for the whole of the class M. consts natnumber_aux :: "[i==>o,i] ==> i" primrec "natnumber_aux(M,0) = (λx∈nat. if empty(M,x) then 1 else 0)" "natnumber_aux(M,succ(n)) = (λx∈nat. if (∃y[M]. natnumber_aux(M,n)`y=1 ∧ successor(M,y,x)) then 1 else 0)" definition natnumber :: "[i==>o,i,i] ==> o" "natnumber(M,n,x) ≡ natnumber_aux(M,n)`x = 1" lemma (in M_trivial) [simp]: "natnumber(M,0,x) ≡ x=0" *)
subsection‹Some instances of separation and strong replacement›
locale M_basic = M_trivial + assumes Inter_separation: "M(A) ==> separation(M, λx. ∀y[M]. y∈A ⟶ x∈y)" and Diff_separation: "M(B) ==> separation(M, λx. x ∉ B)" and cartprod_separation: "[M(A); M(B)] ==> separation(M, λz. ∃x[M]. x∈A ∧ (∃y[M]. y∈B ∧ pair(M,x,y,z)))" and image_separation: "[M(A); M(r)] ==> separation(M, λy. ∃p[M]. p∈r ∧ (∃x[M]. x∈A ∧ pair(M,x,y,p)))" and converse_separation: "M(r) ==> separation(M, λz. ∃p[M]. p∈r ∧ (∃x[M]. ∃y[M]. pair(M,x,y,p) ∧ pair(M,y,x,z)))" and restrict_separation: "M(A) ==> separation(M, λz. ∃x[M]. x∈A ∧ (∃y[M]. pair(M,x,y,z)))" and comp_separation: "[M(r); M(s)] ==> separation(M, λxz. ∃x[M]. ∃y[M]. ∃z[M]. ∃xy[M]. ∃yz[M]. pair(M,x,z,xz) ∧ pair(M,x,y,xy) ∧ pair(M,y,z,yz) ∧ xy∈s ∧ yz∈r)" and pred_separation: "[M(r); M(x)]==> separation(M, λy. ∃p[M]. p∈r ∧ pair(M,y,x,p))" and Memrel_separation: "separation(M, λz. ∃x[M]. ∃y[M]. pair(M,x,y,z) ∧ x ∈ y)" and funspace_succ_replacement: "M(n) ==> strong_replacement(M, λp z. ∃f[M]. ∃b[M]. ∃nb[M]. ∃cnbf[M]. pair(M,f,b,p) ∧ pair(M,n,b,nb) ∧ is_cons(M,nb,f,cnbf) ∧ upair(M,cnbf,cnbf,z))" and is_recfun_separation: 🍋‹for well-founded recursion: used to prove ‹is_recfun_equal›\› "[M(r); M(f); M(g); M(a); M(b)] ==> separation(M, λx. ∃xa[M]. ∃xb[M]. pair(M,x,a,xa) ∧ xa ∈ r ∧ pair(M,x,b,xb) ∧ xb ∈ r ∧ (∃fx[M]. ∃gx[M]. fun_apply(M,f,x,fx) ∧ fun_apply(M,g,x,gx) ∧ fx ≠ gx))" and power_ax: "power_ax(M)"
lemma (in M_trivial) cartprod_iff_lemma: "[M(C); ∀u[M]. u ∈ C ⟷ (∃x∈A. ∃y∈B. u = {{x}, {x,y}}); powerset(M, A ∪ B, p1); powerset(M, p1, p2); M(p2)] ==> C = {u ∈ p2 . ∃x∈A. ∃y∈B. u = {{x}, {x,y}}}" apply (simp add: powerset_def) apply (rule equalityI, clarify, simp) apply (frule transM, assumption) apply (frule transM, assumption, simp (no_asm_simp)) apply blast apply clarify apply (frule transM, assumption, force) done
lemma (in M_basic) cartprod_iff: "[M(A); M(B); M(C)] ==> cartprod(M,A,B,C) ⟷ (∃p1[M]. ∃p2[M]. powerset(M,A ∪ B,p1) ∧ powerset(M,p1,p2) ∧ C = {z ∈ p2. ∃x∈A. ∃y∈B. z = ⟨x,y⟩})" apply (simp add: Pair_def cartprod_def, safe) defer 1 apply (simp add: powerset_def) apply blast txt‹Final, difficult case: the left-to-right direction of the theorem.› apply (insert power_ax, simp add: power_ax_def) apply (frule_tac x="A ∪ B"and P="λx. rex(M,Q(x))"for Q in rspec) apply (blast, clarify) apply (drule_tac x=z and P="λx. rex(M,Q(x))"for Q in rspec) apply assumption apply (blast intro: cartprod_iff_lemma) done
text‹All the lemmas above are necessary because Powerset is not absolute. I should have used Replacement instead!› lemma (in M_basic) cartprod_closed [intro,simp]: "[M(A); M(B)]==> M(A*B)" by (frule cartprod_closed_lemma, assumption, force)
lemma (in M_basic) sum_closed [intro,simp]: "[M(A); M(B)]==> M(A+B)" by (simp add: sum_def)
lemma (in M_basic) sum_abs [simp]: "[M(A); M(B); M(Z)]==> is_sum(M,A,B,Z) ⟷ (Z = A+B)" by (simp add: is_sum_def sum_def singleton_0 nat_into_M)
lemma (in M_trivial) Inl_in_M_iff [iff]: "M(Inl(a)) ⟷ M(a)" by (simp add: Inl_def)
lemma (in M_trivial) Inl_abs [simp]: "M(Z) ==> is_Inl(M,a,Z) ⟷ (Z = Inl(a))" by (simp add: is_Inl_def Inl_def)
lemma (in M_trivial) Inr_in_M_iff [iff]: "M(Inr(a)) ⟷ M(a)" by (simp add: Inr_def)
lemma (in M_trivial) Inr_abs [simp]: "M(Z) ==> is_Inr(M,a,Z) ⟷ (Z = Inr(a))" by (simp add: is_Inr_def Inr_def)
lemma Diff_Collect_eq: "A - Collect(A,P) = Collect(A, λx. ¬ P(x))" by blast
lemma (in M_trans) Collect_rall_eq: "M(Y) ==> Collect(A, λx. ∀y[M]. y∈Y ⟶ P(x,y)) = (if Y=0 then A else (∩y ∈ Y. {x ∈ A. P(x,y)}))" by (simp,blast dest: transM)
lemma (in M_basic) separation_disj: "[separation(M,P); separation(M,Q)]==> separation(M, λz. P(z) ∨ Q(z))" by (simp del: separation_closed
add: separation_iff Collect_Un_Collect_eq [symmetric])
lemma (in M_basic) separation_neg: "separation(M,P) ==> separation(M, λz. ¬P(z))" by (simp del: separation_closed
add: separation_iff Diff_Collect_eq [symmetric])
lemma (in M_basic) separation_imp: "[separation(M,P); separation(M,Q)] ==> separation(M, λz. P(z) ⟶ Q(z))" by (simp add: separation_neg separation_disj not_disj_iff_imp [symmetric])
text‹This result is a hint of how little can be done without the Reflection Theorem. The quantifier has to be bounded by a set. We also need another instance of Separation!› lemma (in M_basic) separation_rall: "[M(Y); ∀y[M]. separation(M, λx. P(x,y)); ∀z[M]. strong_replacement(M, λx y. y = {u ∈ z . P(u,x)})] ==> separation(M, λx. ∀y[M]. y∈Y ⟶ P(x,y))" apply (simp del: separation_closed rall_abs
add: separation_iff Collect_rall_eq) apply (blast intro!: RepFun_closed dest: transM) done
subsubsection‹Functions and function space›
text‹The assumption 🍋‹M(A->B)› is unusual, but essential: in
all but trivial cases, A->B cannot be expected to belong to🍋‹M›.› lemma (in M_trivial) is_funspace_abs [simp]: "[M(A); M(B); M(F); M(A->B)]==> is_funspace(M,A,B,F) ⟷ F = A->B" apply (simp add: is_funspace_def) apply (rule iffI) prefer 2 apply blast apply (rule M_equalityI) apply simp_all done
lemma (in M_basic) succ_fun_eq2: "[M(B); M(n->B)]==> succ(n) -> B = ∪{z. p ∈ (n->B)*B, ∃f[M]. ∃b[M]. p = ⟨f,b⟩∧ z = {cons(⟨n,b⟩, f)}}" apply (simp add: succ_fun_eq) apply (blast dest: transM) done
text‹🍋‹M› contains all finite function spaces. Needed to prove the
absoluteness of transitive closure. See the definition of ‹rtrancl_alt›inin‹WF_absolute.thy›.› lemma (in M_basic) finite_funspace_closed [intro,simp]: "[n∈nat; M(B)]==> M(n->B)" apply (induct_tac n, simp) apply (simp add: funspace_succ nat_into_M) done
subsection‹Relativization and Absoluteness for Boolean Operators›
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.36Bemerkung:
(vorverarbeitet am 2026-04-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.