Round-six lemma `xorGen_fsp`
ProvedNLogN.KFL.xorGen_fspAn auxiliary lemma of the round-six development, published as a separate node because its proof is long or shared.
The following holds (Lean statement, in the scope of module Solutions.KFLXor):
theorem NLogN.KFL.xorGen_fsp {d Q j : ℕ} (hd : 0 < d) (hQ : 0 < Q) {Bb : ℕ} (hB2 : 2 ≤ Bb)
(zd : zsz (d : ℤ) ≤ Bb) (zQ : zsz (Q : ℤ) ≤ Bb) (zr : zsz ((2 : ℤ) ^ j) ≤ Bb)
(P : ℕ) (zP : zsz (P : ℤ) ≤ Bb)
(s : IState HS) (F : Fin HS → List ℤ) (hq : F rq = []) :
FSp (xorGen d Q j P) (encK s F)
(encK s (Function.update F 14
((List.range P).map (fun p => (xorA d Q j p : ℤ)) ++ F 14)))
(cXorGen P Bb)
Context. KFL §8: the last selected bit (two-bit XOR)
xorStep: table b(c₀) = bit j of c₀ (j = ρ + (f-1)K, xorGen), then rotF on the view
[N0·Q·N1·E, 2, D·S1] (D = 2^j, Q = 2 D E): the bit j of the y chunk is flipped iff bit
j of x is set. xorStep_geo: the result is rixT g (XLc K ρ f).
Formalization Note. Part of the Lean formalization of the round-six κ-improvement (integer-multiplication-kappa campaign, target IntMul.Kappa.jain_round6_framework). The statement is copied verbatim from the Lean development; the platform node carries the same declaration name. Definitions it mentions live in the IntMul_Kappa_R6_Defs* bundles (on top of the published κ bundles IntMul_Kappa_K_Defs*).
-- Round-six κ development (integer-multiplication-kappa), generated by skeleton subtraction. import Definitions.Def_IntMul_Kappa_K_Defs33 import Definitions.Def_IntMul_Kappa_R6_Defs1 import Mathlib import Definitions.Def_IntMul_HvdH_M_Defs8 import Definitions.Def_IntMul_MultitapeModel set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open NLogN NLogN.KFL open IntMul NLogN.RS NLogN.KIL NLogN.KFD Butterfly AModel
theorem NLogN.KFL.xorGen_fsp {d Q j : ℕ} (hd : 0 < d) (hQ : 0 < Q) {Bb : ℕ} (hB2 : 2 ≤ Bb)
(zd : zsz (d : ℤ) ≤ Bb) (zQ : zsz (Q : ℤ) ≤ Bb) (zr : zsz ((2 : ℤ) ^ j) ≤ Bb)
(P : ℕ) (zP : zsz (P : ℤ) ≤ Bb)
(s : IState HS) (F : Fin HS → List ℤ) (hq : F rq = []) :
FSp (xorGen d Q j P) (encK s F)
(encK s (Function.update F 14
((List.range P).map (fun p => (xorA d Q j p : ℤ)) ++ F 14)))
(cXorGen P Bb) := by sorry