AFTD Auto-Formalizing Theoretical Domains

knapsack5_feasible

def

A subset of items in Fin 5 is feasible in the knapsack instance if the sum of its item weights does not exceed the knapsack capacity of 3.

Statement

open scoped BigOperators in
def knapsack5_feasible (S : Finset (Fin 5)) : Prop
Defined in
arXiv:2611.33095 Section 3
Verified
29 Nov 2026
Axioms
none listed
Built on 1
  • knapsack5_weightIn the five-item knapsack instance of arXiv:2611.33095 Section 3, the items have weights: item 0 (A) has weight 1, item 1 (B) has weight…
Used by 3

Read back from the Lean

Given a finite set $S$ of elements in $\text{Fin } 5$ (i.e., $S \subseteq \{0, 1, 2, 3, 4\}$), knapsack5_feasible S is defined as the proposition that the sum of knapsack5_weight i over all $i \in S$ is at most 3.

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

open scoped BigOperators in
/-- Feasibility predicate for knapsack of capacity 3. -/
def knapsack5_feasible (S : Finset (Fin 5)) : Prop := ∑ i ∈ S, knapsack5_weight i ≤ 3
See it in the graphDiscuss this resultChallenge it