Documentation

Mathlib.Data.List.FinRange

Lists of elements of Fin n #

This file develops some results on finRange n.

@[simp]
theorem List.count_finRange {n : ℕ} (a : Fin n) :
count a (finRange n) = 1
@[simp]
theorem List.idxOf_finRange {k : ℕ} (i : Fin k) :
idxOf 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) :
theorem List.nodup_ofFn {α : Type u} {n : ℕ} {f : Fin 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.