Theorem: AlgebraicGeometry.RingedSpace.basicOpen_res
File: Mathlib/AlgebraicGeometry/RingedSpace.lean

tactic: induction U using Opposite.rec'
state_before: X : RingedSpace
U V : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ
i : U ⟶ V
f : ↑(X.presheaf.obj U)
⊢ basicOpen X (↑(X.presheaf.map i) f) = V.unop ⊓ basicOpen X f

tactic: induction V using Opposite.rec'
state_before: case h
X : RingedSpace
V : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ
X✝ : Opens ↑↑X.toPresheafedSpace
i : X✝.op ⟶ V
f : ↑(X.presheaf.obj X✝.op)
⊢ basicOpen X (↑(X.presheaf.map i) f) = V.unop ⊓ basicOpen X f

tactic: let g := i.unop
state_before: case h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
i : X✝¹.op ⟶ X✝.op
⊢ basicOpen X (↑(X.presheaf.map i) f) = X✝.op.unop ⊓ basicOpen X f

tactic: have : i = g.op := rfl
state_before: case h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
i : X✝¹.op ⟶ X✝.op
g : X✝.op.unop ⟶ X✝¹.op.unop := i.unop
⊢ basicOpen X (↑(X.presheaf.map i) f) = X✝.op.unop ⊓ basicOpen X f

tactic: clear_value g
state_before: case h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
i : X✝¹.op ⟶ X✝.op
g : X✝.op.unop ⟶ X✝¹.op.unop := i.unop
this : i = g.op
⊢ basicOpen X (↑(X.presheaf.map i) f) = X✝.op.unop ⊓ basicOpen X f

tactic: subst this
state_before: case h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
i : X✝¹.op ⟶ X✝.op
g : X✝.op.unop ⟶ X✝¹.op.unop
this : i = g.op
⊢ basicOpen X (↑(X.presheaf.map i) f) = X✝.op.unop ⊓ basicOpen X f

tactic: ext
state_before: case h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
⊢ basicOpen X (↑(X.presheaf.map g.op) f) = X✝.op.unop ⊓ basicOpen X f

tactic: constructor
state_before: case h.h.h.h
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x✝ : ↑↑X.toPresheafedSpace
⊢ x✝ ∈ ↑(basicOpen X (↑(X.presheaf.map g.op) f)) ↔ x✝ ∈ ↑(X✝.op.unop ⊓ basicOpen X f)

tactic: rintro ⟨x, hx : IsUnit _, rfl⟩
state_before: case h.h.h.h.mp
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x✝ : ↑↑X.toPresheafedSpace
⊢ x✝ ∈ ↑(basicOpen X (↑(X.presheaf.map g.op) f)) → x✝ ∈ ↑(X✝.op.unop ⊓ basicOpen X f)

tactic: erw [show X.presheaf.germ x ((X.presheaf.map g.op) f) = X.presheaf.germ (g x) f
 from X.presheaf.germ_res_apply _ _ _] at hx
state_before: case h.h.h.h.mp.intro.intro
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x : { x // x ∈ X✝.op.unop }
hx : IsUnit (↑(germ X.presheaf x) (↑(X.presheaf.map g.op) f))
⊢ ↑x ∈ ↑(X✝.op.unop ⊓ basicOpen X f)

tactic: exact ⟨x.2, g x, hx, rfl⟩
state_before: case h.h.h.h.mp.intro.intro
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x : { x // x ∈ X✝.op.unop }
hx : IsUnit (↑(germ X.presheaf ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑X✝¹.op.unop) }) x)) f)
⊢ ↑x ∈ ↑(X✝.op.unop ⊓ basicOpen X f)

tactic: rintro ⟨hxV, x, hx, rfl⟩
state_before: case h.h.h.h.mpr
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x✝ : ↑↑X.toPresheafedSpace
⊢ x✝ ∈ ↑(X✝.op.unop ⊓ basicOpen X f) → x✝ ∈ ↑(basicOpen X (↑(X.presheaf.map g.op) f))

tactic: refine' ⟨⟨x, hxV⟩, (_ : IsUnit _), rfl⟩
state_before: case h.h.h.h.mpr.intro.intro.intro
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x : { x // x ∈ X✝¹.op.unop }
hx : x ∈ {x | IsUnit (↑(germ X.presheaf x) f)}
hxV : ↑x ∈ ↑X✝.op.unop
⊢ ↑x ∈ ↑(basicOpen X (↑(X.presheaf.map g.op) f))

tactic: erw [show X.presheaf.germ ⟨x, hxV⟩ (X.presheaf.map g.op f) = X.presheaf.germ (g ⟨x, hxV⟩) f from
  X.presheaf.germ_res_apply _ _ _]
state_before: case h.h.h.h.mpr.intro.intro.intro
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x : { x // x ∈ X✝¹.op.unop }
hx : x ∈ {x | IsUnit (↑(germ X.presheaf x) f)}
hxV : ↑x ∈ ↑X✝.op.unop
⊢ IsUnit (↑(germ X.presheaf { val := ↑x, property := hxV }) (↑(X.presheaf.map g.op) f))

tactic: exact hx
state_before: case h.h.h.h.mpr.intro.intro.intro
X : RingedSpace
X✝¹ : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj X✝¹.op)
X✝ : Opens ↑↑X.toPresheafedSpace
g : X✝.op.unop ⟶ X✝¹.op.unop
x : { x // x ∈ X✝¹.op.unop }
hx : x ∈ {x | IsUnit (↑(germ X.presheaf x) f)}
hxV : ↑x ∈ ↑X✝.op.unop
⊢ IsUnit
    (↑(germ X.presheaf ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑X✝¹.op.unop) }) { val := ↑x, property := hxV }))
      f)