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

tactic: rw [Presieve.pullbackCompatible_iff]
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
x : FirstObj P R
⊢ Presieve.FamilyOfElements.Compatible ((firstObjEqFamily P R).hom x) ↔ firstMap P R x = secondMap P R x

tactic: constructor
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
x : FirstObj P R
⊢ Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x) ↔ firstMap P R x = secondMap P R x

tactic: . intro t
  apply Limits.Types.limit_ext.{max u₁ v₁, u₁}
  rintro ⟨⟨Y, f, hf⟩, Z, g, hg⟩
  simpa [firstMap, secondMap] using t hf hg
state_before: case 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 : FirstObj P R
⊢ Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x) → firstMap P R x = secondMap P R x

case 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 : FirstObj P R
⊢ firstMap P R x = secondMap P R x → Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x)

tactic: intro t
state_before: case 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 : FirstObj P R
⊢ Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x) → firstMap P R x = secondMap P R x

tactic: apply Limits.Types.limit_ext.{max u₁ v₁, u₁}
state_before: case 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 : FirstObj P R
t : Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x)
⊢ firstMap P R x = secondMap P R x

tactic: rintro ⟨⟨Y, f, hf⟩, Z, g, hg⟩
state_before: case mp.w
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : FirstObj P R
t : Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x)
⊢ ∀ (j : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })),
    limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op) j (firstMap P R x) =
      limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op) j (secondMap P R x)

tactic: simpa [firstMap, secondMap] using t hf hg
state_before: case mp.w.mk.mk.mk.mk.mk.mk
C : Type u₁
inst✝¹ : Category C
P : Cᵒᵖ ⥤ Type (max v₁ u₁)
X : C
R : Presieve X
S : Sieve X
inst✝ : HasPullbacks C
x : FirstObj P R
t : Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x)
Y : C
f : Y ⟶ X
hf : R f
Z : C
g : Z ⟶ X
hg : R g
⊢ limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op)
      { as := ({ fst := Y, snd := { val := f, property := hf } }, { fst := Z, snd := { val := g, property := hg } }) }
      (firstMap P R x) =
    limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op)
      { as := ({ fst := Y, snd := { val := f, property := hf } }, { fst := Z, snd := { val := g, property := hg } }) }
      (secondMap P R x)

tactic: intro t Y Z f g hf hg
state_before: case 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 : FirstObj P R
⊢ firstMap P R x = secondMap P R x → Presieve.FamilyOfElements.PullbackCompatible ((firstObjEqFamily P R).hom x)

tactic: rw [Types.limit_ext_iff'] at t
state_before: case 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 : FirstObj P R
t : firstMap P R x = secondMap P R x
Y Z : C
f : Y ⟶ X
g : Z ⟶ X
hf : R f
hg : R g
⊢ P.map pullback.fst.op ((firstObjEqFamily P R).hom x f hf) = P.map pullback.snd.op ((firstObjEqFamily P R).hom x g hg)

tactic: simpa [firstMap, secondMap] using t ⟨⟨⟨Y, f, hf⟩, Z, g, hg⟩⟩
state_before: case 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 : FirstObj P R
t :
  ∀ (j : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })),
    limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op) j (firstMap P R x) =
      limit.π (Discrete.functor fun fg => P.obj (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd).op) j (secondMap P R x)
Y Z : C
f : Y ⟶ X
g : Z ⟶ X
hf : R f
hg : R g
⊢ P.map pullback.fst.op ((firstObjEqFamily P R).hom x f hf) = P.map pullback.snd.op ((firstObjEqFamily P R).hom x g hg)