Documentation

CslibFrontier.Algorithms.WordRAM.Auction.Scatter

Scattering object-owner map to output memory for Word-RAM auction #

Writes the length-prefixed assignment list [objectOf 0, …, objectOf (n - 1)] at ws.outBase by scattering the inverse array owner[0..n). Preserves the unsigned cost matrix C at ws.bC so sumScaledCostProg can read it afterward.

Main definitions #

Main results #

Scatter the completed owner[0..n) array to the length-prefixed output list at ws.outBase.

theorem Cslib.Algorithms.WordRAM.Auction.scatterProg_spec {w : ℕ} (ws : AuctionWS) {C : Fin ws.n × Fin ws.n → ℕ} {st : Lean.Assignment.AuctionState ws.n} (hinv : Lean.Assignment.AuctionInv (fun (e : Fin ws.n × Fin ws.n) => ↑(C e)) (↑ws.eps) st) (hfree : st.free = []) (s₀ : DataStructure.Memory.State) (hws : ValidWS ws s₀) (ham : AuctionMem ws C st s₀) (hfit1 : WordRAM.Fits w 1) (hfit_ws : WordRAM.Fits w (ws.outBase + ws.n + 1)) :

Specification of scatterProg: preserves the unsigned cost matrix C at ws.bC and writes [objectOf 0, …, objectOf (n - 1)] as a length-prefixed list at ws.outBase.