Documentation

CslibFrontier.DataStructure.StateTransition.ExpectedAmortized

Expected-amortized composition with distribution invariants #

expectedAmortizedStep_precompose transports a single step through deterministic preparation. expectedAmortizedSequence telescopes a potential over distributions while retaining a native execution relation. The invariant is indexed by the remaining operations: it can include admissibility, conditional seed laws, representation and trajectory-relative peak bounds. The step supplies native execution composition rather than identifying different machine models. In particular, the state type may retain a seed, returned observations or a transcript.

theorem Cslib.DataStructure.expectedAmortizedStep_precompose {α : Type u_1} (ν : PMF α) (prepare : α → α) (step : α → PMF α) (cost charge potential : α → ENNReal) (hprepare : ∀ a ∈ ν.support, charge (prepare a) + potential (prepare a) = charge a + potential a) (hstep : ∑' (a : α), (PMF.map prepare ν) a * (cost a + ∑' (b : α), (step a) b * potential b) ≤ ∑' (a : α), (PMF.map prepare ν) a * (charge a + potential a)) :
∑' (a : α), ν a * cost (prepare a) + ∑' (b : α), (ν.bind (step ∘ prepare)) b * potential b ≤ ∑' (a : α), ν a * charge a + ∑' (a : α), ν a * potential a

A deterministic preparation that preserves charge plus potential on the support transports the prepared amortized step inequality back to the original distribution. The execution cost is read at each prepared state and the resulting law binds the prepared kernel at those states.

theorem Cslib.DataStructure.expectedAmortizedSequence {α : Type u_1} {Op : Type u_2} (potential : PMF α → ENNReal) (inv : List Op → PMF α → Prop) (exec : List Op → PMF α → PMF α → ENNReal → ENNReal → Prop) (empty : ∀ (ν : PMF α), exec [] ν ν 0 0) (advance : ∀ (o : Op) (ops : List Op) (ν : PMF α), inv (o :: ops) ν → ∃ (ν₁ : PMF α) (T : ENNReal) (C : ENNReal), inv ops ν₁ ∧ T + potential ν₁ ≤ C + potential ν ∧ ∀ (νf : PMF α) (Tr Cr : ENNReal), exec ops ν₁ νf Tr Cr → exec (o :: ops) ν νf (T + Tr) (C + Cr)) (ops : List Op) (ν : PMF α) (hi : inv ops ν) :
∃ (νf : PMF α) (T : ENNReal) (C : ENNReal), exec ops ν νf T C ∧ inv [] νf ∧ T + potential νf ≤ C + potential ν

Telescope expected potential along a list of operations, retaining native execution evidence. inv ops ν contains the model's distribution obligations for the remaining operations. advance returns the next distribution, its invariant, the one-step amortized inequality and an extension of any native execution of the tail. No independence, unconditional seed law or finite expectation is required; the proof uses addition, never subtraction of potentials.