Theorem: CategoryTheory.Presieve.isSheafFor_iff_yonedaSheafCondition
File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

tactic: rw [IsSheafFor, YonedaSheafCondition]
state_before: C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ IsSheafFor P S.arrows ↔ YonedaSheafCondition P S

tactic: simp_rw [extension_iff_amalgamation]
state_before: C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ (∀ (x : FamilyOfElements P S.arrows), FamilyOfElements.Compatible x → ∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∀ (f : functor S ⟶ P), ∃! g, functorInclusion S ≫ g = f

tactic: rw [Equiv.forall_congr_left' natTransEquivCompatibleFamily]
state_before: C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ (∀ (x : FamilyOfElements P S.arrows), FamilyOfElements.Compatible x → ∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∀ (f : functor S ⟶ P), ∃! g, FamilyOfElements.IsAmalgamation (↑(↑natTransEquivCompatibleFamily f)) (↑yonedaEquiv g)

tactic: rw [Subtype.forall]
state_before: C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ (∀ (x : FamilyOfElements P S.arrows), FamilyOfElements.Compatible x → ∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∀ (y : { x // FamilyOfElements.Compatible x }),
      ∃! g,
        FamilyOfElements.IsAmalgamation (↑(↑natTransEquivCompatibleFamily (↑natTransEquivCompatibleFamily.symm y)))
          (↑yonedaEquiv g)

tactic: apply ball_congr
state_before: C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ (∀ (x : FamilyOfElements P S.arrows), FamilyOfElements.Compatible x → ∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∀ (a : FamilyOfElements P S.arrows) (b : FamilyOfElements.Compatible a),
      ∃! g,
        FamilyOfElements.IsAmalgamation
          (↑(↑natTransEquivCompatibleFamily (↑natTransEquivCompatibleFamily.symm { val := a, property := b })))
          (↑yonedaEquiv g)

tactic: intro x hx
state_before: case H
C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
⊢ ∀ (x : FamilyOfElements P S.arrows) (h : FamilyOfElements.Compatible x),
    (∃! t, FamilyOfElements.IsAmalgamation x t) ↔
      ∃! g,
        FamilyOfElements.IsAmalgamation
          (↑(↑natTransEquivCompatibleFamily (↑natTransEquivCompatibleFamily.symm { val := x, property := h })))
          (↑yonedaEquiv g)

tactic: rw [Equiv.exists_unique_congr_left _]
state_before: case H
C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
x : FamilyOfElements P S.arrows
hx : FamilyOfElements.Compatible x
⊢ (∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∃! g,
      FamilyOfElements.IsAmalgamation
        (↑(↑natTransEquivCompatibleFamily (↑natTransEquivCompatibleFamily.symm { val := x, property := hx })))
        (↑yonedaEquiv g)

tactic: simp
state_before: case H
C : Type u₁
inst✝ : Category C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v₁
x : FamilyOfElements P S.arrows
hx : FamilyOfElements.Compatible x
⊢ (∃! t, FamilyOfElements.IsAmalgamation x t) ↔
    ∃! y,
      FamilyOfElements.IsAmalgamation
        (↑(↑natTransEquivCompatibleFamily (↑natTransEquivCompatibleFamily.symm { val := x, property := hx }))) y