Theorem: AlgebraicGeometry.Scheme.image_basicOpen
File: Mathlib/AlgebraicGeometry/OpenImmersion.lean

tactic: have e := Scheme.preimage_basicOpen f (f.invApp U r)
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((Hom.invApp f U) r) = X.basicOpen ((Hom.app f (f ''ᵁ U)) ((Hom.invApp f U) r))
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)

tactic: rw [Scheme.Hom.invApp] at e
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((Hom.invApp f U) r) = X.basicOpen ((Hom.app f (f ''ᵁ U)) ((Hom.invApp f U) r))
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e :
  f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) =
    X.basicOpen ((Hom.app f (f ''ᵁ U)) ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r))
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)

tactic: erw [PresheafedSpace.IsOpenImmersion.invApp_app_apply] at e
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e :
  f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) =
    X.basicOpen ((Hom.app f (f ''ᵁ U)) ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r))
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen ((X.presheaf.map (eqToHom ⋯)) r)
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)

tactic: rw [Scheme.basicOpen_res, inf_eq_right.mpr _] at e
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen ((X.presheaf.map (eqToHom ⋯)) r)
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)

C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ X.basicOpen r ≤ f ⁻¹ᵁ f ''ᵁ U

tactic: refine le_trans (Scheme.basicOpen_le _ _) (le_of_eq ?_)
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ X.basicOpen r ≤ f ⁻¹ᵁ f ''ᵁ U
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ U = f ⁻¹ᵁ f ''ᵁ U

tactic: ext1
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ U = f ⁻¹ᵁ f ''ᵁ U
state_after: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ ↑U = ↑(f ⁻¹ᵁ f ''ᵁ U)

tactic: exact (Set.preimage_image_eq _ H.base_open.inj).symm
state_before: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = f ⁻¹ᵁ f ''ᵁ U ⊓ X.basicOpen r
⊢ ↑U = ↑(f ⁻¹ᵁ f ''ᵁ U)
state_after: no goals

tactic: rw [← e]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ f ''ᵁ X.basicOpen r = Y.basicOpen ((Hom.invApp f U) r)
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ f ''ᵁ f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = Y.basicOpen ((Hom.invApp f U) r)

tactic: ext1
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ f ''ᵁ f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = Y.basicOpen ((Hom.invApp f U) r)
state_after: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(f ''ᵁ f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) = ↑(Y.basicOpen ((Hom.invApp f U) r))

tactic: dsimp [Opens.map]
state_before: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(f ''ᵁ f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) = ↑(Y.basicOpen ((Hom.invApp f U) r))
state_after: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ⇑f.val.base '' (⇑f.val.base ⁻¹' ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r))) =
    ↑(Y.basicOpen ((Hom.invApp f U) r))

tactic: refine Set.image_preimage_eq_inter_range.trans ?_
state_before: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ⇑f.val.base '' (⇑f.val.base ⁻¹' ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r))) =
    ↑(Y.basicOpen ((Hom.invApp f U) r))
state_after: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) ∩ Set.range ⇑f.val.base =
    ↑(Y.basicOpen ((Hom.invApp f U) r))

tactic: erw [Set.inter_eq_left]
state_before: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) ∩ Set.range ⇑f.val.base =
    ↑(Y.basicOpen ((Hom.invApp f U) r))
state_after: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) ⊆ Set.range ⇑f.val.base

tactic: refine Set.Subset.trans (Scheme.basicOpen_le _ _) (Set.image_subset_range _ _)
state_before: case h
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X.toPresheafedSpace
r : ↑Γ(X, U)
e : f ⁻¹ᵁ Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r) = X.basicOpen r
⊢ ↑(Y.basicOpen ((LocallyRingedSpace.IsOpenImmersion.invApp f U) r)) ⊆ Set.range ⇑f.val.base
state_after: no goals