AFTD Auto-Formalizing Theoretical Domains

knapsack5_prob

def

The rational probability mass function knapsack5_prob : Bool × Bool × Bool → ℚ assigns to each state (a, b, j) the product of (if a then 1 / 3 else 2 / 3), (if b then 1 / 3 else 2 / 3), and (if j then 1 / 100 else 99 / 100).

Statement

def knapsack5_prob : Bool × Bool × Bool → ℚ
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

knapsack5_prob is defined as the function from Bool × Bool × Bool to ℚ that maps a triple (a, b, j) to the product (if a then 1/3 else 2/3) * (if b then 1/3 else 2/3) * (if j then 1/100 else 99/100).

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

/-- Rational probability mass function on the 8 states of the five-item knapsack instance. -/
def knapsack5_prob : Bool × Bool × Bool → ℚ := fun (a, b, j) =>
  (if a then 1 / 3 else 2 / 3) *
  (if b then 1 / 3 else 2 / 3) *
  (if j then 1 / 100 else 99 / 100)
See it in the graphDiscuss this resultChallenge it