Periodic Functions on ℕ #
This file identifies a few functions on ℕ
which are periodic, and also proves a lemma about
periodic predicates which helps determine their cardinality when filtering intervals over them.
theorem
function.periodic.map_mod_nat
{α : Type u_1}
{f : ℕ → α}
{a : ℕ}
(hf : function.periodic f a)
(n : ℕ) :
theorem
nat.filter_multiset_Ico_card_eq_of_periodic
(n a : ℕ)
(p : ℕ → Prop)
[decidable_pred p]
(pp : function.periodic p a) :
⇑multiset.card (multiset.filter p (multiset.Ico n (n + a))) = nat.count p a
An interval of length a
filtered over a periodic predicate of period a
has cardinality
equal to the number naturals below a
for which p a
is true.
theorem
nat.filter_Ico_card_eq_of_periodic
(n a : ℕ)
(p : ℕ → Prop)
[decidable_pred p]
(pp : function.periodic p a) :
(finset.filter p (finset.Ico n (n + a))).card = nat.count p a
An interval of length a
filtered over a periodic predicate of period a
has cardinality
equal to the number naturals below a
for which p a
is true.