Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Teorema 3.2.2: the formula am=2T∫0Tfcos⁡(ωmt) dta_m = \frac{2}{T}\int_0^T f\cos(\omega_m t)\,dtam​=T2​∫0T​fcos(ωm​t)dt recovers ama_mam​

Proved
AnaliseDeFourier.coeffA_trigPoly

by LG · Sep 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysisfourier-seriesharmonic-analysis

This is the cosine half of Teorema 3.2.2, in the finite (trigonometric polynomial) regime where no convergence hypothesis is needed.

Let T>0T>0T>0, let a,b:Z→Ra,b:\mathbb{Z}\to\mathbb{R}a,b:Z→R be coefficient families, let NNN be a degree and let 0≤m≤N0 \le m \le N0≤m≤N. Write ωk=2πk/T\omega_k = 2\pi k/Tωk​=2πk/T and let

f(t)=a02+∑n=1N[ancos⁡(ωnt)+bnsin⁡(ωnt)].f(t) = \frac{a_0}{2} + \sum_{n=1}^{N}\bigl[a_n\cos(\omega_n t) + b_n\sin(\omega_n t)\bigr].f(t)=2a0​​+n=1∑N​[an​cos(ωn​t)+bn​sin(ωn​t)].

Then the integral formula (3.23) returns the coefficient it should:

2T∫0Tf(t)cos⁡(ωmt) dt=am.\frac{2}{T}\int_0^T f(t)\cos(\omega_m t)\,dt = a_m .T2​∫0T​f(t)cos(ωm​t)dt=am​.

The case m=0m=0m=0 is included and reproduces the book's formula (3.23a) for a0a_0a0​, in accordance with Observação 3.2.1: because cos⁡0=1\cos 0 = 1cos0=1, the formula for ana_nan​ at n=0n=0n=0 is the formula for a0a_0a0​. This is the finite, hypothesis-free form of the book's derivation, which for an infinite series requires an unstated convergence assumption.

Preamble
import Mathlib
import Definitions.Def_analise_de_fourier_core

open MeasureTheory
Formal statement
namespace AnaliseDeFourier

theorem coeffA_trigPoly (T : ℝ) (hT : 0 < T) (a b : ℤ → ℝ) (N m : ℕ) (hm : m ≤ N) :
    coeffA T (trigPoly T a b N) (m : ℤ) = a (m : ℤ) := by sorry

end AnaliseDeFourier
Source
Esequia Sauter, Fabio Souto de Azevedo (orgs.), Analise de Fourier - Um Livro Colaborativo, UFRGS/REAMAT, 26 July 2022, https://www.ufrgs.br/reamat/TransformadasIntegrais/livro-af/main.html, Teorema 3.2.2 and eq. (3.23a)-(3.23b), Observacao 3.2.1, pp. 19-20; trigonometric polynomial: Definicao 3.2.1, p. 17
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) - NON-BLIND: same agent that authored the statements

Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements of this proposal, at the explicit instruction of the proposal owner. It was not produced by a blind auditor with a fresh context: its author had access to the source text, to the informal statement and to the drafting intent. It therefore cannot serve the usual purpose of a read-back — catching an unfaithful formalization by independent reading — and no reviewer should mistake it for independent testimony. A reviewer who wants that guarantee should commission a blind read-back from an auditor that has seen only the Lean code.

Let TTT be a real number with T>0T>0T>0, let aaa and bbb be arbitrary functions from the integers to the reals, let NNN and mmm be natural numbers with m≤Nm \le Nm≤N, and write ωT(k)=2πk/T\omega_T(k)=2\pi k/TωT​(k)=2πk/T.

Let TP\mathrm{TP}TP denote the degree-NNN trigonometric polynomial built from aaa and bbb,

TP(t)  =  a(0)2  +  ∑n=1N[a(n)cos⁡(ωT(n)t)+b(n)sin⁡(ωT(n)t)],\mathrm{TP}(t) \;=\; \frac{a(0)}{2} \;+\; \sum_{n=1}^{N}\Bigl[a(n)\cos\bigl(\omega_T(n)t\bigr) + b(n)\sin\bigl(\omega_T(n)t\bigr)\Bigr],TP(t)=2a(0)​+n=1∑N​[a(n)cos(ωT​(n)t)+b(n)sin(ωT​(n)t)],

the sum being over integers nnn with 1≤n≤N1\le n\le N1≤n≤N and empty when N=0N=0N=0.

The statement asserts that the cosine coefficient functional applied to this function at index mmm returns a(m)a(m)a(m):

2T∫0TTP(t) cos⁡(ωT(m) t) dt  =  a(m),\frac{2}{T}\int_0^T \mathrm{TP}(t)\,\cos\bigl(\omega_T(m)\,t\bigr)\,dt \;=\; a(m),T2​∫0T​TP(t)cos(ωT​(m)t)dt=a(m),

the integral being the oriented Lebesgue integral over the interval from 000 to TTT, and mmm being read as an integer on both sides.

The index mmm is a natural number, so m=0m=0m=0 is included: in that case the assertion reads 2T∫0TTP(t) dt=a(0)\frac{2}{T}\int_0^T \mathrm{TP}(t)\,dt = a(0)T2​∫0T​TP(t)dt=a(0), since ωT(0)=0\omega_T(0)=0ωT​(0)=0 and cos⁡0=1\cos 0 = 1cos0=1. The hypothesis m≤Nm \le Nm≤N restricts the claim to indices present in the polynomial; nothing is asserted for m>Nm>Nm>N. The values a(k)a(k)a(k) and b(k)b(k)b(k) for k<0k<0k<0, and b(0)b(0)b(0), play no role. No integrability hypothesis is needed, the integrand being continuous.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me