Theorem: CategoryTheory.Abelian.Pseudoelement.pseudo_injective_of_mono
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

tactic: intro abar abar'
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
⊢ Function.Injective (pseudoApply f)

tactic: refine' Quotient.inductionOn₂ abar abar' fun a a' ha => _
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
⊢ pseudoApply f abar = pseudoApply f abar' → abar = abar'

tactic: apply Quotient.sound
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
⊢ Quotient.mk (setoid P) a = Quotient.mk (setoid P) a'

tactic: have : ⟦(a.hom ≫ f : Over Q)⟧ = ⟦↑(a'.hom ≫ f)⟧ := by convert ha
state_before: case a
C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
⊢ a ≈ a'

tactic: have ⟨R, p, q, ep, Eq, comm⟩ := Quotient.exact this
state_before: case a
C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
this : Quotient.mk (setoid Q) (Over.mk (a.hom ≫ f)) = Quotient.mk (setoid Q) (Over.mk (a'.hom ≫ f))
⊢ a ≈ a'

tactic: exact ⟨R, p, q, ep, Eq, (cancel_mono f).1 <| by
  simp only [Category.assoc]
  exact comm⟩
state_before: case a
C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
this : Quotient.mk (setoid Q) (Over.mk (a.hom ≫ f)) = Quotient.mk (setoid Q) (Over.mk (a'.hom ≫ f))
R : C
p : R ⟶ (Over.mk (a.hom ≫ f)).left
q : R ⟶ (Over.mk (a'.hom ≫ f)).left
ep : Epi p
Eq : Epi q
comm : p ≫ (Over.mk (a.hom ≫ f)).hom = q ≫ (Over.mk (a'.hom ≫ f)).hom
⊢ a ≈ a'

tactic: convert ha
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
⊢ Quotient.mk ?m.297761 (Over.mk (a.hom ≫ f)) = Quotient.mk ?m.297761 (Over.mk (a'.hom ≫ f))

tactic: simp only [Category.assoc]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
this : Quotient.mk (setoid Q) (Over.mk (a.hom ≫ f)) = Quotient.mk (setoid Q) (Over.mk (a'.hom ≫ f))
R : C
p : R ⟶ (Over.mk (a.hom ≫ f)).left
q : R ⟶ (Over.mk (a'.hom ≫ f)).left
ep : Epi p
Eq : Epi q
comm : p ≫ (Over.mk (a.hom ≫ f)).hom = q ≫ (Over.mk (a'.hom ≫ f)).hom
⊢ (p ≫ a.hom) ≫ f = (q ≫ a'.hom) ≫ f

tactic: exact comm
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Mono f
abar abar' : Pseudoelement P
a a' : Over P
ha : pseudoApply f (Quotient.mk (setoid P) a) = pseudoApply f (Quotient.mk (setoid P) a')
this : Quotient.mk (setoid Q) (Over.mk (a.hom ≫ f)) = Quotient.mk (setoid Q) (Over.mk (a'.hom ≫ f))
R : C
p : R ⟶ (Over.mk (a.hom ≫ f)).left
q : R ⟶ (Over.mk (a'.hom ≫ f)).left
ep : Epi p
Eq : Epi q
comm : p ≫ (Over.mk (a.hom ≫ f)).hom = q ≫ (Over.mk (a'.hom ≫ f)).hom
⊢ p ≫ a.hom ≫ f = q ≫ a'.hom ≫ f