-- Mathlib/Order/Basic.lean
theorem Preorder.toLE_injective : Function.Injective (@Preorder.toLE α) :=
  fun A B h ↦ match A, B with
  | { lt := A_lt, lt_iff_le_not_le := A_iff, .. },
    { lt := B_lt, lt_iff_le_not_le := B_iff, .. } => by
    cases h
    have : A_lt = B_lt

Proof state:
case h.h
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
a b : α
⊢ (a < b) = (a < b)

Tactic:
rw [A_iff, B_iff]

Result:
no goals

Proof state:
case refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Tactic:
have : A_lt = B_lt := by
  funext a b
  show (LT.mk A_lt).lt a b = (LT.mk B_lt).lt a b
  rw [A_iff, B_iff]

Result:
case refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
this : A_lt = B_lt
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Proof state:
case refl.refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Tactic:
congr

Result:
no goals

Proof state:
case h.h
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
a b : α
⊢ A_lt a b = B_lt a b

Tactic:
show (LT.mk A_lt).lt a b = (LT.mk B_lt).lt a b

Result:
case h.h
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
a b : α
⊢ (a < b) = (a < b)

Proof state:
case refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
this : A_lt = B_lt
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Tactic:
cases this

Result:
case refl.refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Proof state:
α : Type u_2
A B : Preorder α
le✝¹ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
le✝ B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
h : toLE = toLE
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Tactic:
cases h

Result:
case refl
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
⊢ mk le_refl✝¹ le_trans✝¹ A_iff = mk le_refl✝ le_trans✝ B_iff

Proof state:
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
⊢ A_lt = B_lt

Tactic:
funext a b

Result:
case h.h
α : Type u_2
A B : Preorder α
le✝ A_lt : α → α → Prop
le_refl✝¹ : ∀ (a : α), a ≤ a
le_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
A_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
B_lt : α → α → Prop
le_refl✝ : ∀ (a : α), a ≤ a
le_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
B_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a
a b : α
⊢ A_lt a b = B_lt a b