Theorem: NonemptyFinLinOrd.mono_iff_injective
File: Mathlib/Order/Category/NonemptyFinLinOrd.lean

Proof steps:
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
⊢ Mono f ↔ Function.Injective ⇑f
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
⊢ Mono f → Function.Injective ⇑f
tactic: refine ⟨?_, ConcreteCategory.mono_of_injective f⟩
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
⊢ Mono f → Function.Injective ⇑f
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
⊢ Function.Injective ⇑f
tactic: intro
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
⊢ Function.Injective ⇑f
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
⊢ a₁ = a₂
tactic: intro a₁ a₂ h
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
⊢ a₁ = a₂
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{?u.18490, 0} (Fin 1))
⊢ a₁ = a₂
tactic: let X := NonemptyFinLinOrd.of (ULift (Fin 1))
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{?u.18490, 0} (Fin 1))
⊢ a₁ = a₂
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
⊢ a₁ = a₂
tactic: let g₁ : X ⟶ A := ⟨fun _ => a₁, fun _ _ _ => by rfl⟩
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
⊢ a₁ = a₂
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
⊢ a₁ = a₂
tactic: let g₂ : X ⟶ A := ⟨fun _ => a₂, fun _ _ _ => by rfl⟩
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
⊢ a₁ = a₂
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
⊢ g₁ { down := 0 } = g₂ { down := 0 }
tactic: change g₁ (ULift.up (0 : Fin 1)) = g₂ (ULift.up (0 : Fin 1))
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
⊢ g₁ { down := 0 } = g₂ { down := 0 }
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
eq : g₁ ≫ f = g₂ ≫ f
⊢ g₁ { down := 0 } = g₂ { down := 0 }
tactic: have eq : g₁ ≫ f = g₂ ≫ f := by
    ext
    exact h
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
eq : g₁ ≫ f = g₂ ≫ f
⊢ g₁ { down := 0 } = g₂ { down := 0 }
state_after: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
eq : g₁ = g₂
⊢ g₁ { down := 0 } = g₂ { down := 0 }
tactic: rw [cancel_mono] at eq
state_before: A B : NonemptyFinLinOrd
f : A ⟶ B
a✝ : Mono f
a₁ a₂ : ↑A
h : f a₁ = f a₂
X : NonemptyFinLinOrd := of (ULift.{u, 0} (Fin 1))
g₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := ⋯ }
g₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := ⋯ }
eq : g₁ = g₂
⊢ g₁ { down := 0 } = g₂ { down := 0 }
state_after: no goals
tactic: rw [eq]