awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ValuativeCriterion (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
h :
  ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₁ :
  ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₂ h₃ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f →
        QuasiCompact f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Existence f ∧
              ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₄ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
h₅ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₆ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiCompact f
h₇ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiSeparated f
h₈ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → LocallyOfFiniteType f
h₉ h₁₀ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f →
        QuasiSeparated f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Uniqueness f ∧
              QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
⊢ ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f ↔
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
have h₁₁ : ValuativeCriterion.Existence f →
  ValuativeCriterion.Uniqueness f →
    QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
Tactic: tauto
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ValuativeCriterion (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
h :
  ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₁ :
  ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₂ h₃ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f →
        QuasiCompact f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Existence f ∧
              ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₄ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
h₅ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₆ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiCompact f
h₇ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiSeparated f
h₈ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → LocallyOfFiniteType f
h₉ h₁₀ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f →
        QuasiSeparated f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Uniqueness f ∧
              QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₁₁ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
⊢ ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f ↔
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
have h₁₂ : ValuativeCriterion.Existence f →
  ValuativeCriterion.Uniqueness f → QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → QuasiSeparated f
Tactic: tauto
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ValuativeCriterion (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
h :
  ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₁ :
  ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₂ h₃ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f →
        QuasiCompact f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Existence f ∧
              ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₄ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
h₅ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₆ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiCompact f
h₇ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiSeparated f
h₈ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → LocallyOfFiniteType f
h₉ h₁₀ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f →
        QuasiSeparated f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Uniqueness f ∧
              QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₁₁ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₁₂ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f → QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → QuasiSeparated f
⊢ ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f ↔
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
have h₁₃ : ValuativeCriterion.Existence f →
  ValuativeCriterion.Uniqueness f →
    QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
Tactic: tauto
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ValuativeCriterion (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
h :
  ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₁ :
  ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f →
    ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₂ h₃ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f →
        QuasiCompact f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Existence f ∧
              ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
h₄ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
h₅ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f →
      ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₆ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiCompact f
h₇ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → QuasiSeparated f
h₈ :
  ValuativeCriterion.Uniqueness f →
    QuasiSeparated f → ValuativeCriterion.Existence f → QuasiCompact f → LocallyOfFiniteType f → LocallyOfFiniteType f
h₉ h₁₀ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f →
        QuasiSeparated f →
          LocallyOfFiniteType f →
            ValuativeCriterion.Uniqueness f ∧
              QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f
h₁₁ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Uniqueness f
h₁₂ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f → QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → QuasiSeparated f
h₁₃ :
  ValuativeCriterion.Existence f →
    ValuativeCriterion.Uniqueness f →
      QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → ValuativeCriterion.Existence f
⊢ ValuativeCriterion.Uniqueness f ∧
      QuasiSeparated f ∧ ValuativeCriterion.Existence f ∧ QuasiCompact f ∧ LocallyOfFiniteType f ↔
    ValuativeCriterion.Existence f ∧
      ValuativeCriterion.Uniqueness f ∧ QuasiCompact f ∧ QuasiSeparated f ∧ LocallyOfFiniteType f
have h₁₄ : ValuativeCriterion.Existence f →
  ValuativeCriterion.Uniqueness f → QuasiCompact f → QuasiSeparated f → LocallyOfFiniteType f → QuasiCompact f
Tactic: tauto
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ValuativeCriterion (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : QuasiCompact f
inst_1 : QuasiSeparated f
inst_2 : LocallyOfFiniteType f
H : ValuativeCriterion f
⊢ IsProper f
have rw : (ValuativeCriterion ⊓ @QuasiCompact ⊓ @QuasiSeparated ⊓ @LocallyOfFiniteType) f
Tactic: rw [eq_valuativeCriterion]
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
⊢ ∃ (V : (normalization f).Opens),
    Membership.mem (α := ↥(normalization f)) V ((toNormalization f) x : ↥(normalization f)) ∧
      IsIso (X := (↑(toNormalization f ⁻¹ᵁ V) : Scheme)) (toNormalization f ∣_ V)
have obtain : ∀ (T : Scheme.{u}) (fT : T ⟶ Y),
  Etale fT →
    ∀ (u : ↥T) (hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)) (V W : (pullback f fT).Opens) (v : ↥V) (hVW : IsCompl V W),
      IsFinite (V.ι ≫ pullback.snd f fT) →
        ∀ (hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x),
          ∃ (V : (normalization f).Opens),
            Membership.mem (α := ↥(normalization f)) V ((toNormalization f) x : ↥(normalization f)) ∧
              IsIso (X := (↑(toNormalization f ⁻¹ᵁ V) : Scheme)) (toNormalization f ∣_ V)
Tactic: obtain ⟨T, fT, _, ⟨u, hu⟩, V, W, v, hVW, _, hv₂⟩ := exists_etale_isCompl_of_quasiFiniteAt _ rfl hx
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (hypothesis)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
Tactic: have hVW' : (W : Set ↑(pullback f fT)) = (↑V)ᶜ :=
      eq_compl_iff_isCompl.mpr (hVW.map TopologicalSpace.Opens.frameHom).symm
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (hypothesis)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have this : IsClosedImmersion V.ι
Tactic: have : IsClosedImmersion V.ι := .of_isPreimmersion _ (by simp [eq_compl_comm.mp hVW', W.isOpen])
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (hypothesis)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
this : IsClosedImmersion V.ι
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have this₁ : IsClosedImmersion W.ι
Tactic: have : IsClosedImmersion W.ι := .of_isPreimmersion _ (by simpa [hVW'] using V.2)
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
this_1 : IsClosedImmersion V.ι
this : IsClosedImmersion W.ι
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have obtain : ∀ (H : IsColimit (BinaryCofan.mk V.ι W.ι)),
  ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
Tactic: obtain ⟨H⟩ := nonempty_isColimit_binaryCofanMk_of_isCompl V.ι W.ι (by simpa)
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
this_1 : IsClosedImmersion V.ι
this : IsClosedImmersion W.ι
H : IsColimit (BinaryCofan.mk V.ι W.ι)
e : normalization (X := pullback f fT) (pullback.snd f fT) ≅ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) :=
  Iso.trans (Y := normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (Iso.symm (normalizationCoprodIso (pullback.snd f fT) H) :
      normalization (X := pullback f fT) (pullback.snd f fT) ≅
        normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (coprod.mapIso (Iso.symm (asIso (toNormalization (V.ι ≫ pullback.snd f fT))))
        (Iso.refl (normalization (W.ι ≫ pullback.snd f fT))) :
      normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT) ≅
        (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT))
ι : (↑V : Scheme) ⟶ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) := coprod.inl
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have refine_1 : Eq (α := ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
  (ι v : ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
  (e.hom
      ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
        ↥(normalization (X := pullback f fT) (pullback.snd f fT))) :
    ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
Tactic: refine ⟨e.hom ⁻¹ᵁ ι.opensRange, ⟨v, ?_⟩, ?_⟩
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
this_1 : IsClosedImmersion V.ι
this : IsClosedImmersion W.ι
H : IsColimit (BinaryCofan.mk V.ι W.ι)
e : normalization (X := pullback f fT) (pullback.snd f fT) ≅ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) :=
  Iso.trans (Y := normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (Iso.symm (normalizationCoprodIso (pullback.snd f fT) H) :
      normalization (X := pullback f fT) (pullback.snd f fT) ≅
        normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (coprod.mapIso (Iso.symm (asIso (toNormalization (V.ι ≫ pullback.snd f fT))))
        (Iso.refl (normalization (W.ι ≫ pullback.snd f fT))) :
      normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT) ≅
        (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT))
ι : (↑V : Scheme) ⟶ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) := coprod.inl
refine_1 :
  Eq (α := ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
    (ι v : ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
    (e.hom
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) :
      ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
⊢ ∃ (U : (normalization (X := pullback f fT) (pullback.snd f fT)).Opens),
    Membership.mem (α := ↥(normalization (X := pullback f fT) (pullback.snd f fT))) U
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) ∧
      IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ U) : Scheme)) (toNormalization (pullback.snd f fT) ∣_ U)
have refine_2 : IsIso (X := (↑(toNormalization (pullback.snd f fT) ⁻¹ᵁ e.hom ⁻¹ᵁ opensRange ι) : Scheme))
  (toNormalization (pullback.snd f fT) ∣_ e.hom ⁻¹ᵁ opensRange ι)
Tactic: refine ⟨e.hom ⁻¹ᵁ ι.opensRange, ⟨v, ?_⟩, ?_⟩
-- Lean 4 proof step from Mathlib.AlgebraicGeometry.ZariskisMainTheorem (goal)
Goal:
X Y : Scheme
f : X ⟶ Y
inst : LocallyOfFiniteType f
inst_1 : IsSeparated f
inst_2 : QuasiCompact f
x : ↥X
hx : QuasiFiniteAt f x
T : Scheme
fT : T ⟶ Y
left : Etale fT
u : ↥T
hu : Eq (α := ↥Y) (fT u : ↥Y) (f x : ↥Y)
V W : (pullback f fT).Opens
v : ↥V
hVW : IsCompl V W
left_1 : IsFinite (V.ι ≫ pullback.snd f fT)
hv₂ : (pullback.fst f fT) (↑v : ↥(pullback f fT)) = x
hVW' : (↑W : Set ↥(pullback f fT)) = (↑V : Set ↥(pullback f fT))ᶜ
this_1 : IsClosedImmersion V.ι
this : IsClosedImmersion W.ι
H : IsColimit (BinaryCofan.mk V.ι W.ι)
e : normalization (X := pullback f fT) (pullback.snd f fT) ≅ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) :=
  Iso.trans (Y := normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (Iso.symm (normalizationCoprodIso (pullback.snd f fT) H) :
      normalization (X := pullback f fT) (pullback.snd f fT) ≅
        normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT))
    (coprod.mapIso (Iso.symm (asIso (toNormalization (V.ι ≫ pullback.snd f fT))))
        (Iso.refl (normalization (W.ι ≫ pullback.snd f fT))) :
      normalization (V.ι ≫ pullback.snd f fT) ⨿ normalization (W.ι ≫ pullback.snd f fT) ≅
        (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT))
ι : (↑V : Scheme) ⟶ (↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT) := coprod.inl
⊢ Eq (α := ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
    (ι v : ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
    (e.hom
        ((toNormalization (pullback.snd f fT)) (↑v : ↥(pullback f fT)) :
          ↥(normalization (X := pullback f fT) (pullback.snd f fT))) :
      ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
have refine_1 : Eq (α := ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
  (ι v : ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
  ((V.ι ≫ toNormalization (pullback.snd f fT) ≫ e.hom) v : ↥((↑V : Scheme) ⨿ normalization (W.ι ≫ pullback.snd f fT)))
Tactic: rw [← V.ι_apply, ← Scheme.Hom.comp_apply, ← Scheme.Hom.comp_apply]