Theorem: AlgebraicGeometry.LocallyRingedSpace.comp_ring_hom_ext
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

tactic: ext1
state_before: X✝ : LocallyRingedSpace
r : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
⊢ X.toΓSpec ≫ Spec.locallyRingedSpaceMap f = β
state_after: case h
X✝ : LocallyRingedSpace
r : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
⊢ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val = β.val

tactic: refine Spec.basicOpen_hom_ext w ?_
state_before: case h
X✝ : LocallyRingedSpace
r : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
⊢ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val = β.val
state_after: case h
X✝ : LocallyRingedSpace
r : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
⊢ ∀ (r : ↑R),
    let U := basicOpen r;
    (toOpen (↑R) U ≫ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val.c.app { unop := U }) ≫ X.presheaf.map (eqToHom ⋯) =
      toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: intro r U
state_before: case h
X✝ : LocallyRingedSpace
r : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
⊢ ∀ (r : ↑R),
    let U := basicOpen r;
    (toOpen (↑R) U ≫ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val.c.app { unop := U }) ≫ X.presheaf.map (eqToHom ⋯) =
      toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (toOpen (↑R) U ≫ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val.c.app { unop := U }) ≫ X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: rw [LocallyRingedSpace.comp_val_c_app]
state_before: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (toOpen (↑R) U ≫ (X.toΓSpec ≫ Spec.locallyRingedSpaceMap f).val.c.app { unop := U }) ≫ X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (toOpen (↑R) U ≫
        (Spec.locallyRingedSpaceMap f).val.c.app { unop := U } ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
      X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: erw [toOpen_comp_comap_assoc]
state_before: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (toOpen (↑R) U ≫
        (Spec.locallyRingedSpaceMap f).val.c.app { unop := U } ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
      X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (CommRingCat.ofHom f ≫
        toOpen (↑(Γ.obj { unop := X })) ((Opens.comap (PrimeSpectrum.comap f)) U) ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
      X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: rw [Category.assoc]
state_before: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ (CommRingCat.ofHom f ≫
        toOpen (↑(Γ.obj { unop := X })) ((Opens.comap (PrimeSpectrum.comap f)) U) ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
      X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ CommRingCat.ofHom f ≫
      (toOpen (↑(Γ.obj { unop := X })) ((Opens.comap (PrimeSpectrum.comap f)) U) ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
        X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: erw [toΓSpecSheafedSpace_app_spec, ← X.presheaf.map_comp]
state_before: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ CommRingCat.ofHom f ≫
      (toOpen (↑(Γ.obj { unop := X })) ((Opens.comap (PrimeSpectrum.comap f)) U) ≫
          X.toΓSpec.val.c.app { unop := Spec.locallyRingedSpaceMap f ⁻¹ᵁ { unop := U }.unop }) ≫
        X.presheaf.map (eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ CommRingCat.ofHom f ≫ X.presheaf.map ((X.toΓSpecMapBasicOpen (f r)).leTop.op ≫ eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }

tactic: exact h r
state_before: case h
X✝ : LocallyRingedSpace
r✝ : ↑(Γ.obj { unop := X✝ })
X : LocallyRingedSpace
R : CommRingCat
f : R ⟶ Γ.obj { unop := X }
β : X ⟶ Spec.locallyRingedSpaceObj R
w : X.toΓSpec.val.base ≫ (Spec.locallyRingedSpaceMap f).val.base = β.val.base
h : ∀ (r : ↑R), f ≫ X.presheaf.map (homOfLE ⋯).op = toOpen (↑R) (basicOpen r) ≫ β.val.c.app { unop := basicOpen r }
r : ↑R
U : Opens (PrimeSpectrum ↑R) := basicOpen r
⊢ CommRingCat.ofHom f ≫ X.presheaf.map ((X.toΓSpecMapBasicOpen (f r)).leTop.op ≫ eqToHom ⋯) =
    toOpen (↑R) U ≫ β.val.c.app { unop := U }
state_after: no goals