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 ― β€Ήlocaleβ€ΉG_generic1β€Ίβ€Ί

end