Theorem: PrimeSpectrum.comap_inducing_of_surjective
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: set_option tactic.skipAssignedInstances false in
simp_rw [TopologicalSpace.ext_iff, ← isClosed_compl_iff,
  ← @isClosed_compl_iff (PrimeSpectrum S)
    ((TopologicalSpace.induced (comap f) zariskiTopology)), isClosed_induced_iff,
  isClosed_iff_zeroLocus]
refine fun s =>
  ⟨fun ⟨F, hF⟩ =>
    ⟨zeroLocus (f ⁻¹' F), ⟨f ⁻¹' F, rfl⟩, by
      rw [preimage_comap_zeroLocus, Function.Surjective.image_preimage hf, hF]⟩,
    ?_⟩
rintro ⟨-, ⟨F, rfl⟩, hF⟩
exact ⟨f '' F, hF.symm.trans (preimage_comap_zeroLocus f F)⟩
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
⊢ zariskiTopology = TopologicalSpace.induced (⇑(comap f)) zariskiTopology
state_after: no goals

tactic: simp_rw [TopologicalSpace.ext_iff, ← isClosed_compl_iff,
  ← @isClosed_compl_iff (PrimeSpectrum S)
    ((TopologicalSpace.induced (comap f) zariskiTopology)), isClosed_induced_iff,
  isClosed_iff_zeroLocus]
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
⊢ zariskiTopology = TopologicalSpace.induced (⇑(comap f)) zariskiTopology
state_after: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
⊢ ∀ (s : Set (PrimeSpectrum S)), (∃ s_1, sᶜ = zeroLocus s_1) ↔ ∃ t, (∃ s, t = zeroLocus s) ∧ ⇑(comap f) ⁻¹' t = sᶜ

tactic: refine fun s =>
  ⟨fun ⟨F, hF⟩ =>
    ⟨zeroLocus (f ⁻¹' F), ⟨f ⁻¹' F, rfl⟩, by
      rw [preimage_comap_zeroLocus, Function.Surjective.image_preimage hf, hF]⟩,
    ?_⟩
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
⊢ ∀ (s : Set (PrimeSpectrum S)), (∃ s_1, sᶜ = zeroLocus s_1) ↔ ∃ t, (∃ s, t = zeroLocus s) ∧ ⇑(comap f) ⁻¹' t = sᶜ
state_after: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
s : Set (PrimeSpectrum S)
⊢ (∃ t, (∃ s, t = zeroLocus s) ∧ ⇑(comap f) ⁻¹' t = sᶜ) → ∃ s_1, sᶜ = zeroLocus s_1

tactic: rintro ⟨-, ⟨F, rfl⟩, hF⟩
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
s : Set (PrimeSpectrum S)
⊢ (∃ t, (∃ s, t = zeroLocus s) ∧ ⇑(comap f) ⁻¹' t = sᶜ) → ∃ s_1, sᶜ = zeroLocus s_1
state_after: case intro.intro.intro
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
s : Set (PrimeSpectrum S)
F : Set R
hF : ⇑(comap f) ⁻¹' zeroLocus F = sᶜ
⊢ ∃ s_1, sᶜ = zeroLocus s_1

tactic: exact ⟨f '' F, hF.symm.trans (preimage_comap_zeroLocus f F)⟩
state_before: case intro.intro.intro
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
s : Set (PrimeSpectrum S)
F : Set R
hF : ⇑(comap f) ⁻¹' zeroLocus F = sᶜ
⊢ ∃ s_1, sᶜ = zeroLocus s_1
state_after: no goals

tactic: rw [preimage_comap_zeroLocus, Function.Surjective.image_preimage hf, hF]
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
S' : Type u_1
inst✝ : CommSemiring S'
f : R →+* S
hf : Surjective ⇑f
s : Set (PrimeSpectrum S)
x✝ : ∃ s_1, sᶜ = zeroLocus s_1
F : Set S
hF : sᶜ = zeroLocus F
⊢ ⇑(comap f) ⁻¹' zeroLocus (⇑f ⁻¹' F) = sᶜ
state_after: no goals