Theorem: AlgebraicGeometry.IsAffineOpen.basicOpen_union_eq_self_iff
File: Mathlib/AlgebraicGeometry/AffineScheme.lean

tactic: trans ⋃ i : s, (PrimeSpectrum.basicOpen i.1).1 = Set.univ
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⨆ f, X.basicOpen ↑f = U ↔ Ideal.span s = ⊤
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⨆ f, X.basicOpen ↑f = U ↔ ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ

X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ ↔ Ideal.span s = ⊤

tactic: trans
  hU.fromSpec.1.base ⁻¹' (⨆ f : s, X.basicOpen (f : Γ(X, U))).1 =
    hU.fromSpec.1.base ⁻¹' U.1
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⨆ f, X.basicOpen ↑f = U ↔ ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⨆ f, X.basicOpen ↑f = U ↔
    ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier

X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier ↔
    ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ

tactic: refine ⟨fun h => by rw [h], ?_⟩
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⨆ f, X.basicOpen ↑f = U ↔
    ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier →
    ⨆ f, X.basicOpen ↑f = U

tactic: intro h
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier →
    ⨆ f, X.basicOpen ↑f = U
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier
⊢ ⨆ f, X.basicOpen ↑f = U

tactic: apply_fun Set.image hU.fromSpec.1.base at h
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier
⊢ ⨆ f, X.basicOpen ↑f = U
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h :
  ⇑hU.fromSpec.val.base '' (⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier) =
    ⇑hU.fromSpec.val.base '' (⇑hU.fromSpec.val.base ⁻¹' U.carrier)
⊢ ⨆ f, X.basicOpen ↑f = U

tactic: rw [Set.image_preimage_eq_inter_range, Set.image_preimage_eq_inter_range, hU.range_fromSpec]
  at h
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h :
  ⇑hU.fromSpec.val.base '' (⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier) =
    ⇑hU.fromSpec.val.base '' (⇑hU.fromSpec.val.base ⁻¹' U.carrier)
⊢ ⨆ f, X.basicOpen ↑f = U
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : (⨆ f, X.basicOpen ↑f).carrier ∩ ↑U = U.carrier ∩ ↑U
⊢ ⨆ f, X.basicOpen ↑f = U

tactic: simp only [Set.inter_self, Opens.carrier_eq_coe, Set.inter_eq_right] at h
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : (⨆ f, X.basicOpen ↑f).carrier ∩ ↑U = U.carrier ∩ ↑U
⊢ ⨆ f, X.basicOpen ↑f = U
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ⨆ f, X.basicOpen ↑f = U

tactic: ext1
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ⨆ f, X.basicOpen ↑f = U
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ↑(⨆ f, X.basicOpen ↑f) = ↑U

tactic: refine Set.Subset.antisymm ?_ h
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ↑(⨆ f, X.basicOpen ↑f) = ↑U
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ↑(⨆ f, X.basicOpen ↑f) ⊆ ↑U

tactic: simp only [Set.iUnion_subset_iff, SetCoe.forall, Opens.coe_iSup]
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ↑(⨆ f, X.basicOpen ↑f) ⊆ ↑U
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ∀ x ∈ s, ↑(X.basicOpen x) ⊆ ↑U

tactic: intro x _
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
⊢ ∀ x ∈ s, ↑(X.basicOpen x) ⊆ ↑U
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
x : ↑Γ(X, U)
h✝ : x ∈ s
⊢ ↑(X.basicOpen x) ⊆ ↑U

tactic: exact X.basicOpen_le x
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ↑U ⊆ ↑(⨆ f, X.basicOpen ↑f)
x : ↑Γ(X, U)
h✝ : x ∈ s
⊢ ↑(X.basicOpen x) ⊆ ↑U
state_after: no goals

tactic: rw [h]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
h : ⨆ f, X.basicOpen ↑f = U
⊢ ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier
state_after: no goals

tactic: simp only [Opens.iSup_def, Subtype.coe_mk, Set.preimage_iUnion]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⇑hU.fromSpec.val.base ⁻¹' (⨆ f, X.basicOpen ↑f).carrier = ⇑hU.fromSpec.val.base ⁻¹' U.carrier ↔
    ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑i) = ⇑hU.fromSpec.val.base ⁻¹' U.carrier ↔
    ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ

tactic: congr! 1
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑i) = ⇑hU.fromSpec.val.base ⁻¹' U.carrier ↔
    ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ
state_after: case a.h.e'_2.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
⊢ ⋃ i, ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑i) = ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier

case a.h.e'_3.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
⊢ ⇑hU.fromSpec.val.base ⁻¹' U.carrier = Set.univ

tactic: ext1 x
state_before: case a.h.e'_2.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
⊢ (fun i => ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑i)) = fun i => (PrimeSpectrum.basicOpen ↑i).carrier
state_after: case a.h.e'_2.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
x : ↑s
⊢ ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑x) = (PrimeSpectrum.basicOpen ↑x).carrier

tactic: exact congr_arg Opens.carrier (hU.fromSpec_preimage_basicOpen _)
state_before: case a.h.e'_2.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
x : ↑s
⊢ ⇑hU.fromSpec.val.base ⁻¹' ↑(X.basicOpen ↑x) = (PrimeSpectrum.basicOpen ↑x).carrier
state_after: no goals

tactic: exact congr_arg Opens.carrier hU.fromSpec_preimage_self
state_before: case a.h.e'_3.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
e_1✝ : Set ↑↑(Spec Γ(X, U)).toPresheafedSpace = Set (PrimeSpectrum ↑Γ(X, U))
⊢ ⇑hU.fromSpec.val.base ⁻¹' U.carrier = Set.univ
state_after: no goals

tactic: simp only [Opens.carrier_eq_coe, PrimeSpectrum.basicOpen_eq_zeroLocus_compl]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ ↔ Ideal.span s = ⊤
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, (PrimeSpectrum.zeroLocus {↑i})ᶜ = Set.univ ↔ Ideal.span s = ⊤

tactic: rw [← Set.compl_iInter, Set.compl_univ_iff, ← PrimeSpectrum.zeroLocus_iUnion, ←
  PrimeSpectrum.zeroLocus_empty_iff_eq_top, PrimeSpectrum.zeroLocus_span]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ ⋃ i, (PrimeSpectrum.zeroLocus {↑i})ᶜ = Set.univ ↔ Ideal.span s = ⊤
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ PrimeSpectrum.zeroLocus (⋃ i, {↑i}) = ∅ ↔ PrimeSpectrum.zeroLocus s = ∅

tactic: simp only [Set.iUnion_singleton_eq_range, Subtype.range_val_subtype, Set.setOf_mem_eq]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
s : Set ↑Γ(X, U)
⊢ PrimeSpectrum.zeroLocus (⋃ i, {↑i}) = ∅ ↔ PrimeSpectrum.zeroLocus s = ∅
state_after: no goals