Theorem: AlgebraicGeometry.Scheme.affineBasisCover_is_basis
File: Mathlib/AlgebraicGeometry/Cover/Open.lean

tactic: apply TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds
state_before: X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
⊢ IsTopologicalBasis {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}
state_after: case h_open
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
⊢ ∀ u ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, IsOpen u

case h_nhds
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
⊢ ∀ (a : ↑↑X.toPresheafedSpace) (u : Set ↑↑X.toPresheafedSpace),
    a ∈ u → IsOpen u → ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ u

tactic: rintro _ ⟨a, rfl⟩
state_before: case h_open
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
⊢ ∀ u ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, IsOpen u
state_after: case h_open.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : X.affineBasisCover.J
⊢ IsOpen (Set.range ⇑(X.affineBasisCover.map a).val.base)

tactic: exact IsOpenImmersion.isOpen_range (X.affineBasisCover.map a)
state_before: case h_open.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : X.affineBasisCover.J
⊢ IsOpen (Set.range ⇑(X.affineBasisCover.map a).val.base)
state_after: no goals

tactic: rintro a U haU hU
state_before: case h_nhds
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
⊢ ∀ (a : ↑↑X.toPresheafedSpace) (u : Set ↑↑X.toPresheafedSpace),
    a ∈ u → IsOpen u → ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ u
state_after: case h_nhds
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U

tactic: rcases X.affineCover.covers a with ⟨x, e⟩
state_before: case h_nhds
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U
state_after: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U

tactic: let U' := (X.affineCover.map (X.affineCover.f a)).1.base ⁻¹' U
state_before: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U
state_after: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U

tactic: have hxU' : x ∈ U' := by rw [← e] at haU; exact haU
state_before: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U
state_after: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U

tactic: rcases PrimeSpectrum.isBasis_basic_opens.exists_subset_of_mem_open hxU'
    ((X.affineCover.map (X.affineCover.f a)).1.base.continuous_toFun.isOpen_preimage _
      hU) with
  ⟨_, ⟨_, ⟨s, rfl⟩, rfl⟩, hxV, hVU⟩
state_before: case h_nhds.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U
state_after: case h_nhds.intro.intro.intro.intro.intro.intro.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U

tactic: refine ⟨_, ⟨⟨_, s⟩, rfl⟩, ?_, ?_⟩ <;> erw [affineBasisCover_map_range]
state_before: case h_nhds.intro.intro.intro.intro.intro.intro.intro
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ ∃ v ∈ {x | ∃ a, x = Set.range ⇑(X.affineBasisCover.map a).val.base}, a ∈ v ∧ v ⊆ U
state_after: case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_1
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ a ∈ ⇑(X.affineCover.map (X.affineCover.f a)).val.base '' (PrimeSpectrum.basicOpen s).carrier

case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_2
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ ⇑(X.affineCover.map (X.affineCover.f a)).val.base '' (PrimeSpectrum.basicOpen s).carrier ⊆ U

tactic: rw [← e] at haU
state_before: X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
⊢ x ∈ U'
state_after: X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
haU : (X.affineCover.map (X.affineCover.f a)).val.base x ∈ U
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
⊢ x ∈ U'

tactic: exact haU
state_before: X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
haU : (X.affineCover.map (X.affineCover.f a)).val.base x ∈ U
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
⊢ x ∈ U'
state_after: no goals

tactic: exact ⟨x, hxV, e⟩
state_before: case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_1
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ a ∈ ⇑(X.affineCover.map (X.affineCover.f a)).val.base '' (PrimeSpectrum.basicOpen s).carrier
state_after: no goals

tactic: rw [Set.image_subset_iff]
state_before: case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_2
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ ⇑(X.affineCover.map (X.affineCover.f a)).val.base '' (PrimeSpectrum.basicOpen s).carrier ⊆ U
state_after: case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_2
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ (PrimeSpectrum.basicOpen s).carrier ⊆ ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U

tactic: exact hVU
state_before: case h_nhds.intro.intro.intro.intro.intro.intro.intro.refine_2
X✝ Y Z : Scheme
𝒰 : X✝.OpenCover
f : X✝ ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f) g
X : Scheme
a : ↑↑X.toPresheafedSpace
U : Set ↑↑X.toPresheafedSpace
haU : a ∈ U
hU : IsOpen U
x : ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace
e : (X.affineCover.map (X.affineCover.f a)).val.base x = a
U' : Set ↑↑(X.affineCover.obj (X.affineCover.f a)).toPresheafedSpace :=
  ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
hxU' : x ∈ U'
s : ↑⋯.choose
hxV : x ∈ ↑(PrimeSpectrum.basicOpen s)
hVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'
⊢ (PrimeSpectrum.basicOpen s).carrier ⊆ ⇑(X.affineCover.map (X.affineCover.f a)).val.base ⁻¹' U
state_after: no goals