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)
[DecidablePred p]
(pp : Function.Periodic p a)
:
(Multiset.filter p (Multiset.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.
theorem
Nat.filter_Ico_card_eq_of_periodic
(n a : ℕ)
(p : ℕ → Prop)
[DecidablePred 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.