Download data/lean/OAI/Combinatorics/EditApproximation/Probability/ExpectedRegret.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.66 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Probability/ExpectedRegret.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/EditApproximation/Probability/ExpectedRegret.lean
-
curl -L -o ExpectedRegret.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Probability/ExpectedRegret.lean
2.66 kB
| import OAI.Combinatorics.EditApproximation.Geometry.NodeRegret | |
| import OAI.Combinatorics.EditApproximation.Probability.SampledRegret | |
| namespace OAI | |
| /-! | |
| # Averaging the first-crossing regret | |
| All parent random choices may be represented by one finite uniform sample. | |
| Only the separate marginal laws of online draws and group failures are | |
| used. In particular, these two families may be correlated with one another. | |
| -/ | |
| namespace EditApproximation | |
| open Finset | |
| theorem firstCrossing_expected_sum_bound {Ξ© : Type*} [Fintype Ξ©] [Nonempty Ξ©] | |
| (S crossing : β) (regret prefixPayoff failure : Ξ© β β β β) | |
| (prefixBudget crossingCharge failureCharge q : β) | |
| (hcrossing : crossing β€ S) (hcharge : 0 β€ crossingCharge) (hfailureCharge : 0 β€ failureCharge) | |
| (hfailure : β Ο t, t < S β 0 β€ failure Ο t) | |
| (hprefix : β Ο t, t < crossing β regret Ο t β€ prefixPayoff Ο t + failureCharge * failure Ο t) | |
| (hcross : β Ο, crossing < S β regret Ο crossing β€ crossingCharge + failureCharge * failure Ο crossing) | |
| (hafter : β Ο t, t < S β crossing < t β regret Ο t β€ 0) | |
| (hprefixMean : (β t β range crossing, uniformMean (fun Ο => prefixPayoff Ο t)) β€ prefixBudget) | |
| (hfailureMean : β t < S, uniformMean (fun Ο => failure Ο t) β€ q) : | |
| uniformMean (fun Ο => β t β range S, regret Ο t) β€ | |
| prefixBudget + crossingCharge + failureCharge * (S : β) * q := by | |
| have hpoint Ο := firstCrossing_sum_bound S crossing (regret Ο) (prefixPayoff Ο) | |
| (failure Ο) crossingCharge failureCharge hcrossing hcharge hfailureCharge | |
| (hfailure Ο) (hprefix Ο) (hcross Ο) (hafter Ο) | |
| have hmean := uniformMean_mono _ _ hpoint | |
| simp only [uniformMean_add, uniformMean_const, uniformMean_mul, uniformMean_sum] at hmean β’ | |
| have hfailSum : (β t β range S, uniformMean (fun Ο => failure Ο t)) β€ (S : β) * q := by | |
| have hsum := sum_le_sum (s := range S) fun t ht => hfailureMean t (mem_range.mp ht) | |
| simpa only [sum_const, card_range, nsmul_eq_mul] using hsum | |
| have hfailCost := mul_le_mul_of_nonneg_left hfailSum hfailureCharge | |
| nlinarith | |
| /-- Integrating a fixed child-table environment uses only finite linearity. | |
| The failure cost is the manuscript's `2 S H^-4 F c`. -/ | |
| theorem node_expected_failure_charge {S H : β} {F c failureBudget : β} | |
| (hF : 0 β€ F) (hc : 0 β€ c) | |
| (hbudget : failureBudget β€ (S : β) / (H : β) ^ 4) : | |
| 2 * F * c * failureBudget β€ 2 * S * (1 / (H : β) ^ 4) * F * c := by | |
| have hmul := mul_le_mul_of_nonneg_left hbudget (by positivity : 0 β€ 2 * F * c) | |
| convert hmul using 1; ring | |
| end EditApproximation | |
| end OAI | |