# Documentation

Mathlib.Algebra.Periodic

# Periodicity #

In this file we define and then prove facts about periodic and antiperiodic functions.

## Main definitions #

• Function.Periodic: A function f is periodic if ∀ x, f (x + c) = f x. f is referred to as periodic with period c or c-periodic.

• Function.Antiperiodic: A function f is antiperiodic if ∀ x, f (x + c) = -f x. f is referred to as antiperiodic with antiperiod c or c-antiperiodic.

Note that any c-antiperiodic function will necessarily also be 2*c-periodic.

## Tags #

period, periodic, periodicity, antiperiodic

### Periodicity #

def Function.Periodic {α : Type u_1} {β : Type u_2} [Add α] (f : αβ) (c : α) :

A function f is said to be periodic with period c if for all x, f (x + c) = f x.

Instances For
theorem Function.Periodic.funext {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Add α] (h : ) :
(fun x => f (x + c)) = f
theorem Function.Periodic.comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [Add α] (h : ) (g : βγ) :
theorem Function.Periodic.comp_addHom {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [Add α] [Add γ] (h : ) (g : AddHom γ α) (g_inv : αγ) (hg : Function.RightInverse g_inv g) :
Function.Periodic (f g) (g_inv c)
theorem Function.Periodic.add {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [Add β] (hf : ) (hg : ) :
theorem Function.Periodic.mul {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [Mul β] (hf : ) (hg : ) :
theorem Function.Periodic.sub {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [Sub β] (hf : ) (hg : ) :
theorem Function.Periodic.div {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [Div β] (hf : ) (hg : ) :
theorem List.periodic_sum {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] (l : List (αβ)) (hl : ∀ (f : αβ), f l) :
theorem List.periodic_prod {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] (l : List (αβ)) (hl : ∀ (f : αβ), f l) :
theorem Multiset.periodic_sum {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] (s : Multiset (αβ)) (hs : ∀ (f : αβ), f s) :
theorem Multiset.periodic_prod {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] (s : Multiset (αβ)) (hs : ∀ (f : αβ), f s) :
theorem Finset.periodic_sum {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] {ι : Type u_4} {f : ιαβ} (s : ) (hs : ∀ (i : ι), i sFunction.Periodic (f i) c) :
Function.Periodic (Finset.sum s fun i => f i) c
theorem Finset.periodic_prod {α : Type u_1} {β : Type u_2} {c : α} [Add α] [] {ι : Type u_4} {f : ιαβ} (s : ) (hs : ∀ (i : ι), i sFunction.Periodic (f i) c) :
Function.Periodic (Finset.prod s fun i => f i) c
theorem Function.Periodic.vadd {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [Add α] [VAdd γ β] (h : ) (a : γ) :
theorem Function.Periodic.smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [Add α] [SMul γ β] (h : ) (a : γ) :
theorem Function.Periodic.const_smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [] [] (h : ) (a : γ) :
Function.Periodic (fun x => f (a x)) (a⁻¹ c)
theorem Function.Periodic.const_smul₀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [] [Module γ α] (h : ) (a : γ) :
Function.Periodic (fun x => f (a x)) (a⁻¹ c)
theorem Function.Periodic.const_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (a * x)) (a⁻¹ * c)
theorem Function.Periodic.const_inv_smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [] [] (h : ) (a : γ) :
Function.Periodic (fun x => f (a⁻¹ x)) (a c)
theorem Function.Periodic.const_inv_smul₀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [] [Module γ α] (h : ) (a : γ) :
Function.Periodic (fun x => f (a⁻¹ x)) (a c)
theorem Function.Periodic.const_inv_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (a⁻¹ * x)) (a * c)
theorem Function.Periodic.mul_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x * a)) (c * a⁻¹)
theorem Function.Periodic.mul_const' {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x * a)) (c / a)
theorem Function.Periodic.mul_const_inv {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x * a⁻¹)) (c * a)
theorem Function.Periodic.div_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x / a)) (c * a)
theorem Function.Periodic.add_period {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] (h1 : ) (h2 : ) :
Function.Periodic f (c₁ + c₂)
theorem Function.Periodic.sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (x : α) :
f (x - c) = f x
theorem Function.Periodic.sub_eq' {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] (h : ) :
f (c - x) = f (-x)
theorem Function.Periodic.neg {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) :
theorem Function.Periodic.sub_period {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] (h1 : ) (h2 : ) :
Function.Periodic f (c₁ - c₂)
theorem Function.Periodic.const_add {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (a + x)) c
theorem Function.Periodic.add_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x + a)) c
theorem Function.Periodic.const_sub {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (a - x)) c
theorem Function.Periodic.sub_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
Function.Periodic (fun x => f (x - a)) c
theorem Function.Periodic.nsmul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
theorem Function.Periodic.nat_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
Function.Periodic f (n * c)
theorem Function.Periodic.neg_nsmul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
theorem Function.Periodic.neg_nat_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] (h : ) (n : ) :
Function.Periodic f (-(n * c))
theorem Function.Periodic.sub_nsmul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] (h : ) (n : ) :
f (x - n c) = f x
theorem Function.Periodic.sub_nat_mul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [Ring α] (h : ) (n : ) :
f (x - n * c) = f x
theorem Function.Periodic.nsmul_sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] (h : ) (n : ) :
f (n c - x) = f (-x)
theorem Function.Periodic.nat_mul_sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [Ring α] (h : ) (n : ) :
f (n * c - x) = f (-x)
theorem Function.Periodic.zsmul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
theorem Function.Periodic.int_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] (h : ) (n : ) :
Function.Periodic f (n * c)
theorem Function.Periodic.sub_zsmul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] (h : ) (n : ) :
f (x - n c) = f x
theorem Function.Periodic.sub_int_mul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [Ring α] (h : ) (n : ) :
f (x - n * c) = f x
theorem Function.Periodic.zsmul_sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] (h : ) (n : ) :
f (n c - x) = f (-x)
theorem Function.Periodic.int_mul_sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [Ring α] (h : ) (n : ) :
f (n * c - x) = f (-x)
theorem Function.Periodic.eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) :
f c = f 0
theorem Function.Periodic.neg_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) :
f (-c) = f 0
theorem Function.Periodic.nsmul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
f (n c) = f 0
theorem Function.Periodic.nat_mul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
f (n * c) = f 0
theorem Function.Periodic.zsmul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (n : ) :
f (n c) = f 0
theorem Function.Periodic.int_mul_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] (h : ) (n : ) :
f (n * c) = f 0
theorem Function.Periodic.exists_mem_Ico₀ {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : 0 < c) (x : α) :
y, y Set.Ico 0 c f x = f y

