math / data /lean /OAI /Computability /DegreeRigidity /Syntax /FormulaIsomorphism.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.66 kB
import OAI.Computability.DegreeRigidity.Syntax.SigmaSyntax
namespace OAI
namespace TuringRigidity.BoundedSetTheory
universe u
theorem map_cons (j : ZFSet.{u} β†’ ZFSet.{u}) (x : ZFSet.{u}) (e : β„• β†’ ZFSet.{u}) :
(fun i => j (cons x e i)) = cons (j x) (fun i => j (e i)) := by
funext i; cases i <;> rfl
theorem Formula.realize_isomorphism (A B : ZFSet.{u}) (j : ZFSet.{u} β†’ ZFSet.{u})
(hin : βˆ€ x ∈ A, j x ∈ B)
(hout : βˆ€ y ∈ B, βˆƒ x ∈ A, j x = y)
(hi : βˆ€ x ∈ A, βˆ€ y ∈ A, j x = j y β†’ x = y)
(hm : βˆ€ x ∈ A, βˆ€ y ∈ A, j x ∈ j y ↔ x ∈ y)
(Ο† : Formula) (e : β„• β†’ ZFSet.{u}) (he : βˆ€ i, e i ∈ A) :
Ο†.Realize A e ↔ Ο†.Realize B (fun i => j (e i)) := by
induction Ο† generalizing e with
| equal i k =>
exact ⟨congrArg j,hi _ (he i) _ (he k)⟩
| member i k => exact (hm _ (he i) _ (he k)).symm
| conj Ο† ψ ihΟ† ihψ => exact and_congr (ihΟ† e he) (ihψ e he)
| neg Ο† ih => exact not_congr (ih e he)
| existsMem i Ο† ih =>
have he' (x : ZFSet.{u}) (hx : x ∈ A) : βˆ€ n, cons x e n ∈ A := by
intro n; cases n with
| zero => exact hx
| succ n => exact he n
constructor
Β· rintro ⟨x,hx,hxi,hΟ†βŸ©
refine ⟨j x,hin x hx,(hm x hx (e i) (he i)).mpr hxi,?_⟩
have h := (ih (cons x e) (he' x hx)).mp hφ
rwa [map_cons] at h
Β· rintro ⟨y,hy,hyi,hΟ†βŸ©
obtain ⟨x,hx,rfl⟩ := hout y hy
refine ⟨x,hx,(hm x hx (e i) (he i)).mp hyi,?_⟩
apply (ih (cons x e) (he' x hx)).mpr
rwa [map_cons]
theorem SigmaFormula.realize_isomorphism (A B : ZFSet.{u}) (j : ZFSet.{u} β†’ ZFSet.{u})
(hin : βˆ€ x ∈ A, j x ∈ B)
(hout : βˆ€ y ∈ B, βˆƒ x ∈ A, j x = y)
(hi : βˆ€ x ∈ A, βˆ€ y ∈ A, j x = j y β†’ x = y)
(hm : βˆ€ x ∈ A, βˆ€ y ∈ A, j x ∈ j y ↔ x ∈ y)
(Ο† : SigmaFormula) (e : β„• β†’ ZFSet.{u}) (he : βˆ€ i, e i ∈ A) :
Ο†.Realize A e ↔ Ο†.Realize B (fun i => j (e i)) := by
induction Ο† generalizing e with
| bounded Ο† => exact Ο†.realize_isomorphism A B j hin hout hi hm e he
| existsSet Ο† ih =>
have he' (x : ZFSet.{u}) (hx : x ∈ A) : βˆ€ n, cons x e n ∈ A := by
intro n; cases n with
| zero => exact hx
| succ n => exact he n
constructor
Β· rintro ⟨x,hx,hΟ†βŸ©
refine ⟨j x,hin x hx,?_⟩
have h := (ih (cons x e) (he' x hx)).mp hφ
rwa [map_cons] at h
Β· rintro ⟨y,hy,hΟ†βŸ©
obtain ⟨x,hx,rfl⟩ := hout y hy
apply Exists.intro x
refine ⟨hx,?_⟩
apply (ih (cons x e) (he' x hx)).mpr
rwa [map_cons]
end TuringRigidity.BoundedSetTheory
end OAI