Documentation

Mathlib.Data.List.FinRange

Lists of elements of Fin n #

This file develops some results on finRange n.

@[simp]
theorem List.mem_finRange {n : } (a : Fin n) :
theorem List.nodup_finRange (n : ) :
(finRange n).Nodup
@[simp]
theorem List.finRange_eq_nil {n : } :
finRange n = [] n = 0
theorem List.pairwise_lt_finRange (n : ) :
Pairwise (fun (x1 x2 : Fin n) => x1 < x2) (finRange n)
theorem List.pairwise_le_finRange (n : ) :
Pairwise (fun (x1 x2 : Fin n) => x1 x2) (finRange n)
theorem List.get_finRange {n i : } (h : i < (finRange n).length) :
(finRange n).get i, h = i,
@[deprecated List.get_finRange (since := "2024-08-19")]
theorem List.nthLe_finRange {n i : } (h : i < (finRange n).length) :
(finRange n).get i, h = i,

Alias of List.get_finRange.

@[simp]
theorem List.finRange_map_get {α : Type u} (l : List α) :
map l.get (finRange l.length) = l
@[simp]
theorem List.indexOf_finRange {k : } (i : Fin k) :
indexOf i (finRange k) = i
theorem List.ofFn_eq_pmap {α : Type u} {n : } {f : Fin nα} :
ofFn f = pmap (fun (i : ) (hi : i < n) => f i, hi) (range n)
theorem List.ofFn_eq_map {α : Type u} {n : } {f : Fin nα} :
ofFn f = map f (finRange n)
theorem List.nodup_ofFn_ofInjective {α : Type u} {n : } {f : Fin nα} (hf : Function.Injective f) :
(ofFn f).Nodup
theorem List.nodup_ofFn {α : Type u} {n : } {f : Fin nα} :
theorem Equiv.Perm.map_finRange_perm {n : } (σ : Perm (Fin n)) :
(List.map (⇑σ) (List.finRange n)).Perm (List.finRange n)
theorem Equiv.Perm.ofFn_comp_perm {n : } {α : Type u} (σ : Perm (Fin n)) (f : Fin nα) :
(List.ofFn (f σ)).Perm (List.ofFn f)

The list obtained from a permutation of a tuple f is permutation equivalent to the list obtained from f.