Theorem: CategoryTheory.MorphismProperty.comp_eq_top_iff
File: Mathlib/CategoryTheory/MorphismProperty/Factorization.lean

tactic: constructor
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
⊢ W₁.comp W₂ = ⊤ ↔ W₁.HasFactorization W₂
state_after: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
⊢ W₁.comp W₂ = ⊤ → W₁.HasFactorization W₂

case mpr
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
⊢ W₁.HasFactorization W₂ → W₁.comp W₂ = ⊤

tactic: intro h
state_before: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
⊢ W₁.comp W₂ = ⊤ → W₁.HasFactorization W₂
state_after: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
⊢ W₁.HasFactorization W₂

tactic: refine ⟨fun f => ?_⟩
state_before: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
⊢ W₁.HasFactorization W₂
state_after: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ Nonempty (W₁.MapFactorizationData W₂ f)

tactic: have : W₁.comp W₂ f := by simp only [h, top_apply]
state_before: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ Nonempty (W₁.MapFactorizationData W₂ f)
state_after: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
X✝ Y✝ : C
f : X✝ ⟶ Y✝
this : W₁.comp W₂ f
⊢ Nonempty (W₁.MapFactorizationData W₂ f)

tactic: exact ⟨this.some⟩
state_before: case mp
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
X✝ Y✝ : C
f : X✝ ⟶ Y✝
this : W₁.comp W₂ f
⊢ Nonempty (W₁.MapFactorizationData W₂ f)
state_after: no goals

tactic: simp only [h, top_apply]
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
h : W₁.comp W₂ = ⊤
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ W₁.comp W₂ f
state_after: no goals

tactic: intro
state_before: case mpr
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
⊢ W₁.HasFactorization W₂ → W₁.comp W₂ = ⊤
state_after: case mpr
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
⊢ W₁.comp W₂ = ⊤

tactic: ext X Y f
state_before: case mpr
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
⊢ W₁.comp W₂ = ⊤
state_after: case mpr.h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
X Y : C
f : X ⟶ Y
⊢ W₁.comp W₂ f ↔ ⊤ f

tactic: simp only [top_apply, iff_true]
state_before: case mpr.h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
X Y : C
f : X ⟶ Y
⊢ W₁.comp W₂ f ↔ ⊤ f
state_after: case mpr.h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
X Y : C
f : X ⟶ Y
⊢ W₁.comp W₂ f

tactic: exact ⟨factorizationData W₁ W₂ f⟩
state_before: case mpr.h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
W₁ W₂ : MorphismProperty C
a✝ : W₁.HasFactorization W₂
X Y : C
f : X ⟶ Y
⊢ W₁.comp W₂ f
state_after: no goals