Documentation

Mathlib.Algebra.Group.Fin.Basic

Fin is a group #

This file contains the additive and multiplicative monoid instances on Fin n.

See note [foundational algebra order theory].

Instances #

Note this is more general than Fin.addCommGroup as it applies (vacuously) to Fin 0 too.

Equations

Note this is more general than Fin.addCommGroup as it applies (vacuously) to Fin 0 too.

Note this is more general than Fin.addCommGroup as it applies (vacuously) to Fin 0 too.

Equations

Note this is more general than Fin.addCommGroup as it applies (vacuously) to Fin 0 too.

Equations

Miscellaneous lemmas #

theorem Fin.coe_sub_one {n : ℕ} (a : Fin (n + 1)) :
↑(a - 1) = if a = 0 then n else ↑a - 1
@[simp]
theorem Fin.lt_sub_iff {n : ℕ} {a b : Fin n} :
a < a - b ↔ a < b
@[simp]
theorem Fin.sub_le_iff {n : ℕ} {a b : Fin n} :
a - b ≤ a ↔ b ≤ a
@[simp]
theorem Fin.lt_one_iff {n : ℕ} (x : Fin (n + 2)) :
x < 1 ↔ x = 0
theorem Fin.lt_sub_one_iff {n : ℕ} {k : Fin (n + 2)} :
k < k - 1 ↔ k = 0
@[simp]
theorem Fin.le_sub_one_iff {n : ℕ} {k : Fin (n + 1)} :
k ≤ k - 1 ↔ k = 0
theorem Fin.sub_one_lt_iff {n : ℕ} {k : Fin (n + 1)} :
k - 1 < k ↔ 0 < k
@[simp]
theorem Fin.neg_last (n : ℕ) :
-last n = 1
theorem Fin.neg_natCast_eq_one (n : ℕ) :
-↑n = 1
theorem Fin.rev_add {n : ℕ} (a b : Fin n) :
(a + b).rev = a.rev - b
theorem Fin.rev_sub {n : ℕ} (a b : Fin n) :
(a - b).rev = a.rev + b
theorem Fin.add_lt_left_iff {n : ℕ} {a b : Fin n} :
a + b < a ↔ b.rev < a