The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.List.FinRange

9 declarations. Mathlib docs · Source

theorem List.count_finRange E0 #

∀ {n : ℕ} (a : Fin n), List.count a (List.finRange n) = 1

theorem List.idxOf_finRange E0 #

∀ {k : ℕ} (i : Fin k), List.idxOf i (List.finRange k) = ↑i

theorem List.ofFn_eq_pmap E1 #

∀ {α : Type u} {n : ℕ} {f : Fin n → α}, List.ofFn f = List.pmap (fun i hi ↦ f ⟨i, hi⟩) (List.range n) ⋯

theorem List.ofFn_id E1 #

∀ (n : ℕ), List.ofFn id = List.finRange n

theorem List.ofFn_eq_map E1 #

∀ {α : Type u} {n : ℕ} {f : Fin n → α}, List.ofFn f = List.map f (List.finRange n)

theorem List.nodup_ofFn_ofInjective E1 #

∀ {α : Type u} {n : ℕ} {f : Fin n → α}, Function.Injective f → (List.ofFn f).Nodup

theorem List.nodup_ofFn E1 #

∀ {α : Type u} {n : ℕ} {f : Fin n → α}, (List.ofFn f).Nodup ↔ Function.Injective f

theorem Equiv.Perm.map_finRange_perm E0 #

∀ {n : ℕ} (σ : Equiv.Perm (Fin n)), (List.map (⇑σ) (List.finRange n)).Perm (List.finRange n)

theorem Equiv.Perm.ofFn_comp_perm E1 #

∀ {n : ℕ} {α : Type u} (σ : Equiv.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.