The simulation theorem (round six, `sim`)
ProvedNLogN.KIL.RSim.simThe simulation theorem.
The following holds (Lean statement, in the scope of module Solutions.KIL4Sim):
theorem NLogN.KIL.RSim.sim {π : PMap} (hπ : PLow π) {p p' : RS} (h : RSim π p p') :
(∀ i v, π i = some v → i ∉ p.writes) → ∀ s, PV π s → p.ok s →
p'.ok s ∧ p'.run s = p.run s ∧ p'.cost s ≤ 200 * p.cost s
Context. KIL4: literal-to-register simulation of register programs
The KIL1–KIL3 programs carry the sizes of a configuration (field sizes, volumes, the modulus,
pass counts, …) as literals Ex.lit v. A uniform program reads them from parameter stacks
instead. RSim π p p' says that p' is p with some literal occurrences .lit v replaced by
register reads .reg i, where the parameter map π says π i = some v.
RSim.sim: on a state where every parameter stack i holds v on top (PV π s) and is not
written by p, the program p' is executable whenever p is, ends in the same state, and costs at
most 200 × the cost of p (a register read costs at most 200 × a literal of the same value).
Hence every KIL specification Sp p s t c transfers to Sp p' s t (200 * c) (Sp.sim).
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.KIL open IntMul NLogN.RS
theorem NLogN.KIL.RSim.sim {π : PMap} (hπ : PLow π) {p p' : RS} (h : RSim π p p') :
(∀ i v, π i = some v → i ∉ p.writes) → ∀ s, PV π s → p.ok s →
p'.ok s ∧ p'.run s = p.run s ∧ p'.cost s ≤ 200 * p.cost s := by sorry