Theorem: CategoryTheory.Equalizer.Presieve.sheaf_condition
File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

tactic: rw [Types.type_equalizer_iff_unique]
state_before: C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
⊢ Presieve.IsSheafFor P R ↔
    Nonempty (IsLimit (Fork.ofι (forkMap P R) (_ : forkMap P R ≫ firstMap P R = forkMap P R ≫ secondMap P R)))

tactic: erw [← Equiv.forall_congr_left (firstObjEqFamily P R).toEquiv.symm]
state_before: C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
⊢ Presieve.IsSheafFor P R ↔ ∀ (y : FirstObj P R), firstMap P R y = secondMap P R y → ∃! x, forkMap P R x = y

tactic: simp_rw [← compatible_iff, ← Iso.toEquiv_fun, Equiv.apply_symm_apply]
state_before: C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
⊢ Presieve.IsSheafFor P R ↔
    ∀ (x : Presieve.FamilyOfElements P R),
      firstMap P R (↑(firstObjEqFamily P R).symm x) = secondMap P R (↑(firstObjEqFamily P R).symm x) →
        ∃! x_1, forkMap P R x_1 = ↑(firstObjEqFamily P R).symm x

tactic: apply ball_congr
state_before: C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
⊢ Presieve.IsSheafFor P R ↔
    ∀ (x : Presieve.FamilyOfElements P R),
      Presieve.FamilyOfElements.Compatible x → ∃! x_1, forkMap P R x_1 = ↑(firstObjEqFamily P R).symm x

tactic: intro x _
state_before: case H
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
⊢ ∀ (x : Presieve.FamilyOfElements P R),
    Presieve.FamilyOfElements.Compatible x →
      ((∃! t, Presieve.FamilyOfElements.IsAmalgamation x t) ↔ ∃! x_1, forkMap P R x_1 = ↑(firstObjEqFamily P R).symm x)

tactic: apply exists_unique_congr
state_before: case H
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
⊢ (∃! t, Presieve.FamilyOfElements.IsAmalgamation x t) ↔ ∃! x_1, forkMap P R x_1 = ↑(firstObjEqFamily P R).symm x

tactic: intro t
state_before: case H.h
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
⊢ ∀ (a : P.obj X.op), Presieve.FamilyOfElements.IsAmalgamation x a ↔ forkMap P R a = ↑(firstObjEqFamily P R).symm x

tactic: rw [Equiv.eq_symm_apply]
state_before: case H.h
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
⊢ Presieve.FamilyOfElements.IsAmalgamation x t ↔ forkMap P R t = ↑(firstObjEqFamily P R).symm x

tactic: constructor
state_before: case H.h
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
⊢ Presieve.FamilyOfElements.IsAmalgamation x t ↔ ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x

tactic: intro q
state_before: case H.h.mp
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
⊢ Presieve.FamilyOfElements.IsAmalgamation x t → ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x

tactic: funext Y f hf
state_before: case H.h.mp
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
q : Presieve.FamilyOfElements.IsAmalgamation x t
⊢ ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x

tactic: simpa [forkMap] using q _ _
state_before: case H.h.mp.h.h.h
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
q : Presieve.FamilyOfElements.IsAmalgamation x t
Y : C
f : Y ⟶ X
hf : R f
⊢ ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) f hf = x f hf

tactic: intro q Y f hf
state_before: case H.h.mpr
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
⊢ ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x → Presieve.FamilyOfElements.IsAmalgamation x t

tactic: rw [← q]
state_before: case H.h.mpr
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
q : ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x
Y : C
f : Y ⟶ X
hf : R f
⊢ P.map f.op t = x f hf

tactic: simp [forkMap]
state_before: case H.h.mpr
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : Presieve.FamilyOfElements P R
h✝ : Presieve.FamilyOfElements.Compatible x
t : P.obj X.op
q : ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) = x
Y : C
f : Y ⟶ X
hf : R f
⊢ P.map f.op t = ↑(firstObjEqFamily P R).toEquiv (forkMap P R t) f hf