One inverse (DIT) transform pass over all levels of a Fermat-ring tensor
ProvedNLogN.FW.passT_specLet be a list of canonical residues modulo on stack XD, and let be a list of level descriptors satisfying LvlOK n kb W N J D (each level splits the array into blocks of columns of length with , , ), encoded as 8 integers per level (enc8) on the source stack. With , , and the registers holding , , , , , the program passP with the inverse (DIT) butterfly procedure replaces by lvls (Gt n = ditZ (2^n+1) n) D A (the inverse (DIT) radix-2 Fermat transform of every column of every level, applied level by level), moves the descriptor list to the other descriptor stack (reversed), within cost passCost |D| n kb W N J.
Formalization Note. difZ/ditZ are the decimation-in-frequency / -time transforms with root -power of the published Def_IntMul_HvdH_MachineRef; each column transform is a call of procedure 2 or 3. The machine layer: IState HS is a state with stacks of items (Item = integer or mark), an input position and an output; RM programs (straight-line register code RS, loops rep, conditionals, calls of the multiplication procedure through a MulSpec giving its domain and cost) have a functional semantics p.run s, a definedness predicate p.ok M s and a cost p.cost M s; Spec M p s s' c abbreviates p.ok M s ∧ p.run s = s' ∧ p.cost M s ≤ c. ints L / gints U push an integer list / a list of pairs as items (head = top); zsz z is the bit length of . MulBnd M m Φ says the multiplication procedure accepts all pairs of integers of bit length at cost . Register names (GU, CR, KB, XN, …) are fixed stack indices.
-- Harvey–van der Hoeven multitape-TM development (NLogN), generated by skeleton subtraction. import Definitions.Def_IntMul_HvdH_M_Defs4 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 set_option linter.unusedSimpArgs false set_option linter.unusedVariables false open NLogN open NLogN.FW open IntMul IntMul.HvdH NLogN
theorem NLogN.FW.passT_spec (M : MulSpec) (n kb W N J : ℕ) (D : List Desc) (hD : LvlOK n kb W N J D)
(hn : 1 ≤ n) (hN : N ≤ 2 ^ kb) (hW : 2 * n + kb + 3 ≤ W) (hJ : J + 1 ≤ W)
(hmW : zsz (D.length : ℤ) ≤ W)
(s : IState HS) (A : List ℤ) (RD Rs LK LN LXN LXF LM : List Item)
(hAl : A.length = N) (hAc : Canon (2 ^ n + 1) A) (hX : s.G XD = ints A ++ RD)
(hsrc : s.G AXR = ints (D.flatMap enc8) ++ Rs) (hK : s.G KBR = .int kb :: LK)
(hNN : s.G NN = .int (N : ℤ) :: LN) (hXN : s.G NLogN.FW.XN = .int (2 ^ n) :: LXN)
(hXF : s.G XF = .int (2 ^ n + 1) :: LXF) (hM : s.G NAX = .int (D.length : ℤ) :: LM) :
Spec M (passP AXR AXS ditPrc) s
(((s.upd XD (ints (lvls (Gt n) D A) ++ RD)).upd AXR Rs).upd AXS
(ints (D.flatMap enc8).reverse ++ s.G AXS))
(passCost D.length n kb W N J) := by sorry