src/ZF/Constructible/Relative.thy
changeset 13702 c7cf8fa66534
parent 13687 22dce9134953
child 16417 9bc16273c2d4
equal deleted inserted replaced
13701:0a9228532106 13702:c7cf8fa66534
   491      "M(A) ==> (\<forall>x[M]. (x\<in>A <-> P(x))) <->
   491      "M(A) ==> (\<forall>x[M]. (x\<in>A <-> P(x))) <->
   492                (\<forall>x\<in>A. P(x)) & (\<forall>x. P(x) --> M(x) --> x\<in>A)"
   492                (\<forall>x\<in>A. P(x)) & (\<forall>x. P(x) --> M(x) --> x\<in>A)"
   493 by (blast intro: transM)
   493 by (blast intro: transM)
   494 
   494 
   495 text{*Simplifies proofs of equalities when there's an iff-equality
   495 text{*Simplifies proofs of equalities when there's an iff-equality
   496       available for rewriting, universally quantified over M. *}
   496       available for rewriting, universally quantified over M.  
       
   497       But it's not the only way to prove such equalities: its
       
   498       premises @{term "M(A)"} and  @{term "M(B)"} can be too strong.*}
   497 lemma (in M_trivial) M_equalityI:
   499 lemma (in M_trivial) M_equalityI:
   498      "[| !!x. M(x) ==> x\<in>A <-> x\<in>B; M(A); M(B) |] ==> A=B"
   500      "[| !!x. M(x) ==> x\<in>A <-> x\<in>B; M(A); M(B) |] ==> A=B"
   499 by (blast intro!: equalityI dest: transM)
   501 by (blast intro!: equalityI dest: transM)
   500 
   502 
   501 
   503 
   667 apply (simp add: univalent_Replace_iff)
   669 apply (simp add: univalent_Replace_iff)
   668 apply (blast dest: transM)
   670 apply (blast dest: transM)
   669 done
   671 done
   670 
   672 
   671 lemma (in M_trivial) Replace_abs:
   673 lemma (in M_trivial) Replace_abs:
   672      "[| M(A); M(z); univalent(M,A,P); strong_replacement(M, P);
   674      "[| M(A); M(z); univalent(M,A,P); 
   673          !!x y. [| x\<in>A; P(x,y) |] ==> M(y)  |]
   675          !!x y. [| x\<in>A; P(x,y) |] ==> M(y)  |]
   674       ==> is_Replace(M,A,P,z) <-> z = Replace(A,P)"
   676       ==> is_Replace(M,A,P,z) <-> z = Replace(A,P)"
   675 apply (simp add: is_Replace_def)
   677 apply (simp add: is_Replace_def)
   676 apply (rule iffI)
   678 apply (rule iffI)
   677 apply (rule M_equalityI)
   679  apply (rule equality_iffI)
   678 apply (simp_all add: univalent_Replace_iff, blast, blast)
   680  apply (simp_all add: univalent_Replace_iff) 
   679 done
   681  apply (blast dest: transM)+
       
   682 done
       
   683 
   680 
   684 
   681 (*The first premise can't simply be assumed as a schema.
   685 (*The first premise can't simply be assumed as a schema.
   682   It is essential to take care when asserting instances of Replacement.
   686   It is essential to take care when asserting instances of Replacement.
   683   Let K be a nonconstructible subset of nat and define
   687   Let K be a nonconstructible subset of nat and define
   684   f(x) = x if x:K and f(x)=0 otherwise.  Then RepFun(nat,f) = cons(0,K), a
   688   f(x) = x if x:K and f(x)=0 otherwise.  Then RepFun(nat,f) = cons(0,K), a
   725      M(A); \<forall>m[M]. m\<in>A --> M(b(m))|] ==> M(Lambda(A,b))"
   729      M(A); \<forall>m[M]. m\<in>A --> M(b(m))|] ==> M(Lambda(A,b))"
   726 apply (simp add: lam_def)
   730 apply (simp add: lam_def)
   727 apply (blast intro: RepFun_closed2 dest: transM)
   731 apply (blast intro: RepFun_closed2 dest: transM)
   728 done
   732 done
   729 
   733 
   730 lemma (in M_trivial) lambda_abs2 [simp]:
   734 lemma (in M_trivial) lambda_abs2:
   731      "[| strong_replacement(M, \<lambda>x y. x\<in>A & y = \<langle>x, b(x)\<rangle>);
   735      "[| Relation1(M,A,is_b,b); M(A); \<forall>m[M]. m\<in>A --> M(b(m)); M(z) |]
   732          Relation1(M,A,is_b,b); M(A); \<forall>m[M]. m\<in>A --> M(b(m)); M(z) |]
       
   733       ==> is_lambda(M,A,is_b,z) <-> z = Lambda(A,b)"
   736       ==> is_lambda(M,A,is_b,z) <-> z = Lambda(A,b)"
   734 apply (simp add: Relation1_def is_lambda_def)
   737 apply (simp add: Relation1_def is_lambda_def)
   735 apply (rule iffI)
   738 apply (rule iffI)
   736  prefer 2 apply (simp add: lam_def)
   739  prefer 2 apply (simp add: lam_def)
   737 apply (rule M_equalityI)
   740 apply (rule equality_iffI)
   738   apply (simp add: lam_def)
   741 apply (simp add: lam_def) 
   739  apply (simp add: lam_closed2)+
   742 apply (rule iffI) 
       
   743  apply (blast dest: transM) 
       
   744 apply (auto simp add: transM [of _ A]) 
   740 done
   745 done
   741 
   746 
   742 lemma is_lambda_cong [cong]:
   747 lemma is_lambda_cong [cong]:
   743      "[| A=A';  z=z';
   748      "[| A=A';  z=z';
   744          !!x y. [| x\<in>A; M(x); M(y) |] ==> is_b(x,y) <-> is_b'(x,y) |]
   749          !!x y. [| x\<in>A; M(x); M(y) |] ==> is_b(x,y) <-> is_b'(x,y) |]
  1157 apply (simp add: M_comp_iff)
  1162 apply (simp add: M_comp_iff)
  1158 apply (insert comp_separation [of r s], simp)
  1163 apply (insert comp_separation [of r s], simp)
  1159 done
  1164 done
  1160 
  1165 
  1161 lemma (in M_basic) composition_abs [simp]:
  1166 lemma (in M_basic) composition_abs [simp]:
  1162      "[| M(r); M(s); M(t) |]
  1167      "[| M(r); M(s); M(t) |] ==> composition(M,r,s,t) <-> t = r O s"
  1163       ==> composition(M,r,s,t) <-> t = r O s"
       
  1164 apply safe
  1168 apply safe
  1165  txt{*Proving @{term "composition(M, r, s, r O s)"}*}
  1169  txt{*Proving @{term "composition(M, r, s, r O s)"}*}
  1166  prefer 2
  1170  prefer 2
  1167  apply (simp add: composition_def comp_def)
  1171  apply (simp add: composition_def comp_def)
  1168  apply (blast dest: transM)
  1172  apply (blast dest: transM)