Ramanujan's Lost Notebook Part II, Ch. 11: ch11EWeight
DefinitionRamanujanLostNotebook_PartII_ch11_ch11EWeightnumber-theoryramanujan-lost-notebook
Eisenstein cosine weight h_lambda(n), (11.3.7)-(11.3.8), for any integer n. The canonical representative has nonzero denominator 2d-c.
Definition code
import Mathlib
import Definitions.Def_RamanujanLostNotebook_PartII_ch11_ch11Bezout
import Definitions.Def_RamanujanLostNotebook_PartII_ch11_ch11EReps
noncomputable section
namespace RamanujanLostNotebook.PartII
/-- Eisenstein cosine weight h_lambda(n), (11.3.7)-(11.3.8), for any integer n.
The canonical representative has nonzero denominator 2d-c. -/
noncomputable def ch11EWeight (n : ℤ) (la : ℕ) : ℝ :=
if la = 1 then 1 else if la = 3 then -1 else
2 * ∑ cd ∈ ch11EReps la,
let ab := ch11Bezout cd.1 cd.2
Real.cos (((ab.1 * cd.2 + ab.2 * cd.1 - 2 * ab.1 * cd.1 -
2 * ab.2 * cd.2 + (la : ℤ) : ℤ) : ℝ) * (n : ℝ) * Real.pi / la -
6 * Real.arctan ((cd.1 : ℝ) * Real.sqrt 3 / (2 * (cd.2 : ℝ) - cd.1)))
end RamanujanLostNotebook.PartII
end
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part II, Springer 2009, Chapter 11.