diff -r 0c18df79b1c8 -r a642599ffdea src/ZF/Constructible/Relative.thy --- a/src/ZF/Constructible/Relative.thy Tue Sep 27 17:03:23 2022 +0100 +++ b/src/ZF/Constructible/Relative.thy Tue Sep 27 17:46:52 2022 +0100 @@ -11,120 +11,120 @@ subsection\Relativized versions of standard set-theoretic concepts\ definition - empty :: "[i=>o,i] => o" where + empty :: "[i\o,i] \ o" where "empty(M,z) \ \x[M]. x \ z" definition - subset :: "[i=>o,i,i] => o" where + subset :: "[i\o,i,i] \ o" where "subset(M,A,B) \ \x[M]. x\A \ x \ B" definition - upair :: "[i=>o,i,i,i] => o" where + upair :: "[i\o,i,i,i] \ o" where "upair(M,a,b,z) \ a \ z \ b \ z \ (\x[M]. x\z \ x = a \ x = b)" definition - pair :: "[i=>o,i,i,i] => o" where + pair :: "[i\o,i,i,i] \ o" where "pair(M,a,b,z) \ \x[M]. upair(M,a,a,x) \ (\y[M]. upair(M,a,b,y) \ upair(M,x,y,z))" definition - union :: "[i=>o,i,i,i] => o" where + union :: "[i\o,i,i,i] \ o" where "union(M,a,b,z) \ \x[M]. x \ z \ x \ a \ x \ b" definition - is_cons :: "[i=>o,i,i,i] => o" where + is_cons :: "[i\o,i,i,i] \ o" where "is_cons(M,a,b,z) \ \x[M]. upair(M,a,a,x) \ union(M,x,b,z)" definition - successor :: "[i=>o,i,i] => o" where + successor :: "[i\o,i,i] \ o" where "successor(M,a,z) \ is_cons(M,a,a,z)" definition - number1 :: "[i=>o,i] => o" where + number1 :: "[i\o,i] \ o" where "number1(M,a) \ \x[M]. empty(M,x) \ successor(M,x,a)" definition - number2 :: "[i=>o,i] => o" where + number2 :: "[i\o,i] \ o" where "number2(M,a) \ \x[M]. number1(M,x) \ successor(M,x,a)" definition - number3 :: "[i=>o,i] => o" where + number3 :: "[i\o,i] \ o" where "number3(M,a) \ \x[M]. number2(M,x) \ successor(M,x,a)" definition - powerset :: "[i=>o,i,i] => o" where + powerset :: "[i\o,i,i] \ o" where "powerset(M,A,z) \ \x[M]. x \ z \ subset(M,x,A)" definition - is_Collect :: "[i=>o,i,i=>o,i] => o" where + is_Collect :: "[i\o,i,i\o,i] \ o" where "is_Collect(M,A,P,z) \ \x[M]. x \ z \ x \ A \ P(x)" definition - is_Replace :: "[i=>o,i,[i,i]=>o,i] => o" where + is_Replace :: "[i\o,i,[i,i]\o,i] \ o" where "is_Replace(M,A,P,z) \ \u[M]. u \ z \ (\x[M]. x\A \ P(x,u))" definition - inter :: "[i=>o,i,i,i] => o" where + inter :: "[i\o,i,i,i] \ o" where "inter(M,a,b,z) \ \x[M]. x \ z \ x \ a \ x \ b" definition - setdiff :: "[i=>o,i,i,i] => o" where + setdiff :: "[i\o,i,i,i] \ o" where "setdiff(M,a,b,z) \ \x[M]. x \ z \ x \ a \ x \ b" definition - big_union :: "[i=>o,i,i] => o" where + big_union :: "[i\o,i,i] \ o" where "big_union(M,A,z) \ \x[M]. x \ z \ (\y[M]. y\A \ x \ y)" definition - big_inter :: "[i=>o,i,i] => o" where + big_inter :: "[i\o,i,i] \ o" where "big_inter(M,A,z) \ (A=0 \ z=0) \ (A\0 \ (\x[M]. x \ z \ (\y[M]. y\A \ x \ y)))" definition - cartprod :: "[i=>o,i,i,i] => o" where + cartprod :: "[i\o,i,i,i] \ o" where "cartprod(M,A,B,z) \ \u[M]. u \ z \ (\x[M]. x\A \ (\y[M]. y\B \ pair(M,x,y,u)))" definition - is_sum :: "[i=>o,i,i,i] => o" where + is_sum :: "[i\o,i,i,i] \ o" where "is_sum(M,A,B,Z) \ \A0[M]. \n1[M]. \s1[M]. \B1[M]. number1(M,n1) \ cartprod(M,n1,A,A0) \ upair(M,n1,n1,s1) \ cartprod(M,s1,B,B1) \ union(M,A0,B1,Z)" definition - is_Inl :: "[i=>o,i,i] => o" where + is_Inl :: "[i\o,i,i] \ o" where "is_Inl(M,a,z) \ \zero[M]. empty(M,zero) \ pair(M,zero,a,z)" definition - is_Inr :: "[i=>o,i,i] => o" where + is_Inr :: "[i\o,i,i] \ o" where "is_Inr(M,a,z) \ \n1[M]. number1(M,n1) \ pair(M,n1,a,z)" definition - is_converse :: "[i=>o,i,i] => o" where + is_converse :: "[i\o,i,i] \ o" where "is_converse(M,r,z) \ \x[M]. x \ z \ (\w[M]. w\r \ (\u[M]. \v[M]. pair(M,u,v,w) \ pair(M,v,u,x)))" definition - pre_image :: "[i=>o,i,i,i] => o" where + 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 :: "[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 :: "[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 + is_range :: "[i\o,i,i] \ o" where \ \the cleaner \<^term>\\r'[M]. is_converse(M,r,r') \ is_domain(M,r',z)\ unfortunately needs an instance of separation in order to prove @@ -133,41 +133,41 @@ \y[M]. y \ z \ (\w[M]. w\r \ (\x[M]. pair(M,x,y,w)))" definition - is_field :: "[i=>o,i,i] => o" where + is_field :: "[i\o,i,i] \ o" where "is_field(M,r,z) \ \dr[M]. \rr[M]. is_domain(M,r,dr) \ is_range(M,r,rr) \ union(M,dr,rr,z)" definition - is_relation :: "[i=>o,i] => o" where + is_relation :: "[i\o,i] \ o" where "is_relation(M,r) \ (\z[M]. z\r \ (\x[M]. \y[M]. pair(M,x,y,z)))" definition - is_function :: "[i=>o,i] => o" where + is_function :: "[i\o,i] \ o" where "is_function(M,r) \ \x[M]. \y[M]. \y'[M]. \p[M]. \p'[M]. pair(M,x,y,p) \ pair(M,x,y',p') \ p\r \ p'\r \ y=y'" definition - fun_apply :: "[i=>o,i,i,i] => o" where + fun_apply :: "[i\o,i,i,i] \ o" where "fun_apply(M,f,x,y) \ (\xs[M]. \fxs[M]. upair(M,x,x,xs) \ image(M,f,xs,fxs) \ big_union(M,fxs,y))" definition - typed_function :: "[i=>o,i,i,i] => o" where + typed_function :: "[i\o,i,i,i] \ o" where "typed_function(M,A,B,r) \ is_function(M,r) \ is_relation(M,r) \ is_domain(M,r,A) \ (\u[M]. u\r \ (\x[M]. \y[M]. pair(M,x,y,u) \ y\B))" definition - is_funspace :: "[i=>o,i,i,i] => o" where + is_funspace :: "[i\o,i,i,i] \ o" where "is_funspace(M,A,B,F) \ \f[M]. f \ F \ typed_function(M,A,B,f)" definition - composition :: "[i=>o,i,i,i] => o" where + composition :: "[i\o,i,i,i] \ o" where "composition(M,r,s,t) \ \p[M]. p \ t \ (\x[M]. \y[M]. \z[M]. \xy[M]. \yz[M]. @@ -175,104 +175,104 @@ xy \ s \ yz \ r)" definition - injection :: "[i=>o,i,i,i] => o" where + injection :: "[i\o,i,i,i] \ o" where "injection(M,A,B,f) \ typed_function(M,A,B,f) \ (\x[M]. \x'[M]. \y[M]. \p[M]. \p'[M]. pair(M,x,y,p) \ pair(M,x',y,p') \ p\f \ p'\f \ x=x')" definition - surjection :: "[i=>o,i,i,i] => o" where + surjection :: "[i\o,i,i,i] \ o" where "surjection(M,A,B,f) \ typed_function(M,A,B,f) \ (\y[M]. y\B \ (\x[M]. x\A \ fun_apply(M,f,x,y)))" definition - bijection :: "[i=>o,i,i,i] => o" where + bijection :: "[i\o,i,i,i] \ o" where "bijection(M,A,B,f) \ injection(M,A,B,f) \ surjection(M,A,B,f)" definition - restriction :: "[i=>o,i,i,i] => o" where + restriction :: "[i\o,i,i,i] \ o" where "restriction(M,r,A,z) \ \x[M]. x \ z \ (x \ r \ (\u[M]. u\A \ (\v[M]. pair(M,u,v,x))))" definition - transitive_set :: "[i=>o,i] => o" where + transitive_set :: "[i\o,i] \ o" where "transitive_set(M,a) \ \x[M]. x\a \ subset(M,x,a)" definition - ordinal :: "[i=>o,i] => o" where + ordinal :: "[i\o,i] \ o" where \ \an ordinal is a transitive set of transitive sets\ "ordinal(M,a) \ transitive_set(M,a) \ (\x[M]. x\a \ transitive_set(M,x))" definition - limit_ordinal :: "[i=>o,i] => o" where + limit_ordinal :: "[i\o,i] \ o" where \ \a limit ordinal is a non-empty, successor-closed ordinal\ "limit_ordinal(M,a) \ ordinal(M,a) \ \ empty(M,a) \ (\x[M]. x\a \ (\y[M]. y\a \ successor(M,x,y)))" definition - successor_ordinal :: "[i=>o,i] => o" where + 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 + 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 :: "[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))" definition - is_quasinat :: "[i=>o,i] => o" where + is_quasinat :: "[i\o,i] \ o" where "is_quasinat(M,z) \ empty(M,z) \ (\m[M]. successor(M,m,z))" definition - is_nat_case :: "[i=>o, i, [i,i]=>o, i, i] => o" where + is_nat_case :: "[i\o, i, [i,i]\o, i, i] \ o" where "is_nat_case(M, a, is_b, k, z) \ (empty(M,k) \ z=a) \ (\m[M]. successor(M,m,k) \ is_b(m,z)) \ (is_quasinat(M,k) \ empty(M,z))" definition - relation1 :: "[i=>o, [i,i]=>o, i=>i] => o" where + relation1 :: "[i\o, [i,i]\o, i\i] \ o" where "relation1(M,is_f,f) \ \x[M]. \y[M]. is_f(x,y) \ y = f(x)" definition - Relation1 :: "[i=>o, i, [i,i]=>o, i=>i] => o" where + Relation1 :: "[i\o, i, [i,i]\o, i\i] \ o" where \ \as above, but typed\ "Relation1(M,A,is_f,f) \ \x[M]. \y[M]. x\A \ is_f(x,y) \ y = f(x)" definition - relation2 :: "[i=>o, [i,i,i]=>o, [i,i]=>i] => o" where + relation2 :: "[i\o, [i,i,i]\o, [i,i]\i] \ o" where "relation2(M,is_f,f) \ \x[M]. \y[M]. \z[M]. is_f(x,y,z) \ z = f(x,y)" definition - Relation2 :: "[i=>o, i, i, [i,i,i]=>o, [i,i]=>i] => o" where + Relation2 :: "[i\o, i, i, [i,i,i]\o, [i,i]\i] \ o" where "Relation2(M,A,B,is_f,f) \ \x[M]. \y[M]. \z[M]. x\A \ y\B \ is_f(x,y,z) \ z = f(x,y)" definition - relation3 :: "[i=>o, [i,i,i,i]=>o, [i,i,i]=>i] => o" where + relation3 :: "[i\o, [i,i,i,i]\o, [i,i,i]\i] \ o" where "relation3(M,is_f,f) \ \x[M]. \y[M]. \z[M]. \u[M]. is_f(x,y,z,u) \ u = f(x,y,z)" definition - Relation3 :: "[i=>o, i, i, i, [i,i,i,i]=>o, [i,i,i]=>i] => o" where + Relation3 :: "[i\o, i, i, i, [i,i,i,i]\o, [i,i,i]\i] \ o" where "Relation3(M,A,B,C,is_f,f) \ \x[M]. \y[M]. \z[M]. \u[M]. x\A \ y\B \ z\C \ is_f(x,y,z,u) \ u = f(x,y,z)" definition - relation4 :: "[i=>o, [i,i,i,i,i]=>o, [i,i,i,i]=>i] => o" where + relation4 :: "[i\o, [i,i,i,i,i]\o, [i,i,i,i]\i] \ o" where "relation4(M,is_f,f) \ \u[M]. \x[M]. \y[M]. \z[M]. \a[M]. is_f(u,x,y,z,a) \ a = f(u,x,y,z)" @@ -290,12 +290,12 @@ subsection \The relativized ZF axioms\ definition - extensionality :: "(i=>o) => o" where + 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 + 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 @@ -304,36 +304,36 @@ \z[M]. \y[M]. \x[M]. x \ y \ x \ z \ P(x)" definition - upair_ax :: "(i=>o) => o" where + upair_ax :: "(i\o) \ o" where "upair_ax(M) \ \x[M]. \y[M]. \z[M]. upair(M,x,y,z)" definition - Union_ax :: "(i=>o) => o" where + Union_ax :: "(i\o) \ o" where "Union_ax(M) \ \x[M]. \z[M]. big_union(M,x,z)" definition - power_ax :: "(i=>o) => o" where + power_ax :: "(i\o) \ o" where "power_ax(M) \ \x[M]. \z[M]. powerset(M,x,z)" definition - univalent :: "[i=>o, i, [i,i]=>o] => o" where + univalent :: "[i\o, i, [i,i]\o] \ o" where "univalent(M,A,P) \ \x[M]. x\A \ (\y[M]. \z[M]. P(x,y) \ P(x,z) \ y=z)" definition - replacement :: "[i=>o, [i,i]=>o] => o" where + replacement :: "[i\o, [i,i]\o] \ o" where "replacement(M,P) \ \A[M]. univalent(M,A,P) \ (\Y[M]. \b[M]. (\x[M]. x\A \ P(x,b)) \ b \ Y)" definition - strong_replacement :: "[i=>o, [i,i]=>o] => o" where + strong_replacement :: "[i\o, [i,i]\o] \ o" where "strong_replacement(M,P) \ \A[M]. univalent(M,A,P) \ (\Y[M]. \b[M]. b \ Y \ (\x[M]. x\A \ P(x,b)))" definition - foundation_ax :: "(i=>o) => o" where + foundation_ax :: "(i\o) \ o" where "foundation_ax(M) \ \x[M]. (\y[M]. y\x) \ (\y[M]. y\x \ \(\z[M]. z\x \ z \ y))" @@ -360,12 +360,12 @@ text\Congruence rule for separation: can assume the variable is in \M\\ lemma separation_cong [cong]: "(\x. M(x) \ P(x) \ P'(x)) - \ separation(M, %x. P(x)) \ separation(M, %x. P'(x))" + \ separation(M, \x. P(x)) \ separation(M, \x. P'(x))" by (simp add: separation_def) lemma univalent_cong [cong]: "\A=A'; \x y. \x\A; M(x); M(y)\ \ P(x,y) \ P'(x,y)\ - \ univalent(M, A, %x y. P(x,y)) \ univalent(M, A', %x y. P'(x,y))" + \ univalent(M, A, \x y. P(x,y)) \ univalent(M, A', \x y. P'(x,y))" by (simp add: univalent_def) lemma univalent_triv [intro,simp]: @@ -379,8 +379,8 @@ text\Congruence rule for replacement\ lemma strong_replacement_cong [cong]: "\\x y. \M(x); M(y)\ \ P(x,y) \ P'(x,y)\ - \ strong_replacement(M, %x y. P(x,y)) \ - strong_replacement(M, %x y. P'(x,y))" + \ strong_replacement(M, \x y. P(x,y)) \ + strong_replacement(M, \x y. P'(x,y))" by (simp add: strong_replacement_def) text\The extensionality axiom\ @@ -459,13 +459,13 @@ subsection\Lemmas Needed to Reduce Some Set Constructions to Instances of Separation\ -lemma image_iff_Collect: "r `` A = {y \ \(\(r)). \p\r. \x\A. p=}" +lemma image_iff_Collect: "r `` A = {y \ \(\(r)). \p\r. \x\A. p=\x,y\}" apply (rule equalityI, auto) apply (simp add: Pair_def, blast) done lemma vimage_iff_Collect: - "r -`` A = {x \ \(\(r)). \p\r. \y\A. p=}" + "r -`` A = {x \ \(\(r)). \p\r. \y\A. p=\x,y\}" apply (rule equalityI, auto) apply (simp add: Pair_def, blast) done @@ -503,7 +503,7 @@ text\More constants, for order types\ definition - order_isomorphism :: "[i=>o,i,i,i,i,i] => o" where + order_isomorphism :: "[i\o,i,i,i,i,i] \ o" where "order_isomorphism(M,A,r,B,s,f) \ bijection(M,A,B,f) \ (\x[M]. x\A \ (\y[M]. y\A \ @@ -512,12 +512,12 @@ pair(M,fx,fy,q) \ (p\r \ q\s))))" definition - pred_set :: "[i=>o,i,i,i,i] => o" where + pred_set :: "[i\o,i,i,i,i] \ o" where "pred_set(M,A,x,r,B) \ \y[M]. y \ B \ (\p[M]. p\r \ y \ A \ pair(M,y,x,p))" definition - membership :: "[i=>o,i,i] => o" where \ \membership relation\ + membership :: "[i\o,i,i] \ o" where \ \membership relation\ "membership(M,A,r) \ \p[M]. p \ r \ (\x[M]. x\A \ (\y[M]. y\A \ x\y \ pair(M,x,y,p)))" @@ -628,25 +628,25 @@ by blast lemma (in M_trans) pair_abs [simp]: - "M(z) \ pair(M,a,b,z) \ z=" + "M(z) \ pair(M,a,b,z) \ z=\a,b\" apply (simp add: pair_def Pair_def) apply (blast intro: transM) done lemma (in M_trans) pair_in_MD [dest!]: - "M() \ M(a) \ M(b)" + "M(\a,b\) \ M(a) \ M(b)" by (simp add: Pair_def, blast intro: transM) lemma (in M_trivial) pair_in_MI [intro!]: - "M(a) \ M(b) \ M()" + "M(a) \ M(b) \ M(\a,b\)" by (simp add: Pair_def) lemma (in M_trivial) pair_in_M_iff [simp]: - "M() \ M(a) \ M(b)" + "M(\a,b\) \ M(a) \ M(b)" by blast lemma (in M_trans) pair_components_in_M: - "\ \ A; M(A)\ \ M(x) \ M(y)" + "\\x,y\ \ A; M(A)\ \ M(x) \ M(y)" by (blast dest: transM) lemma (in M_trivial) cartprod_abs [simp]: @@ -739,8 +739,8 @@ "\A=A'; \x y. \M(x); M(y)\ \ P(x,y) \ P'(x,y); z=z'\ - \ is_Replace(M, A, %x y. P(x,y), z) \ - is_Replace(M, A', %x y. P'(x,y), z')" + \ is_Replace(M, A, \x y. P(x,y), z) \ + is_Replace(M, A', \x y. P'(x,y), z')" by (simp add: is_Replace_def) lemma (in M_trans) univalent_Replace_iff: @@ -795,7 +795,7 @@ 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)))" + \ 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) @@ -804,7 +804,7 @@ subsubsection \Absoluteness for \<^term>\Lambda\\ definition - is_lambda :: "[i=>o, i, [i,i]=>o, i] => o" where + 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))" @@ -838,8 +838,8 @@ lemma is_lambda_cong [cong]: "\A=A'; z=z'; \x y. \x\A; M(x); M(y)\ \ is_b(x,y) \ is_b'(x,y)\ - \ is_lambda(M, A, %x y. is_b(x,y), z) \ - is_lambda(M, A', %x y. is_b'(x,y), z')" + \ is_lambda(M, A, \x y. is_b(x,y), z) \ + is_lambda(M, A', \x y. is_b'(x,y), z')" by (simp add: is_lambda_def) lemma (in M_trans) image_abs [simp]: @@ -1001,7 +1001,7 @@ 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" + natnumber_aux :: "[i\o,i] \ i" primrec "natnumber_aux(M,0) = (\x\nat. if empty(M,x) then 1 else 0)" @@ -1010,7 +1010,7 @@ then 1 else 0)" definition - natnumber :: "[i=>o,i,i] => o" + natnumber :: "[i\o,i,i] \ o" "natnumber(M,n,x) \ natnumber_aux(M,n)`x = 1" lemma (in M_trivial) [simp]: @@ -1076,7 +1076,7 @@ "\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 = })" + 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) @@ -1348,15 +1348,15 @@ (*???equalities*) lemma Collect_Un_Collect_eq: - "Collect(A,P) \ Collect(A,Q) = Collect(A, %x. P(x) \ Q(x))" + "Collect(A,P) \ Collect(A,Q) = Collect(A, \x. P(x) \ Q(x))" by blast lemma Diff_Collect_eq: - "A - Collect(A,P) = Collect(A, %x. \ P(x))" + "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)) = + "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) @@ -1405,7 +1405,7 @@ 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 = \ z = {cons(, f)}}" + \{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 @@ -1429,21 +1429,21 @@ subsection\Relativization and Absoluteness for Boolean Operators\ definition - is_bool_of_o :: "[i=>o, o, i] => o" where + is_bool_of_o :: "[i\o, o, i] \ o" where "is_bool_of_o(M,P,z) \ (P \ number1(M,z)) \ (\P \ empty(M,z))" definition - is_not :: "[i=>o, i, i] => o" where + is_not :: "[i\o, i, i] \ o" where "is_not(M,a,z) \ (number1(M,a) \ empty(M,z)) | (\number1(M,a) \ number1(M,z))" definition - is_and :: "[i=>o, i, i, i] => o" where + is_and :: "[i\o, i, i, i] \ o" where "is_and(M,a,b,z) \ (number1(M,a) \ z=b) | (\number1(M,a) \ empty(M,z))" definition - is_or :: "[i=>o, i, i, i] => o" where + is_or :: "[i\o, i, i, i] \ o" where "is_or(M,a,b,z) \ (number1(M,a) \ number1(M,z)) | (\number1(M,a) \ z=b)" @@ -1485,12 +1485,12 @@ subsection\Relativization and Absoluteness for List Operators\ definition - is_Nil :: "[i=>o, i] => o" where + is_Nil :: "[i\o, i] \ o" where \ \because \<^prop>\[] \ Inl(0)\\ "is_Nil(M,xs) \ \zero[M]. empty(M,zero) \ is_Inl(M,zero,xs)" definition - is_Cons :: "[i=>o,i,i,i] => o" where + is_Cons :: "[i\o,i,i,i] \ o" where \ \because \<^prop>\Cons(a, l) \ Inr(\a,l\)\\ "is_Cons(M,a,l,Z) \ \p[M]. pair(M,a,l,p) \ is_Inr(M,p,Z)" @@ -1510,21 +1510,21 @@ definition - quasilist :: "i => o" where + quasilist :: "i \ o" where "quasilist(xs) \ xs=Nil \ (\x l. xs = Cons(x,l))" definition - is_quasilist :: "[i=>o,i] => o" where + is_quasilist :: "[i\o,i] \ o" where "is_quasilist(M,z) \ is_Nil(M,z) \ (\x[M]. \l[M]. is_Cons(M,x,l,z))" definition - list_case' :: "[i, [i,i]=>i, i] => i" where + list_case' :: "[i, [i,i]\i, i] \ i" where \ \A version of \<^term>\list_case\ that's always defined.\ "list_case'(a,b,xs) \ if quasilist(xs) then list_case(a,b,xs) else 0" definition - is_list_case :: "[i=>o, i, [i,i,i]=>o, i, i] => o" where + is_list_case :: "[i\o, i, [i,i,i]\o, i, i] \ o" where \ \Returns 0 for non-lists\ "is_list_case(M, a, is_b, xs, z) \ (is_Nil(M,xs) \ z=a) \ @@ -1532,17 +1532,17 @@ (is_quasilist(M,xs) \ empty(M,z))" definition - hd' :: "i => i" where + hd' :: "i \ i" where \ \A version of \<^term>\hd\ that's always defined.\ "hd'(xs) \ if quasilist(xs) then hd(xs) else 0" definition - tl' :: "i => i" where + tl' :: "i \ i" where \ \A version of \<^term>\tl\ that's always defined.\ "tl'(xs) \ if quasilist(xs) then tl(xs) else 0" definition - is_hd :: "[i=>o,i,i] => o" where + is_hd :: "[i\o,i,i] \ o" where \ \\<^term>\hd([]) = 0\ no constraints if not a list. Avoiding implication prevents the simplifier's looping.\ "is_hd(M,xs,H) \ @@ -1551,7 +1551,7 @@ (is_quasilist(M,xs) \ empty(M,H))" definition - is_tl :: "[i=>o,i,i] => o" where + is_tl :: "[i\o,i,i] \ o" where \ \\<^term>\tl([]) = []\; see comments about \<^term>\is_hd\\ "is_tl(M,xs,T) \ (is_Nil(M,xs) \ T=xs) \