Theorem: CategoryTheory.ConcreteCategory.surjective_eq_epimorphisms_iff
File: Mathlib/CategoryTheory/ConcreteCategory/EpiMono.lean

tactic: constructor
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
⊢ MorphismProperty.surjective C = epimorphisms C ↔ (forget C).PreservesEpimorphisms
state_after: case mp
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
⊢ MorphismProperty.surjective C = epimorphisms C → (forget C).PreservesEpimorphisms

case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
⊢ (forget C).PreservesEpimorphisms → MorphismProperty.surjective C = epimorphisms C

tactic: intro h
state_before: case mp
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
⊢ MorphismProperty.surjective C = epimorphisms C → (forget C).PreservesEpimorphisms
state_after: case mp
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
⊢ (forget C).PreservesEpimorphisms

tactic: constructor
state_before: case mp
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
⊢ (forget C).PreservesEpimorphisms
state_after: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
⊢ ∀ {X Y : C} (f : X ⟶ Y) [inst : Epi f], Epi ((forget C).map f)

tactic: rintro _ _ f (hf : epimorphisms C f)
state_before: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
⊢ ∀ {X Y : C} (f : X ⟶ Y) [inst : Epi f], Epi ((forget C).map f)
state_after: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ Epi ((forget C).map f)

tactic: rw [epi_iff_surjective]
state_before: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ Epi ((forget C).map f)
state_after: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ Function.Surjective ((forget C).map f)

tactic: rw [← h] at hf
state_before: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ Function.Surjective ((forget C).map f)
state_after: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : MorphismProperty.surjective C f
⊢ Function.Surjective ((forget C).map f)

tactic: exact hf
state_before: case mp.preserves
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
h : MorphismProperty.surjective C = epimorphisms C
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : MorphismProperty.surjective C f
⊢ Function.Surjective ((forget C).map f)
state_after: no goals

tactic: intro
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
⊢ (forget C).PreservesEpimorphisms → MorphismProperty.surjective C = epimorphisms C
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
⊢ MorphismProperty.surjective C = epimorphisms C

tactic: apply le_antisymm (surjective_le_epimorphisms C)
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
⊢ MorphismProperty.surjective C = epimorphisms C
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
⊢ epimorphisms C ≤ MorphismProperty.surjective C

tactic: intro _ _ f hf
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
⊢ epimorphisms C ≤ MorphismProperty.surjective C
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ MorphismProperty.surjective C f

tactic: have : Epi f := hf
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
⊢ MorphismProperty.surjective C f
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ MorphismProperty.surjective C f

tactic: change Function.Surjective ((forget C).map f)
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ MorphismProperty.surjective C f
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ Function.Surjective ((forget C).map f)

tactic: rw [← epi_iff_surjective]
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ Function.Surjective ((forget C).map f)
state_after: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ Epi ((forget C).map f)

tactic: infer_instance
state_before: case mpr
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
a✝ : (forget C).PreservesEpimorphisms
X✝ Y✝ : C
f : X✝ ⟶ Y✝
hf : epimorphisms C f
this : Epi f
⊢ Epi ((forget C).map f)
state_after: no goals