Ramanujan's Lost Notebook Part II, Ch. 12: ch12Phase
DefinitionRamanujanLostNotebook_PartII_ch12_ch12Phasenumber-theoryramanujan-lost-notebook
The integer ac+bd, choosing a=ch12Inverse c d and b=(ad−1)/c, hence ad−bc=1 on the primitive representative locus. Integer subtraction is essential.
Definition code
import Mathlib import Definitions.Def_RamanujanLostNotebook_PartII_ch12_ch12Inverse namespace RamanujanLostNotebook.PartII /-- The integer ac+bd, choosing a=ch12Inverse c d and b=(ad−1)/c, hence ad−bc=1 on the primitive representative locus. Integer subtraction is essential. -/ def ch12Phase (c d : ℕ) : ℤ := let a : ℤ := ch12Inverse c d a * c + ((a * d - 1) / (c : ℤ)) * d end RamanujanLostNotebook.PartII
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part II, Springer 2009, Chapter 12.