Theorem: AlgebraicGeometry.Scheme.OpenCover.fromGlued_injective
File: Mathlib/AlgebraicGeometry/Gluing.lean

Proof steps:
state_before: X : Scheme
𝒰 : X.OpenCover
⊢ Function.Injective ⇑𝒰.fromGlued.val.base
state_after: X : Scheme
𝒰 : X.OpenCover
x y : ↑↑𝒰.gluedCover.glued.toPresheafedSpace
h : 𝒰.fromGlued.val.base x = 𝒰.fromGlued.val.base y
⊢ x = y
tactic: intro x y h
state_before: X : Scheme
𝒰 : X.OpenCover
x y : ↑↑𝒰.gluedCover.glued.toPresheafedSpace
h : 𝒰.fromGlued.val.base x = 𝒰.fromGlued.val.base y
⊢ x = y
state_after: case intro.intro
X : Scheme
𝒰 : X.OpenCover
y : ↑↑𝒰.gluedCover.glued.toPresheafedSpace
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
h : 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι i).val.base x) = 𝒰.fromGlued.val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = y
tactic: obtain ⟨i, x, rfl⟩ := 𝒰.gluedCover.ι_jointly_surjective x
state_before: case intro.intro
X : Scheme
𝒰 : X.OpenCover
y : ↑↑𝒰.gluedCover.glued.toPresheafedSpace
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
h : 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι i).val.base x) = 𝒰.fromGlued.val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι i).val.base x) = 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι j).val.base y)
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
tactic: obtain ⟨j, y, rfl⟩ := 𝒰.gluedCover.ι_jointly_surjective y
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι i).val.base x) = 𝒰.fromGlued.val.base ((𝒰.gluedCover.ι j).val.base y)
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : ((𝒰.gluedCover.ι i).val.base ≫ 𝒰.fromGlued.val.base) x = ((𝒰.gluedCover.ι j).val.base ≫ 𝒰.fromGlued.val.base) y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
tactic: erw [← comp_apply, ← comp_apply] at h
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : ((𝒰.gluedCover.ι i).val.base ≫ 𝒰.fromGlued.val.base) x = ((𝒰.gluedCover.ι j).val.base ≫ 𝒰.fromGlued.val.base) y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.gluedCover.ι i ≫ 𝒰.fromGlued).val.base x = (𝒰.gluedCover.ι j ≫ 𝒰.fromGlued).val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
tactic: simp_rw [← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.gluedCover.ι i ≫ 𝒰.fromGlued).val.base x = (𝒰.gluedCover.ι j ≫ 𝒰.fromGlued).val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
tactic: erw [ι_fromGlued, ι_fromGlued] at h
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
tactic: let e :=
    (TopCat.pullbackConeIsLimit _ _).conePointUniqueUpToIso
      (isLimitOfHasPullbackOfPreservesLimit Scheme.forgetToTop (𝒰.map i) (𝒰.map j))
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.ι i).val.base x = (𝒰.gluedCover.ι j).val.base y
state_after: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ 𝒰.gluedCover.Rel ⟨i, x⟩ ⟨j, y⟩
tactic: rw [𝒰.gluedCover.ι_eq_iff]
state_before: case intro.intro.intro.intro
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ 𝒰.gluedCover.Rel ⟨i, x⟩ ⟨j, y⟩
state_after: case intro.intro.intro.intro.h
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ ∃ x_1,
    (𝒰.gluedCover.f ⟨i, x⟩.fst ⟨j, y⟩.fst).val.base x_1 = ⟨i, x⟩.snd ∧
      (𝒰.gluedCover.t ⟨i, x⟩.fst ⟨j, y⟩.fst ≫ 𝒰.gluedCover.f ⟨j, y⟩.fst ⟨i, x⟩.fst).val.base x_1 = ⟨j, y⟩.snd
tactic: right
state_before: case intro.intro.intro.intro.h
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ ∃ x_1,
    (𝒰.gluedCover.f ⟨i, x⟩.fst ⟨j, y⟩.fst).val.base x_1 = ⟨i, x⟩.snd ∧
      (𝒰.gluedCover.t ⟨i, x⟩.fst ⟨j, y⟩.fst ≫ 𝒰.gluedCover.f ⟨j, y⟩.fst ⟨i, x⟩.fst).val.base x_1 = ⟨j, y⟩.snd
state_after: case h
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.f ⟨i, x⟩.fst ⟨j, y⟩.fst).val.base (e.hom ⟨(x, y), h⟩) = ⟨i, x⟩.snd ∧
    (𝒰.gluedCover.t ⟨i, x⟩.fst ⟨j, y⟩.fst ≫ 𝒰.gluedCover.f ⟨j, y⟩.fst ⟨i, x⟩.fst).val.base (e.hom ⟨(x, y), h⟩) =
      ⟨j, y⟩.snd
tactic: use e.hom ⟨⟨x, y⟩, h⟩
state_before: case h
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.f ⟨i, x⟩.fst ⟨j, y⟩.fst).val.base (e.hom ⟨(x, y), h⟩) = ⟨i, x⟩.snd ∧
    (𝒰.gluedCover.t ⟨i, x⟩.fst ⟨j, y⟩.fst ≫ 𝒰.gluedCover.f ⟨j, y⟩.fst ⟨i, x⟩.fst).val.base (e.hom ⟨(x, y), h⟩) =
      ⟨j, y⟩.snd
state_after: case h.left
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.f ⟨i, x⟩.fst ⟨j, y⟩.fst).val.base (e.hom ⟨(x, y), h⟩) = ⟨i, x⟩.snd

case h.right
X : Scheme
𝒰 : X.OpenCover
i : 𝒰.gluedCover.J
x : ↑↑(𝒰.gluedCover.U i).toPresheafedSpace
j : 𝒰.gluedCover.J
y : ↑↑(𝒰.gluedCover.U j).toPresheafedSpace
h : (𝒰.map i).val.base x = (𝒰.map j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).pt ≅
  (PullbackCone.mk (forgetToTop.map (pullback.fst (𝒰.map i) (𝒰.map j)))
      (forgetToTop.map (pullback.snd (𝒰.map i) (𝒰.map j))) ⋯).pt :=
  (TopCat.pullbackConeIsLimit (forgetToTop.map (𝒰.map i)) (forgetToTop.map (𝒰.map j))).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (𝒰.map i) (𝒰.map j))
⊢ (𝒰.gluedCover.t ⟨i, x⟩.fst ⟨j, y⟩.fst ≫ 𝒰.gluedCover.f ⟨j, y⟩.fst ⟨i, x⟩.fst).val.base (e.hom ⟨(x, y), h⟩) =
    ⟨j, y⟩.snd
tactic: constructor