If a function f is periodic with positive period c, then for all x there exists some y ∈ Ico 0 c such that f x = f y.

theorem Function.Periodic.exists_mem_Ico {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : 0 < c) (x : α) (a : α) :
y, y Set.Ico a (a + c) f x = f y

If a function f is periodic with positive period c, then for all x there exists some y ∈ Ico a (a + c) such that f x = f y.

theorem Function.Periodic.exists_mem_Ioc {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : 0 < c) (x : α) (a : α) :
y, y Set.Ioc a (a + c) f x = f y

If a function f is periodic with positive period c, then for all x there exists some y ∈ Ioc a (a + c) such that f x = f y.

theorem Function.Periodic.image_Ioc {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : 0 < c) (a : α) :
f '' Set.Ioc a (a + c) =
theorem Function.Periodic.image_Icc {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : 0 < c) (a : α) :
f '' Set.Icc a (a + c) =
theorem Function.Periodic.image_uIcc {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (hc : c 0) (a : α) :
f '' Set.uIcc a (a + c) =
theorem Function.periodic_with_period_zero {α : Type u_1} {β : Type u_2} [] (f : αβ) :
theorem Function.Periodic.map_vadd_zmultiples {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (hf : ) (a : { x // }) (x : α) :
f (a +ᵥ x) = f x
theorem Function.Periodic.map_vadd_multiples {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (hf : ) (a : { x // }) (x : α) :
f (a +ᵥ x) = f x
def Function.Periodic.lift {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (x : ) :
β

Lift a periodic function to a function from the quotient group.

Instances For
@[simp]
theorem Function.Periodic.lift_coe {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] (h : ) (a : α) :
= f a

### Antiperiodicity #

def Function.Antiperiodic {α : Type u_1} {β : Type u_2} [Add α] [Neg β] (f : αβ) (c : α) :

A function f is said to be antiperiodic with antiperiod c if for all x, f (x + c) = -f x.

Instances For
theorem Function.Antiperiodic.funext {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Add α] [Neg β] (h : ) :
(fun x => f (x + c)) = -f
theorem Function.Antiperiodic.funext' {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Add α] [] (h : ) :
(fun x => -f (x + c)) = f
theorem Function.Antiperiodic.periodic {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) :

If a function is antiperiodic with antiperiod c, then it is also periodic with period 2 * c.

theorem Function.Antiperiodic.eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) :
f c = -f 0
theorem Function.Antiperiodic.nat_even_mul_periodic {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) (n : ) :
Function.Periodic f (n * (2 * c))
theorem Function.Antiperiodic.nat_odd_mul_antiperiodic {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) (n : ) :
Function.Antiperiodic f (n * (2 * c) + c)
theorem Function.Antiperiodic.int_even_mul_periodic {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] [] (h : ) (n : ) :
Function.Periodic f (n * (2 * c))
theorem Function.Antiperiodic.int_odd_mul_antiperiodic {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] [] (h : ) (n : ) :
Function.Antiperiodic f (n * (2 * c) + c)
theorem Function.Antiperiodic.sub_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) (x : α) :
f (x - c) = -f x
theorem Function.Antiperiodic.sub_eq' {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} {x : α} [] [Neg β] (h : ) :
f (c - x) = -f (-x)
theorem Function.Antiperiodic.neg {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) :
theorem Function.Antiperiodic.neg_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) :
f (-c) = -f 0
theorem Function.Antiperiodic.nat_mul_eq_of_eq_zero {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) (hi : f 0 = 0) (n : ) :
f (n * c) = 0
theorem Function.Antiperiodic.int_mul_eq_of_eq_zero {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [Ring α] (h : ) (hi : f 0 = 0) (n : ) :
f (n * c) = 0
theorem Function.Antiperiodic.const_add {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) (a : α) :
Function.Antiperiodic (fun x => f (a + x)) c
theorem Function.Antiperiodic.add_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) (a : α) :
Function.Antiperiodic (fun x => f (x + a)) c
theorem Function.Antiperiodic.const_sub {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [] (h : ) (a : α) :
Function.Antiperiodic (fun x => f (a - x)) c
theorem Function.Antiperiodic.sub_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) (a : α) :
Function.Antiperiodic (fun x => f (x - a)) c
theorem Function.Antiperiodic.smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [Add α] [] [] [] (h : ) (a : γ) :
theorem Function.Antiperiodic.const_smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [Neg β] [] [] (h : ) (a : γ) :
Function.Antiperiodic (fun x => f (a x)) (a⁻¹ c)
theorem Function.Antiperiodic.const_smul₀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [Neg β] [] [Module γ α] (h : ) {a : γ} (ha : a 0) :
Function.Antiperiodic (fun x => f (a x)) (a⁻¹ c)
theorem Function.Antiperiodic.const_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (a * x)) (a⁻¹ * c)
theorem Function.Antiperiodic.const_inv_smul {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [Neg β] [] [] (h : ) (a : γ) :
Function.Antiperiodic (fun x => f (a⁻¹ x)) (a c)
theorem Function.Antiperiodic.const_inv_smul₀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {c : α} [] [Neg β] [] [Module γ α] (h : ) {a : γ} (ha : a 0) :
Function.Antiperiodic (fun x => f (a⁻¹ x)) (a c)
theorem Function.Antiperiodic.const_inv_mul {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (a⁻¹ * x)) (a * c)
theorem Function.Antiperiodic.mul_const {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (x * a)) (c * a⁻¹)
theorem Function.Antiperiodic.mul_const' {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (x * a)) (c / a)
theorem Function.Antiperiodic.mul_const_inv {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (x * a⁻¹)) (c * a)
theorem Function.Antiperiodic.div_inv {α : Type u_1} {β : Type u_2} {f : αβ} {c : α} [] [Neg β] (h : ) {a : α} (ha : a 0) :
Function.Antiperiodic (fun x => f (x / a)) (c * a)
theorem Function.Antiperiodic.add {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [] (h1 : ) (h2 : ) :
Function.Periodic f (c₁ + c₂)
theorem Function.Antiperiodic.sub {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [] (h1 : ) (h2 : ) :
Function.Periodic f (c₁ - c₂)
theorem Function.Periodic.add_antiperiod {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [Neg β] (h1 : ) (h2 : ) :
Function.Antiperiodic f (c₁ + c₂)
theorem Function.Periodic.sub_antiperiod {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [] (h1 : ) (h2 : ) :
Function.Antiperiodic f (c₁ - c₂)
theorem Function.Periodic.add_antiperiod_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [Neg β] (h1 : ) (h2 : ) :
f (c₁ + c₂) = -f 0
theorem Function.Periodic.sub_antiperiod_eq {α : Type u_1} {β : Type u_2} {f : αβ} {c₁ : α} {c₂ : α} [] [] (h1 : ) (h2 : ) :
f (c₁ - c₂) = -f 0
theorem Function.Antiperiodic.mul {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [Mul β] [] (hf : ) (hg : ) :
theorem Function.Antiperiodic.div {α : Type u_1} {β : Type u_2} {f : αβ} {g : αβ} {c : α} [Add α] [] [] (hf : ) (hg : ) :
theorem Int.fract_periodic (α : Type u_4) [] :
Function.Periodic Int.fract 1