Mathlib.Data.Nat.Periodic
6 declarations. Mathlib docs · Source
theorem Nat.periodic_gcd E1 #
∀ (a : ℕ), Function.Periodic a.gcd a
theorem Nat.periodic_coprime E1 #
∀ (a : ℕ), Function.Periodic a.Coprime a
theorem Nat.periodic_mod E1 #
∀ (a : ℕ), Function.Periodic (fun n ↦ n % a) a
theorem Function.Periodic.map_mod_nat E0 #
∀ {α : Type u_1} {f : ℕ → α} {a : ℕ}, Function.Periodic f a → ∀ (n : ℕ), f (n % a) = f n
theorem Nat.filter_multiset_Ico_card_eq_of_periodic E1 #
∀ (n a : ℕ) (p : ℕ → Prop) [inst : DecidablePred p],
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 E1 #
∀ (n a : ℕ) (p : ℕ → Prop) [inst : DecidablePred p],
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.