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 / V02. Numbers

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.