Theorem: AlgebraicGeometry.RingedSpace.isUnit_res_of_isUnit_germ
File: Mathlib/Geometry/RingedSpace/Basic.lean

Proof steps:
state_before: X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
g' : ↑(X.presheaf.stalk ↑x)
heq : (X.presheaf.germ x) f * g' = 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: obtain ⟨g', heq⟩ := h.exists_right_inv
state_before: case intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
g' : ↑(X.presheaf.stalk ↑x)
heq : (X.presheaf.germ x) f * g' = 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: obtain ⟨V, hxV, g, rfl⟩ := X.presheaf.germ_exist x.1 g'
state_before: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: let W := U ⊓ V
state_before: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: have hxW : x.1 ∈ W := ⟨x.2, hxV⟩
state_before: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
heq : (X.presheaf.germ x) f * (X.presheaf.germ ⟨↑x, hxV⟩) g = 1
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: replace heq : (X.presheaf.germ ⟨x.val, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f *
      (X.presheaf.map (U.infLERight V).op) g) = (X.presheaf.germ ⟨x.val, hxW⟩) 1 := by
    dsimp [germ]
    erw [map_mul, map_one, show X.presheaf.germ ⟨x, hxW⟩ ((X.presheaf.map (U.infLELeft V).op) f) =
      X.presheaf.germ x f from X.presheaf.germ_res_apply (Opens.infLELeft U V) ⟨x.1, hxW⟩ f,
      show X.presheaf.germ ⟨x, hxW⟩ (X.presheaf.map (U.infLERight V).op g) =
      X.presheaf.germ ⟨x, hxV⟩ g from X.presheaf.germ_res_apply (Opens.infLERight U V) ⟨x.1, hxW⟩ g]
    exact heq
state_before: case intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.map i₂.op) 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
tactic: obtain ⟨W', hxW', i₁, i₂, heq'⟩ := X.presheaf.germ_eq x.1 hxW hxW _ _ heq
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.map i₂.op) 1
⊢ ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)
state_after: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.map i₂.op) 1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
tactic: use W', i₁ ≫ Opens.infLELeft U V, hxW'
state_before: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.map i₂.op) 1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
state_after: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f) *
      (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLERight V).op) g) =
    1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
tactic: rw [(X.presheaf.map i₂.op).map_one, (X.presheaf.map i₁.op).map_mul] at heq'
state_before: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' :
  (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLELeft V).op) f) *
      (X.presheaf.map i₁.op) ((X.presheaf.map (U.infLERight V).op) g) =
    1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
state_after: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' : (X.presheaf.map (i₁ ≫ U.infLELeft V).op) f * (X.presheaf.map ((U.infLERight V).op ≫ i₁.op)) g = 1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
tactic: rw [← comp_apply, ← X.presheaf.map_comp, ← comp_apply, ← X.presheaf.map_comp, ← op_comp] at heq'
state_before: case h
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj (op U))
x : ↥U
h : IsUnit ((X.presheaf.germ x) f)
V : Opens ↑↑X.toPresheafedSpace
hxV : ↑x ∈ V
g : (CategoryTheory.forget CommRingCat).obj (X.presheaf.obj (op V))
W : Opens ↑↑X.toPresheafedSpace := U ⊓ V
hxW : ↑x ∈ W
heq :
  (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =
    (X.presheaf.germ ⟨↑x, hxW⟩) 1
W' : Opens ↑↑X.toPresheafedSpace
hxW' : ↑x ∈ W'
i₁ i₂ : W' ⟶ W
heq' : (X.presheaf.map (i₁ ≫ U.infLELeft V).op) f * (X.presheaf.map ((U.infLERight V).op ≫ i₁.op)) g = 1
⊢ IsUnit ((X.presheaf.map (i₁ ≫ U.infLELeft V).op) f)
state_after: no goals
tactic: exact isUnit_of_mul_eq_one _ _ heq'