l3lab/ntp-mathlib huggingface dataset:
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
⊢ Ideal.radical I ∈ associatedPrimes R (R ⧸ I)

Next tactic:
haveI : Nontrivial (R ⧸ I) := by
    refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
    rw [Ne.def, Ideal.Quotient.eq, sub_zero, ← Ideal.eq_top_iff_one]
    exact hI.1
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  haveI : Nontrivial (R ⧸ I) := by
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
⊢ Nontrivial (R ⧸ I)

Next tactic:
refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  haveI : Nontrivial (R ⧸ I) := by
    refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
⊢ (Ideal.Quotient.mk I) 1 ≠ (Ideal.Quotient.mk I) 0

Next tactic:
rw [Ne.def, Ideal.Quotient.eq, sub_zero, ← Ideal.eq_top_iff_one]
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  haveI : Nontrivial (R ⧸ I) := by
    refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
    rw [Ne.def, Ideal.Quotient.eq, sub_zero, ← Ideal.eq_top_iff_one]
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
⊢ ¬I = ⊤

Next tactic:
exact hI.1
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  haveI : Nontrivial (R ⧸ I) := by
    refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
    rw [Ne.def, Ideal.Quotient.eq, sub_zero, ← Ideal.eq_top_iff_one]
    exact hI.1
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
this : Nontrivial (R ⧸ I)
⊢ Ideal.radical I ∈ associatedPrimes R (R ⧸ I)

Next tactic:
obtain ⟨a, ha⟩ := associatedPrimes.nonempty R (R ⧸ I)
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical} := by
  ext J
  rw [Set.mem_singleton_iff]
  refine' ⟨IsAssociatedPrime.eq_radical hI, _⟩
  rintro rfl
  haveI : Nontrivial (R ⧸ I) := by
    refine ⟨(Ideal.Quotient.mk I : _) 1, (Ideal.Quotient.mk I : _) 0, ?_⟩
    rw [Ne.def, Ideal.Quotient.eq, sub_zero, ← Ideal.eq_top_iff_one]
    exact hI.1
  obtain ⟨a, ha⟩ := associatedPrimes.nonempty R (R ⧸ I)
  

Proof state:
case h.intro
R : Type u_1
inst✝⁵ : CommRing R
I J : Ideal R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M' : Type u_3
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
f : M →ₗ[R] M'
inst✝ : IsNoetherianRing R
hI : Ideal.IsPrimary I
this : Nontrivial (R ⧸ I)
a : Ideal R
ha : a ∈ associatedPrimes R (R ⧸ I)
⊢ Ideal.radical I ∈ associatedPrimes R (R ⧸ I)

Next tactic:
exact ha.eq_radical hI ▸ ha
theorem rtendsto'_nhds {r : Rel β α} {l : Filter β} {a : α} :
    RTendsto' r l (𝓝 a) ↔ ∀ s, IsOpen s → a ∈ s → r.preimage s ∈ l := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
r : Rel β α
l : Filter β
a : α
⊢ RTendsto' r l (𝓝 a) ↔ ∀ (s : Set α), IsOpen s → a ∈ s → Rel.preimage r s ∈ l

