Finite sets made of a range of elements. #
Main declarations #
Finset constructions #
Finset.range: For anyn : ℕ,range nis equal to{0, 1, ... , n - 1} ⊆ ℕ. This convention is consistent with other languages and normalizescard (range n) = n. Beware,nis not inrange n.
Tags #
finite sets, finset
range #
range n is the set of natural numbers less than n.
Equations
- Finset.range n = { val := Multiset.range n, nodup := ⋯ }
Instances For
Alias of the reverse direction of Finset.range_subset.
Alias of the reverse direction of Finset.nonempty_range_iff.
Equivalence between the set of natural numbers which are ≥ k and ℕ, given by n → n - k.
Equations
- notMemRangeEquiv k = { toFun := fun (i : { n : ℕ // n ∉ Multiset.range k }) => ↑i - k, invFun := fun (j : ℕ) => ⟨j + k, ⋯⟩, left_inv := ⋯, right_inv := ⋯ }
Instances For
@[simp]
theorem
coe_notMemRangeEquiv
(k : ℕ)
:
⇑(notMemRangeEquiv k) = fun (i : { n : ℕ // n ∉ Multiset.range k }) => ↑i - k
@[simp]