Schönhage–Strassen: integer multiplication on multitape TMs in time O(n log n log log n)
ProvedNLogN.ss_mulTimeBoundThere is a deterministic multitape Turing machine (in the sense of Def_IntMul_MultitapeModel) multiplying integers in time :
Explicitly: for every there is a bound such that on every input with the machine halts within steps with output , and there are and such that for all this holds with .
The machine is ssMachine, the compilation of the item-language program ssProg (main program, FM, forward FFT, inverse FFT, powers of two). The proof bounds the cost of FM at size by the potential with , , by induction using fmMain_runs (one level costs plus fmLevelCost N, and the parameter inequalities show that the potential absorbs this when ); the main program reads the inputs, calls FM at and writes the product; compiler correctness and multipliesAt_of_exec transfer the bound to the Turing machine.
Formalization Note. Real.log is the natural logarithm (the base only affects the constant), and for small where the bound is only required for . The platform-facing alias is IntMul.TM.schonhage_strassen, with the same statement.
-- Schönhage–Strassen multitape-TM development (NLogN), generated by skeleton subtraction. import Definitions.Def_IntMul_SS_Defs2 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open NLogN open IntMul attribute [local irreducible] fmA
theorem NLogN.ss_mulTimeBound :
MulTimeBound fun n => (n : ℝ) * Real.log n * Real.log (Real.log n) := by sorry