knapsack5_principal_val
The function knapsack5_principal_val : Bool × Bool × Bool → Fin 5 → ℝ maps an uncurried state tuple (a, b, j) and an item i : Fin 5 to the real principal valuation: (if a then 9 else 0) for item 0, (if b then 9 else 0) for item 1, 3 for item 2, 10 for item 3, and (if j then 900 else 0) for item 4.
Statement
def knapsack5_principal_val : Bool × Bool × Bool → Fin 5 → ℝ- Defined in
- arXiv:2611.33095 Section 3
- Verified
- 29 Nov 2026
- Axioms
- none listed
- Used by 4
- knapsack5_expected_payoffThe expected principal payoff knapsack5_expected_payoff from an agent choice function choice : Bool × Bool × Bool → Option (Finset (Fin…
- knapsack5_deterministic_menu_exists_attainingThere exists a deterministic menu M : deterministic_menu (Fin 5) such that for all η : ℝ with 0 < η and η < 1, there exists an agent best…
- knapsack5_expected_offline_opt_eqThe expected offline optimum in the five-item knapsack instance equals 1011/50, i.e., knapsack5_expected_offline_opt = 1011 / 50.
- knapsack5_expected_offline_optThe expected offline optimum knapsack5_expected_offline_opt : ℝ in the five-item knapsack instance, defined as the sum over ω : Bool ×…
Read back from the Lean
The function knapsack5_principal_val maps a triple of booleans (a, b, j) and an index i : Fin 5 to a real number defined by cases on i:
- for i = 0: 9 if a is true, and 0 otherwise;
- for i = 1: 9 if b is true, and 0 otherwise;
- for i = 2: 3;
- for i = 3: 10;
- for any other value of i (namely i = 4): 900 if j is true, and 0 otherwise.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Principal item values in each state. -/ def knapsack5_principal_val : Bool × Bool × Bool → Fin 5 → ℝ := fun (a, b, j) i => match i with | 0 => if a then 9 else 0 | 1 => if b then 9 else 0 | 2 => 3 | 3 => 10 | _ => if j then 900 else 0