Theorem: Fin.coe_orderIso_apply
File: Mathlib/Data/Fin/Basic.lean

tactic: rcases i with ⟨i, hi⟩
state_before: n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i : Fin n
⊢ ↑(↑e i) = ↑i

tactic: dsimp only
state_before: case mk
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i : ℕ
hi : i < n
⊢ ↑(↑e { val := i, isLt := hi }) = ↑{ val := i, isLt := hi }

tactic: induction' i using Nat.strong_induction_on with i h
state_before: case mk
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i : ℕ
hi : i < n
⊢ ↑(↑e { val := i, isLt := hi }) = i

tactic: refine' le_antisymm (forall_lt_iff_le.1 fun j hj => _) (forall_lt_iff_le.1 fun j hj => _)
state_before: case mk.h
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
⊢ ↑(↑e { val := i, isLt := hi }) = i

tactic: have := e.symm.lt_iff_lt.2 (mk_lt_of_lt_val hj)
state_before: case mk.h.refine'_1
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < ↑(↑e { val := i, isLt := hi })
⊢ j < i

tactic: rw [e.symm_apply_apply] at this
state_before: case mk.h.refine'_1
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < ↑(↑e { val := i, isLt := hi })
this : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < ↑(OrderIso.symm e) (↑e { val := i, isLt := hi })
⊢ j < i

tactic: have : _ < i := this
state_before: case mk.h.refine'_1
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < ↑(↑e { val := i, isLt := hi })
this : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }
⊢ j < i

tactic: convert this
state_before: case mk.h.refine'_1
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < ↑(↑e { val := i, isLt := hi })
this✝ : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }
this : ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) }) < i
⊢ j < i

tactic: simpa using h _ this (e.symm _).is_lt
state_before: case h.e'_3
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < ↑(↑e { val := i, isLt := hi })
this✝ : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }
this : ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) }) < i
⊢ j = ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) })

tactic: rwa [← h j hj (hj.trans hi), ← lt_iff_val_lt_val, e.lt_iff_lt]
state_before: case mk.h.refine'_2
n m : ℕ
α : Type ?u.29565
inst✝ : Preorder α
e : Fin n ≃o Fin m
i✝ : ℕ
hi✝ : i✝ < n
i : ℕ
h : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1
hi : i < n
j : ℕ
hj : j < i
⊢ j < ↑(↑e { val := i, isLt := hi })