Theorem: AlgebraicGeometry.Scheme.OpenCover.bind_obj
File: Mathlib/AlgebraicGeometry/Cover/Open.lean

Proof steps:
state_before: X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
state_after: X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
tactic: let y := (𝒰.covers x).choose
state_before: X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
state_after: X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
tactic: have hy : (𝒰.map (𝒰.f x)).val.base y = x := (𝒰.covers x).choose_spec
state_before: X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
state_after: case intro
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
tactic: rcases (f (𝒰.f x)).covers y with ⟨z, hz⟩
state_before: case intro
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ x ∈
    Set.range
      ⇑((fun x => (f x.fst).map x.snd ≫ 𝒰.map x.fst) ((fun x => ⟨𝒰.f x, (f (𝒰.f x)).f (Exists.choose ⋯)⟩) x)).val.base
state_after: case intro
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ x ∈ Set.range ⇑((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).val.base
tactic: change x ∈ Set.range ((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).1.base
state_before: case intro
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ x ∈ Set.range ⇑((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).val.base
state_after: case h
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ ((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).val.base z = x
tactic: use z
state_before: case h
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ ((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).val.base z = x
state_after: case h
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ (𝒰.map (𝒰.f x)).val.base (((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z) = x
tactic: erw [comp_apply]
state_before: case h
X Y Z : Scheme
𝒰 : X.OpenCover
f✝ : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (x : 𝒰.J), HasPullback (𝒰.map x ≫ f✝) g
f : (x : 𝒰.J) → (𝒰.obj x).OpenCover
x : ↑↑X.toPresheafedSpace
y : ↑↑(𝒰.obj (𝒰.f x)).toPresheafedSpace := Exists.choose ⋯
hy : (𝒰.map (𝒰.f x)).val.base y = x
z : ↑↑((f (𝒰.f x)).obj ((f (𝒰.f x)).f y)).toPresheafedSpace
hz : ((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z = y
⊢ (𝒰.map (𝒰.f x)).val.base (((f (𝒰.f x)).map ((f (𝒰.f x)).f y)).val.base z) = x
state_after: no goals
tactic: erw [hz, hy]