Documentation

Mathlib.Data.Fin.SuccPred

Successors and predecessors of Fin n #

In this file, we show that Fin n is both a SuccOrder and a PredOrder. Note that they are also archimedean, but this is derived from the general instance for well-orderings as opposed to a specific Fin instance.

instance Fin.instSuccOrder {n : } :
Equations
theorem Fin.orderSucc_eq {n : } :
Order.succ = fun (i : Fin (n + 1)) => lastCases (last n) succ i
theorem Fin.orderSucc_apply {n : } (i : Fin (n + 1)) :
@[simp]
@[simp]
@[deprecated Fin.orderSucc_eq (since := "2025-02-06")]
theorem Fin.succ_eq {n : } :
Order.succ = fun (i : Fin (n + 1)) => lastCases (last n) succ i

Alias of Fin.orderSucc_eq.

@[deprecated Fin.orderSucc_apply (since := "2025-02-06")]
theorem Fin.succ_apply {n : } (i : Fin (n + 1)) :

Alias of Fin.orderSucc_apply.

instance Fin.instPredOrder {n : } :
Equations
theorem Fin.orderPred_eq {n : } :
Order.succ = fun (i : Fin (n + 1)) => lastCases (last n) succ i
theorem Fin.orderPred_apply {n : } (i : Fin (n + 1)) :
@[simp]
theorem Fin.orderPred_zero (n : ) :
@[simp]
theorem Fin.orderPred_succ {n : } (i : Fin n) :
@[deprecated Fin.orderPred_eq (since := "2025-02-06")]
theorem Fin.pred_eq {n : } :
Order.succ = fun (i : Fin (n + 1)) => lastCases (last n) succ i

Alias of Fin.orderPred_eq.

@[deprecated Fin.orderPred_apply (since := "2025-02-06")]
theorem Fin.pred_apply {n : } (i : Fin (n + 1)) :

Alias of Fin.orderPred_apply.