Theorem: AlgebraicGeometry.isAffineOpen_of_isAffineOpen_basicOpen_aux
File: Mathlib/AlgebraicGeometry/Morphisms/Affine.lean

Proof steps:
state_before: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
⊢ QuasiSeparatedSpace ↑↑X.toPresheafedSpace
state_after: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
⊢ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)
tactic: rw [quasiSeparatedSpace_iff_affine]
state_before: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
⊢ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)
state_after: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
⊢ IsCompact (↑↑U ∩ ↑↑V)
tactic: intros U V
state_before: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
⊢ IsCompact (↑↑U ∩ ↑↑V)
state_after: case intro.intro
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ IsCompact (↑↑U ∩ ↑↑V)
tactic: obtain ⟨s', hs', e⟩ := (Ideal.span_eq_top_iff_finite _).mp hs
state_before: case intro.intro
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ IsCompact (↑↑U ∩ ↑↑V)
state_after: case intro.intro
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ IsCompact (⋃ i, ↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
tactic: rw [← Set.inter_univ (_ ∩ _), ← Opens.coe_top, ← iSup_basicOpen_of_span_eq_top _ _ e,
    ← iSup_subtype'', Opens.coe_iSup, Set.inter_iUnion]
state_before: case intro.intro
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ IsCompact (⋃ i, ↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
state_after: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ ∀ (i : ↑↑s'), IsCompact (↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
tactic: apply isCompact_iUnion
state_before: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
⊢ ∀ (i : ↑↑s'), IsCompact (↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
state_after: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
tactic: intro i
state_before: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑U ∩ ↑↑V ∩ ↑(X.basicOpen ↑i))
state_after: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑U ∩ ↑(X.basicOpen ↑i) ∩ (↑↑V ∩ ↑(X.basicOpen ↑i)))
tactic: rw [Set.inter_inter_distrib_right]
state_before: case intro.intro.h
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑U ∩ ↑(X.basicOpen ↑i) ∩ (↑↑V ∩ ↑(X.basicOpen ↑i)))
state_after: case intro.intro.h.refine_1
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑U ∩ ↑(X.basicOpen ↑i))

case intro.intro.h.refine_2
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
s : Set ↑Γ(X, ⊤)
hs : Ideal.span s = ⊤
hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)
U V : ↑X.affineOpens
s' : Finset ↑Γ(X, ⊤)
hs' : ↑s' ⊆ s
e : Ideal.span ↑s' = ⊤
i : ↑↑s'
⊢ IsCompact (↑↑V ∩ ↑(X.basicOpen ↑i))
tactic: refine (hs₂ i (hs' i.2)).isQuasiSeparated _ _ Set.inter_subset_right
    (U.1.2.inter (X.basicOpen _).2) ?_ Set.inter_subset_right (V.1.2.inter (X.basicOpen _).2) ?_