Round-six lemma `fsI_runs`
ProvedJ6A.FS.fsI_runsAn 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.J6AIL13):
theorem J6A.FS.fsI_runs (s : IState HS) (F : Fin HS → List ℤ) (dF : Fin HS) (hQ : ∀ i, F (Q dF i) = [])
(w f a y : ℤ) :
IRuns I iprog (.seq (.op (.dup (Q dF 3) dF)) (.seq (.op (.dup (Q dF 2) dF))
(.seq (.op (.dup (Q dF 1) dF)) (.seq (.op (.dup (Q dF 0) dF))
(.seq (.op (.drop (Q dF 0))) (.seq (.op (.drop (Q dF 1))) (.seq (.op (.drop (Q dF 2)))
(.op (.drop (Q dF 3))))))))))
(encK s (fsG F dF w f a y)) (encK s (update F dF (w :: f :: a :: y :: F dF)))
(cFsI w f a y)
Context. A lines, IL side 13: the fine-descriptor set-ups
For a fine descriptor descFine w f a y with w = p + 2, f a literal and a, y expressions in
the registers of parAX X:
fsR X ea ey fl Q: enter the register file,parAX X, pushw, f, a, yon four temporariesQ 0 … Q 3(outsiderg, away fromdF), leave the register file;fsUp: then copyy, a, f, wontodFand drop the temporaries;fsDn: drop four fromdF.
fsUp_runs / fsDn_runs.
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_R6_Defs64
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open J6A J6A.FS
open IntMul NLogN NLogN.KIL NLogN.RS J6Seg.PJ IntMul.HvdH Function J6A.PA IntMul.Kappa.R6
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
theorem J6A.FS.fsI_runs (s : IState HS) (F : Fin HS → List ℤ) (dF : Fin HS) (hQ : ∀ i, F (Q dF i) = [])
(w f a y : ℤ) :
IRuns I iprog (.seq (.op (.dup (Q dF 3) dF)) (.seq (.op (.dup (Q dF 2) dF))
(.seq (.op (.dup (Q dF 1) dF)) (.seq (.op (.dup (Q dF 0) dF))
(.seq (.op (.drop (Q dF 0))) (.seq (.op (.drop (Q dF 1))) (.seq (.op (.drop (Q dF 2)))
(.op (.drop (Q dF 3))))))))))
(encK s (fsG F dF w f a y)) (encK s (update F dF (w :: f :: a :: y :: F dF)))
(cFsI w f a y) := by sorry