Theory Pairing_Axiom
sectionβΉThe Axiom of Pairing in $M[G]$βΊ
theory Pairing_Axiom
  imports
    Names
begin
context G_generic1
begin
lemma val_Upair :
  "π β G βΉ val(G,{β¨Ο,πβ©,β¨Ο,πβ©}) = {val(G,Ο),val(G,Ο)}"
  by (rule trans, subst def_val,auto)
lemma pairing_in_MG : "upair_ax(##M[G])"
proof -
  {
    fix x y
    assume "x β M[G]" "y β M[G]"
    moreover from this
    obtain Ο Ο where "val(G,Ο) = x" "val(G,Ο) = y" "Ο β M"  "Ο β M"
      using GenExtD by blast
    moreover from this
    have "β¨Ο,πβ© β M" "β¨Ο,πβ©βM"
      using pair_in_M_iff by auto
    moreover from this
    have "{β¨Ο,πβ©,β¨Ο,πβ©} β M" (is "?Ο β _")
      using upair_in_M_iff by simp
    moreover from this
    have "val(G,?Ο) β M[G]"
      using GenExtI by simp
    moreover from calculation
    have "{val(G,Ο),val(G,Ο)} β M[G]"
      using val_Upair one_in_G by simp
    ultimately
    have "{x,y} β M[G]"
      by simp
  }
  then
  show ?thesis
    unfolding upair_ax_def upair_def by auto
qed
end 
end