Theorem: AlgebraicGeometry.Scheme.subcanonical_zariskiTopology
File: Mathlib/AlgebraicGeometry/Sites/BigZariski.lean

tactic: apply Sheaf.Subcanonical.of_yoneda_isSheaf
state_before: ⊢ Sheaf.Subcanonical zariskiTopology
state_after: case h

⊢ ∀ (X : Scheme), Presieve.IsSheaf zariskiTopology (yoneda.obj X)

tactic: intro X
state_before: case h

⊢ ∀ (X : Scheme), Presieve.IsSheaf zariskiTopology (yoneda.obj X)
state_after: case h
X : Scheme
⊢ Presieve.IsSheaf zariskiTopology (yoneda.obj X)

tactic: rw [Presieve.isSheaf_pretopology]
state_before: case h
X : Scheme
⊢ Presieve.IsSheaf zariskiTopology (yoneda.obj X)
state_after: case h
X : Scheme
⊢ ∀ {X_1 : Scheme}, ∀ R ∈ zariskiPretopology.coverings X_1, Presieve.IsSheafFor (yoneda.obj X) R

tactic: rintro Y S ⟨𝓤,rfl⟩ x hx
state_before: case h
X : Scheme
⊢ ∀ {X_1 : Scheme}, ∀ R ∈ zariskiPretopology.coverings X_1, Presieve.IsSheafFor (yoneda.obj X) R
state_after: case h.intro
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
⊢ ∃! t, x.IsAmalgamation t

tactic: let e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map _) (.mk _)) <| by
  intro i j
  apply hx
  exact Limits.pullback.condition
state_before: case h.intro
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
⊢ ∃! t, x.IsAmalgamation t
state_after: case h.intro
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ ∃! t, x.IsAmalgamation t

tactic: refine ⟨e, ?_, ?_⟩
state_before: case h.intro
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ ∃! t, x.IsAmalgamation t
state_after: case h.intro.refine_1
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ (fun t => x.IsAmalgamation t) e

case h.intro.refine_2
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ ∀ (y : (yoneda.obj X).obj { unop := Y }), (fun t => x.IsAmalgamation t) y → y = e

tactic: intro i j
state_before: X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
⊢ ∀ (x_1 y : 𝓤.J), Limits.pullback.fst ≫ (fun j => x (𝓤.map j) ⋯) x_1 = Limits.pullback.snd ≫ (fun j => x (𝓤.map j) ⋯) y
state_after: X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
i j : 𝓤.J
⊢ Limits.pullback.fst ≫ (fun j => x (𝓤.map j) ⋯) i = Limits.pullback.snd ≫ (fun j => x (𝓤.map j) ⋯) j

tactic: apply hx
state_before: X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
i j : 𝓤.J
⊢ Limits.pullback.fst ≫ (fun j => x (𝓤.map j) ⋯) i = Limits.pullback.snd ≫ (fun j => x (𝓤.map j) ⋯) j
state_after: case a
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
i j : 𝓤.J
⊢ (Limits.limit.cone (Limits.cospan (𝓤.map i) (𝓤.map j))).π.1 Limits.WalkingCospan.left ≫ 𝓤.map i =
    (Limits.limit.cone (Limits.cospan (𝓤.map i) (𝓤.map j))).π.1 Limits.WalkingCospan.right ≫ 𝓤.map j

tactic: exact Limits.pullback.condition
state_before: case a
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
i j : 𝓤.J
⊢ (Limits.limit.cone (Limits.cospan (𝓤.map i) (𝓤.map j))).π.1 Limits.WalkingCospan.left ≫ 𝓤.map i =
    (Limits.limit.cone (Limits.cospan (𝓤.map i) (𝓤.map j))).π.1 Limits.WalkingCospan.right ≫ 𝓤.map j
state_after: no goals

tactic: rintro Z e ⟨j⟩
state_before: case h.intro.refine_1
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ (fun t => x.IsAmalgamation t) e
state_after: case h.intro.refine_1.mk
X Y✝ : Scheme
𝓤 : Y✝.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y✝ ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
Y : Scheme
j : 𝓤.J
⊢ (yoneda.obj X).map (𝓤.map j).op e = x (𝓤.map j) ⋯

tactic: dsimp [e]
state_before: case h.intro.refine_1.mk
X Y✝ : Scheme
𝓤 : Y✝.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y✝ ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
Y : Scheme
j : 𝓤.J
⊢ (yoneda.obj X).map (𝓤.map j).op e = x (𝓤.map j) ⋯
state_after: case h.intro.refine_1.mk
X Y✝ : Scheme
𝓤 : Y✝.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y✝ ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
Y : Scheme
j : 𝓤.J
⊢ 𝓤.map j ≫ 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯ = x (𝓤.map j) ⋯

tactic: rw [𝓤.ι_glueMorphisms]
state_before: case h.intro.refine_1.mk
X Y✝ : Scheme
𝓤 : Y✝.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y✝ ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
Y : Scheme
j : 𝓤.J
⊢ 𝓤.map j ≫ 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯ = x (𝓤.map j) ⋯
state_after: no goals

tactic: intro e' h
state_before: case h.intro.refine_2
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
⊢ ∀ (y : (yoneda.obj X).obj { unop := Y }), (fun t => x.IsAmalgamation t) y → y = e
state_after: case h.intro.refine_2
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
⊢ e' = e

tactic: apply 𝓤.hom_ext
state_before: case h.intro.refine_2
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
⊢ e' = e
state_after: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
⊢ ∀ (x : 𝓤.J), 𝓤.map x ≫ e' = 𝓤.map x ≫ e

tactic: intro j
state_before: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
⊢ ∀ (x : 𝓤.J), 𝓤.map x ≫ e' = 𝓤.map x ≫ e
state_after: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
j : 𝓤.J
⊢ 𝓤.map j ≫ e' = 𝓤.map j ≫ e

tactic: rw [𝓤.ι_glueMorphisms]
state_before: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
j : 𝓤.J
⊢ 𝓤.map j ≫ e' = 𝓤.map j ≫ e
state_after: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
j : 𝓤.J
⊢ 𝓤.map j ≫ e' = x (𝓤.map j) ⋯

tactic: exact h (𝓤.map j) (.mk j)
state_before: case h.intro.refine_2.h
X Y : Scheme
𝓤 : Y.OpenCover
x : Presieve.FamilyOfElements (yoneda.obj X) (Presieve.ofArrows 𝓤.obj 𝓤.map)
hx : x.Compatible
e : Y ⟶ X := 𝓤.glueMorphisms (fun j => x (𝓤.map j) ⋯) ⋯
e' : (yoneda.obj X).obj { unop := Y }
h : x.IsAmalgamation e'
j : 𝓤.J
⊢ 𝓤.map j ≫ e' = x (𝓤.map j) ⋯
state_after: no goals