Theorem: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCApp_iff
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

tactic: have loc_inst := IsLocalization.to_basicOpen (Γ.obj (op X)) r
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f = X.toToΓSpecMapBasicOpen r ↔ f = X.toΓSpecCApp r
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f = X.toToΓSpecMapBasicOpen r ↔ f = X.toΓSpecCApp r

tactic: rw [← @IsLocalization.Away.AwayMap.lift_comp _ _ _ _ _ _ _ r loc_inst _
    (X.isUnit_res_toΓSpecMapBasicOpen r)]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f = X.toToΓSpecMapBasicOpen r ↔ f = X.toΓSpecCApp r
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })) ↔
    f = X.toΓSpecCApp r

tactic: constructor
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })) ↔
    f = X.toΓSpecCApp r
state_after: case mp
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })) →
    f = X.toΓSpecCApp r

case mpr
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ f = X.toΓSpecCApp r →
    toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r }))

tactic: apply congr_arg
state_before: case mpr
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ f = X.toΓSpecCApp r →
    toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r }))
state_after: no goals

tactic: intro h
state_before: case mp
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
      (IsLocalization.Away.lift r ⋯).comp
        (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })) →
    f = X.toΓSpecCApp r
state_after: case mp
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
h :
  toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
    (IsLocalization.Away.lift r ⋯).comp
      (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r }))
⊢ f = X.toΓSpecCApp r

tactic: exact IsLocalization.ringHom_ext (Submonoid.powers r) h
state_before: case mp
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
f :
  (structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r } ⟶
    X.presheaf.obj { unop := X.toΓSpecMapBasicOpen r }
loc_inst : IsLocalization.Away r ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r })
h :
  toOpen (↑(Γ.obj { unop := X })) (basicOpen r) ≫ f =
    (IsLocalization.Away.lift r ⋯).comp
      (algebraMap ↑(Γ.obj { unop := X }) ↑((structureSheaf ↑(Γ.obj { unop := X })).val.obj { unop := basicOpen r }))
⊢ f = X.toΓSpecCApp r
state_after: no goals