Next tactic:
rw [rtendsto'_def]
theorem rtendsto'_nhds {r : Rel β α} {l : Filter β} {a : α} :
    RTendsto' r l (𝓝 a) ↔ ∀ s, IsOpen s → a ∈ s → r.preimage s ∈ l := by
  rw [rtendsto'_def]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
r : Rel β α
l : Filter β
a : α
⊢ (∀ s ∈ 𝓝 a, Rel.preimage r s ∈ l) ↔ ∀ (s : Set α), IsOpen s → a ∈ s → Rel.preimage r s ∈ l

Next tactic:
apply all_mem_nhds_filter
theorem rtendsto'_nhds {r : Rel β α} {l : Filter β} {a : α} :
    RTendsto' r l (𝓝 a) ↔ ∀ s, IsOpen s → a ∈ s → r.preimage s ∈ l := by
  rw [rtendsto'_def]
  apply all_mem_nhds_filter
  

Proof state:
case hf
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
r : Rel β α
l : Filter β
a : α
⊢ ∀ (s t : Set α), s ⊆ t → Rel.preimage r s ⊆ Rel.preimage r t

Next tactic:
apply Rel.preimage_mono
theorem open_dom_of_pcontinuous {f : α →. β} (h : PContinuous f) : IsOpen f.Dom := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
h : PContinuous f
⊢ IsOpen (PFun.Dom f)

Next tactic:
rw [← PFun.preimage_univ]
theorem open_dom_of_pcontinuous {f : α →. β} (h : PContinuous f) : IsOpen f.Dom := by
  rw [← PFun.preimage_univ]; 

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
h : PContinuous f
⊢ IsOpen (PFun.preimage f Set.univ)

Next tactic:
exact h _ isOpen_univ
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
⊢ PContinuous f ↔ ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)

Next tactic:
constructor
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · 

Proof state:
case mp
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
⊢ PContinuous f → ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)

Next tactic:
intro h x y h'
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    

Proof state:
case mp
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
h : PContinuous f
x : α
y : β
h' : y ∈ f x
⊢ PTendsto' f (𝓝 x) (𝓝 y)

Next tactic:
simp only [ptendsto'_def, mem_nhds_iff]
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    

Proof state:
case mp
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
h : PContinuous f
x : α
y : β
h' : y ∈ f x
⊢ ∀ (s : Set β), (∃ t ⊆ s, IsOpen t ∧ y ∈ t) → ∃ t ⊆ PFun.preimage f s, IsOpen t ∧ x ∈ t

Next tactic:
rintro s ⟨t, tsubs, opent, yt⟩
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    

Proof state:
case mp.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
h : PContinuous f
x : α
y : β
h' : y ∈ f x
s t : Set β
tsubs : t ⊆ s
opent : IsOpen t
yt : y ∈ t
⊢ ∃ t ⊆ PFun.preimage f s, IsOpen t ∧ x ∈ t

Next tactic:
exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  

Proof state:
case mpr
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
⊢ (∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)) → PContinuous f

Next tactic:
intro hf s os
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  

Proof state:
case mpr
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
⊢ IsOpen (PFun.preimage f s)

Next tactic:
rw [isOpen_iff_nhds]
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  

Proof state:
case mpr
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
⊢ ∀ a ∈ PFun.preimage f s, 𝓝 a ≤ 𝓟 (PFun.preimage f s)

Next tactic:
rintro x ⟨y, ys, fxy⟩ t
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  

Proof state:
case mpr.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
⊢ t ∈ 𝓟 (PFun.preimage f s) → t ∈ 𝓝 x

Next tactic:
rw [mem_principal]
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  

Proof state:
case mpr.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
⊢ PFun.preimage f s ⊆ t → t ∈ 𝓝 x

Next tactic:
intro (h : f.preimage s ⊆ t)
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  

Proof state:
case mpr.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
⊢ t ∈ 𝓝 x

Next tactic:
change t ∈ 𝓝 x
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  

Proof state:
case mpr.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
⊢ t ∈ 𝓝 x

Next tactic:
apply mem_of_superset _ h
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    exact this s hs
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
⊢ ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x

Next tactic:
intro s hs
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s✝ : Set β
os : IsOpen s✝
x : α
y : β
ys : y ∈ s✝
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s✝ ⊆ t
s : Set β
hs : s ∈ 𝓝 y
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s✝ : Set β
os : IsOpen s✝
x : α
y : β
ys : y ∈ s✝
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s✝ ⊆ t
s : Set β
hs : s ∈ 𝓝 y
this : PTendsto' f (𝓝 x) (𝓝 y)
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
rw [ptendsto'_def] at this
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s✝ : Set β
os : IsOpen s✝
x : α
y : β
ys : y ∈ s✝
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s✝ ⊆ t
s : Set β
hs : s ∈ 𝓝 y
this : ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
exact this s hs
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    exact this s hs
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
h' : ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
show f.preimage s ∈ 𝓝 x
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    exact this s hs
  show f.preimage s ∈ 𝓝 x
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
h' : ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x
⊢ PFun.preimage f s ∈ 𝓝 x

Next tactic:
apply h'
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    exact this s hs
  show f.preimage s ∈ 𝓝 x
  apply h'
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
h' : ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x
⊢ s ∈ 𝓝 y

Next tactic:
rw [mem_nhds_iff]
theorem pcontinuous_iff' {f : α →. β} :
    PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
  constructor
  · intro h x y h'
    simp only [ptendsto'_def, mem_nhds_iff]
    rintro s ⟨t, tsubs, opent, yt⟩
    exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
  intro hf s os
  rw [isOpen_iff_nhds]
  rintro x ⟨y, ys, fxy⟩ t
  rw [mem_principal]
  intro (h : f.preimage s ⊆ t)
  change t ∈ 𝓝 x
  apply mem_of_superset _ h
  have h' : ∀ s ∈ 𝓝 y, f.preimage s ∈ 𝓝 x := by
    intro s hs
    have : PTendsto' f (𝓝 x) (𝓝 y) := hf fxy
    rw [ptendsto'_def] at this
    exact this s hs
  show f.preimage s ∈ 𝓝 x
  apply h'
  rw [mem_nhds_iff]
  

Proof state:
case a
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α →. β
hf : ∀ {x : α} {y : β}, y ∈ f x → PTendsto' f (𝓝 x) (𝓝 y)
s : Set β
os : IsOpen s
x : α
y : β
ys : y ∈ s
fxy : y ∈ f x
t : Set α
h : PFun.preimage f s ⊆ t
h' : ∀ s ∈ 𝓝 y, PFun.preimage f s ∈ 𝓝 x
⊢ ∃ t ⊆ s, IsOpen t ∧ y ∈ t

Next tactic:
exact ⟨s, Set.Subset.refl _, os, ys⟩
@[simp]
theorem Theory.simpleGraph_model_iff [Language.graph.Structure V] :
    V ⊨ Theory.simpleGraph ↔
      (Irreflexive fun x y : V => RelMap adj ![x, y]) ∧
        Symmetric fun x y : V => RelMap adj ![x, y] :=
  by 

Proof state:
L : Language
α : Type w
V : Type w'
n : ℕ
inst✝ : Structure Language.graph V
⊢ V ⊨ Theory.simpleGraph ↔ (Irreflexive fun x y => RelMap adj ![x, y]) ∧ Symmetric fun x y => RelMap adj ![x, y]

Next tactic:
simp [Theory.simpleGraph]
instance simpleGraph_model (G : SimpleGraph V) :
    @Theory.Model _ V G.structure Theory.simpleGraph := by
  

Proof state:
L : Language
α : Type w
V : Type w'
n : ℕ
G : SimpleGraph V
⊢ V ⊨ Theory.simpleGraph

Next tactic:
simp only [@Theory.simpleGraph_model_iff _ G.structure, relMap_apply₂]
instance simpleGraph_model (G : SimpleGraph V) :
    @Theory.Model _ V G.structure Theory.simpleGraph := by
  simp only [@Theory.simpleGraph_model_iff _ G.structure, relMap_apply₂]
  

Proof state:
L : Language
α : Type w
V : Type w'
n : ℕ
G : SimpleGraph V
⊢ (Irreflexive fun x y => SimpleGraph.Adj G x y) ∧ Symmetric fun x y => SimpleGraph.Adj G x y

Next tactic:
exact ⟨G.loopless, G.symm⟩
@[simp]
theorem _root_.SimpleGraph.simpleGraphOfStructure (G : SimpleGraph V) :
    @simpleGraphOfStructure V G.structure _ = G := by
  

Proof state:
L : Language
α : Type w
V : Type w'
n : ℕ
G : SimpleGraph V
⊢ FirstOrder.Language.simpleGraphOfStructure V = G

Next tactic:
ext
@[simp]
theorem _root_.SimpleGraph.simpleGraphOfStructure (G : SimpleGraph V) :
    @simpleGraphOfStructure V G.structure _ = G := by
  ext
  

Proof state:
case Adj.h.h.a
L : Language
α : Type w
V : Type w'
n : ℕ
G : SimpleGraph V
x✝¹ x✝ : V
⊢ SimpleGraph.Adj (FirstOrder.Language.simpleGraphOfStructure V) x✝¹ x✝ ↔ SimpleGraph.Adj G x✝¹ x✝

Next tactic:
rfl
@[simp]
theorem structure_simpleGraphOfStructure [S : Language.graph.Structure V] [V ⊨ Theory.simpleGraph] :
    (simpleGraphOfStructure V).structure = S := by
  

Proof state:
L : Language
α : Type w
V : Type w'
n : ℕ
S : Structure Language.graph V
inst✝ : V ⊨ Theory.simpleGraph
⊢ SimpleGraph.structure (simpleGraphOfStructure V) = S

Next tactic:
ext