OAI/Combinatorics/KServer/Minimization.lean
58 declarations, 0 contain sorry, 0 declared as axioms
Actual zero-extension and synthetic-input operations in §04. In particular zero weight and singleton transitions are included, not divided away.
- lemma
OAI.KServer.AdaptiveMinimization.avg_sum_anyline 13 - structure
OAI.KServer.AdaptiveMinimization.Familyline 19Source documentation
The source primitives are affine in the rank inputs when the held parameters and the state are fixed. Both simplex and side domains are compact.
structure Family (Θ : Type*) (I J : Type*) [Fintype I] [Fintype J] where …
- def
OAI.KServer.AdaptiveMinimization.Family.valueline 28 - def
OAI.KServer.AdaptiveMinimization.movementline 31 - lemma
OAI.KServer.AdaptiveMinimization.movement_nonnegline 33 - lemma
OAI.KServer.AdaptiveMinimization.movement_selfline 36 - lemma
OAI.KServer.AdaptiveMinimization.movement_triangleline 38 - lemma
OAI.KServer.AdaptiveMinimization.Family.value_continuousline 43 - lemma
OAI.KServer.AdaptiveMinimization.movement_continuousline 48 - lemma
OAI.KServer.AdaptiveMinimization.Family.exists_updateline 51 - def
OAI.KServer.AdaptiveMinimization.Family.updateline 58Source documentation
A fixed noncomputable selection, only from the currently supplied data.
def Family.update (F : Family Θ I J) (θ : Θ) (p : I → ℝ) (c : ℝ) (a : J → ℝ) : J → ℝ := …
Mentions: OAI.KServer.AdaptiveMinimization.Family
- lemma
OAI.KServer.AdaptiveMinimization.Family.update_memline 61 - lemma
OAI.KServer.AdaptiveMinimization.Family.update_paymentline 64 - lemma
OAI.KServer.AdaptiveMinimization.Family.input_differenceline 73 - lemma
OAI.KServer.AdaptiveMinimization.Family.input_lipschitzline 78 - structure
OAI.KServer.AdaptiveMinimization.Transportline 90Source documentation
Domain transport is computed from old/new held parameters and new rank inputs. For the manuscript it is the prepared update followed by deletion and zero insertion. It is not permitted to depend on the unrealized future.
structure Transport (F : Family Θ I J) where …
Mentions: OAI.KServer.AdaptiveMinimization.Family
- def
OAI.KServer.AdaptiveMinimization.stateline 94 - lemma
OAI.KServer.AdaptiveMinimization.state_memline 101 - lemma
OAI.KServer.AdaptiveMinimization.state_adaptedline 111Source documentation
Causality is proved from the recursion (not a fictitious prefix interface).
lemma state_adapted (F : Family Θ I J) (T : Transport F) (θ : ℕ → Ω → Θ) (p : ℕ → Ω → I → ℝ) (c : ℕ → Ω → ℝ) (H : ℕ → Ω → ℕ) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) (hθ : ∀ t ω z, H t ω=H t z → θ t ω=θ t z) (hp : ∀ t ω z, H t ω=H t z → p t ω=p t z) (hc : ∀ t, Adapted (H t) (c t)) : ∀ t ω z, H t ω=H t z → state F T θ p c t ω=state F T θ p c t z := by …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport, OAI.KServer.AdaptiveMinimization.state
- def
OAI.KServer.AdaptiveMinimization.editline 131Source documentation
The signed editing charge, evaluated after filtering and drift but before the final minimizing update. Preparation payments are allowed to lower it.
def edit (F : Family Θ I J) (T : Transport F) (θ : ℕ → Ω → Θ) (p : ℕ → Ω → I → ℝ) (c : ℕ → Ω → ℝ) (t : ℕ) (ω : Ω) : ℝ := …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport
- lemma
OAI.KServer.AdaptiveMinimization.state_paymentline 139 - def
OAI.KServer.AdaptiveMinimization.rankVectorline 163Source documentation
All ranks are taken under the same true observed history.
def rankVector {w : Ω → ℝ} (R : I → FilteredRanks w) (t : ℕ) (ω : Ω) : I → ℝ := … - def
OAI.KServer.AdaptiveMinimization.beforeVectorline 166 - lemma
OAI.KServer.AdaptiveMinimization.rankVector_adaptedline 170 - lemma
OAI.KServer.AdaptiveMinimization.filtering_zeroline 179Source documentation
Filtering is used on every step with the old held coefficients, before selecting any ordinary/wholesale event measurable at the new history.
lemma filtering_zero (F : Family Θ I J) (T : Transport F) {w : Ω → ℝ} (R : I → FilteredRanks w) (θ : ℕ → Ω → Θ) (c : ℕ → Ω → ℝ) (H : ℕ → Ω → ℕ) (hH : ∀ i, (R i).history=H) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) (hθ : ∀ t ω z, H t ω=H t z → θ t ω=θ t z) (hc : ∀ t, Adapted (H t) (c t)) (t : ℕ) : avg w (fun ω => F.value (θ t ω) (beforeVector R (t+1) ω) (state F T θ (rankVector R) c t ω)- F.value (θ t ω) (rankVector R t ω) (state F T θ (rankVector R) c t ω))=0 := by …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport, OAI.KServer.AdaptiveMinimization.beforeVector, OAI.KServer.AdaptiveMinimization.state, OAI.KServer.AdaptiveMinimization.rankVector
- lemma
OAI.KServer.AdaptiveMinimization.expected_payment_stepline 200 - theorem
OAI.KServer.AdaptiveMinimization.expected_paymentline 247Source documentation
The full causal minimizer telescope. The computed signed edit term must be bounded from the actual coordinate preparation/deletion and coarse schedules; there is no asserted policy or asserted coarse-budget estimate here.
theorem expected_payment (F : Family Θ I J) (T : Transport F) {w : Ω → ℝ} (hw : ∀ ω, 0 ≤ w ω) (R : I → FilteredRanks w) (θ : ℕ → Ω → Θ) (c : ℕ → Ω → ℝ) (H : ℕ → Ω → ℕ) (hH : ∀ i, (R i).history=H) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) (hθ : ∀ t ω z, H t ω=H t z → θ t ω=θ t z) (hc : ∀ t, Adapted (H t) (c t)) (hcn : ∀ t ω, 0 ≤ c t ω) {L : ℝ} (hL : ∀ θ a, a ∈ F.domain θ → ∀ i, |F.coefficient θ a i| ≤ L) (n : ℕ) : (∑ t ∈ range n, avg w (fun ω => c (t+1) ω*movement (state F T θ (rankVector R) c (t+1) ω) (state F T θ (rankVector R) c t ω))) ≤ avg w (fun ω => F.value (θ 0 ω) (rankVector R 0 ω) (state F T θ (rankVector R) c 0 ω))- …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport, OAI.KServer.AdaptiveMinimization.movement, OAI.KServer.AdaptiveMinimization.state, OAI.KServer.AdaptiveMinimization.rankVector
- theorem
OAI.KServer.AdaptiveMinimization.expected_payment_boundedline 271Source documentation
Uniform endpoint removal: a bound depending only on the fixed finite family, not on the horizon or its law, contributes at most twice that bound.
theorem expected_payment_bounded (F : Family Θ I J) (T : Transport F) {w : Ω → ℝ} (hw : ∀ ω, 0 ≤ w ω) (hw1 : ∑ ω, w ω=1) (R : I → FilteredRanks w) (θ : ℕ → Ω → Θ) (c : ℕ → Ω → ℝ) (H : ℕ → Ω → ℕ) (hH : ∀ i, (R i).history=H) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) (hθ : ∀ t ω z, H t ω=H t z → θ t ω=θ t z) (hc : ∀ t, Adapted (H t) (c t)) (hcn : ∀ t ω, 0 ≤ c t ω) {L B : ℝ} (hL : ∀ θ a, a ∈ F.domain θ → ∀ i, |F.coefficient θ a i| ≤ L) (hB : ∀ θ p a, a ∈ F.domain θ → (∀ i, p i ∈ Set.Icc 0 1) → |F.value θ p a| ≤ B) (n : ℕ) : (∑ t ∈ range n, avg w (fun ω => c (t+1) ω*movement (state F T θ (rankVector R) c (t+1) ω) (state F T θ (rankVector R) c t ω))) ≤ …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport, OAI.KServer.AdaptiveMinimization.movement, OAI.KServer.AdaptiveMinimization.state, OAI.KServer.AdaptiveMinimization.rankVector
- def
OAI.KServer.AdaptiveMinimization.countRanksline 296Source documentation
The rank inputs of the recursion can be instantiated directly from the actual finite hidden counts, not from a postulated martingale interface.
def countRanks {w : Ω → ℝ} (hw : ∀ ω, 0 ≤ w ω) (H : ℕ → Ω → ℕ) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) {k : ℕ} (N : ℕ → Ω → J → ℕ) : J × Fin k → FilteredRanks w := … - lemma
OAI.KServer.AdaptiveMinimization.countRanks_historyline 302 - lemma
OAI.KServer.AdaptiveMinimization.countRanks_driftline 307 - theorem
OAI.KServer.AdaptiveMinimization.hidden_count_paymentline 320Source documentation
Hidden-count variation is controlled by the explicit edit expression.
theorem hidden_count_payment {k : ℕ} (F : Family Θ (J × Fin k) J) (T : Transport F) {w : Ω → ℝ} (hw : ∀ ω, 0 ≤ w ω) (hw1 : ∑ ω, w ω=1) (H : ℕ → Ω → ℕ) (hr : ∀ t ω z, H (t+1) ω=H (t+1) z → H t ω=H t z) (N : ℕ → Ω → J → ℕ) (hN : ∀ t ω j, N t ω j ≤ k) (θ : ℕ → Ω → Θ) (c : ℕ → Ω → ℝ) (hθ : ∀ t ω z, H t ω=H t z → θ t ω=θ t z) (hc : ∀ t, Adapted (H t) (c t)) (hcn : ∀ t ω, 0 ≤ c t ω) {L B : ℝ} (hLn : 0 ≤ L) (hL : ∀ θ a, a ∈ F.domain θ → ∀ i, |F.coefficient θ a i| ≤ L) (hB : ∀ θ p a, a ∈ F.domain θ → (∀ i, p i ∈ Set.Icc 0 1) → |F.value θ p a| ≤ B) (n : ℕ) : let R := countRanks hw H hr N …Mentions: OAI.KServer.AdaptiveMinimization.Family, OAI.KServer.AdaptiveMinimization.Transport, OAI.KServer.AdaptiveMinimization.countRanks
- def
OAI.KServer.ChangingDomains.variationline 354 - lemma
OAI.KServer.ChangingDomains.variation_selfline 357 - lemma
OAI.KServer.ChangingDomains.variation_nonnegline 359 - lemma
OAI.KServer.ChangingDomains.variation_triangleline 362 - def
OAI.KServer.ChangingDomains.simplexline 366 - def
OAI.KServer.ChangingDomains.canonicalline 369 - lemma
OAI.KServer.ChangingDomains.canonical_memline 372 - lemma
OAI.KServer.ChangingDomains.simplex_coordinateline 385 - lemma
OAI.KServer.ChangingDomains.simplex_compactline 393 - lemma
OAI.KServer.ChangingDomains.simplex_variationline 410 - def
OAI.KServer.ChangingDomains.transposeSimplexline 421Source documentation
Deletion plus zero insertion. At zero synthetic total choose a fresh canonical vector; this has exactly zero synthetic weighted movement.
def transposeSimplex (A : Finset J) (S : ℝ) (a : J → ℝ) : J → ℝ := …
- lemma
OAI.KServer.ChangingDomains.transposeSimplex_memline 424 - lemma
OAI.KServer.ChangingDomains.transposeSimplex_paymentline 439 - lemma
OAI.KServer.ChangingDomains.prepared_weight_comparisonline 447Source documentation
Literal §04 weight comparison for the prepared and final minimizers.
lemma prepared_weight_comparison {A₀ A₁ A₂ : Finset J} {a₀ a₁ a₂ a₃ : J → ℝ} (ha₀ : a₀ ∈ simplex A₀) (ha₁ : a₁ ∈ simplex A₁) (ha₂ : a₂ ∈ simplex A₂) {S T : ℝ} (hS : 0 ≤ S) (hST : S ≤ T) (hzero : S*variation a₂ a₁=0) : T*variation a₃ a₀ ≤ S*variation a₁ a₀+T*variation a₃ a₂+4*(T-S) := by …Mentions: OAI.KServer.ChangingDomains.simplex, OAI.KServer.ChangingDomains.variation
- def
OAI.KServer.ChangingDomains.sideDomainline 465 - def
OAI.KServer.ChangingDomains.transposeSideline 468 - lemma
OAI.KServer.ChangingDomains.transposeSide_memline 470 - lemma
OAI.KServer.ChangingDomains.transposeSide_paymentline 482 - def
OAI.KServer.ChangingDomains.coreline 499 - def
OAI.KServer.ChangingDomains.syntheticFlagsline 502 - def
OAI.KServer.ChangingDomains.changedFlagsline 505 - lemma
OAI.KServer.ChangingDomains.core_nonnegline 509 - lemma
OAI.KServer.ChangingDomains.synthetic_zeroline 518 - lemma
OAI.KServer.ChangingDomains.synthetic_error_termsline 523 - theorem
OAI.KServer.ChangingDomains.synthetic_errorsline 548Source documentation
Both synthetic-core discrepancies are paid by the actual number of flags that changed, even when the observed rank probabilities changed drastically.
theorem synthetic_errors {A B : Finset J} {f g : J → R → Bool} {p : J → R → ℝ} (hp : ∀ i a, p i a ∈ Set.Icc 0 1) (hf : ∀ i ∉ A, ∀ a, f i a=false) (hg : ∀ i ∉ B, ∀ a, g i a=false) : variation (core f p) (core (syntheticFlags A B g) p) ≤ changedFlags f g ∧ variation (core g p) (core (syntheticFlags A B g) p) ≤ changedFlags f g := by …Mentions: OAI.KServer.ChangingDomains.variation, OAI.KServer.ChangingDomains.core, OAI.KServer.ChangingDomains.syntheticFlags, OAI.KServer.ChangingDomains.changedFlags
- lemma
OAI.KServer.ChangingDomains.synthetic_totalline 565