Theorem: AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.lift_range
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
⊢ Set.range ⇑(lift f g H').val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this : IsIso (pullback.snd f g)
⊢ Set.range ⇑(lift f g H').val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
tactic: have := pullback_snd_isIso_of_range_subset f g H'
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this : IsIso (pullback.snd f g)
⊢ Set.range ⇑(lift f g H').val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this : IsIso (pullback.snd f g)
⊢ Set.range ⇑(inv (pullback.snd f g) ≫ pullback.fst f g).val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
tactic: dsimp only [lift]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this : IsIso (pullback.snd f g)
⊢ Set.range ⇑(inv (pullback.snd f g) ≫ pullback.fst f g).val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Set.range ⇑(inv (pullback.snd f g) ≫ pullback.fst f g).val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
tactic: have : _ = (pullback.fst f g).val.base :=
    PreservesPullback.iso_hom_fst
      (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forget _) f g
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Set.range ⇑(inv (pullback.snd f g) ≫ pullback.fst f g).val.base = ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Set.range
      (⇑(pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
            ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g)) ∘
        ⇑((inv (pullback.snd f g)).val.base ≫
            (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)) =
    ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
tactic: erw [LocallyRingedSpace.comp_val, SheafedSpace.comp_base, ← this, ← Category.assoc, coe_comp]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Set.range
      (⇑(pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
            ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g)) ∘
        ⇑((inv (pullback.snd f g)).val.base ≫
            (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)) =
    ⇑f.val.base ⁻¹' Set.range ⇑g.val.base
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Set.range
      ⇑(pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
          ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g)) =
    ⇑f.val.base ⁻¹' Set.range ⇑g.val.base

C : Type u
inst✝ : Category.{v, u} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base
this✝ : IsIso (pullback.snd f g)
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫
      pullback.fst ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f)
        ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) =
    (pullback.fst f g).val.base
⊢ Function.Surjective
    ⇑((inv (pullback.snd f g)).val.base ≫
        (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
tactic: rw [Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]