AFTD Auto-Formalizing Theoretical Domains

thrifty_greedy

def

The Thrifty-Greedy packing thrifty_greedy I of an instance I : Finset TimelyItem, defined as thrifty_greedy_aux I.card I.

Statement

noncomputable def thrifty_greedy (I : Finset TimelyItem) : Finset TimelyBin
Defined in
arXiv:2611.09611, Section 2
Verified
09 Nov 2026
Axioms
none listed
Built on 3
  • thrifty_greedy_auxA fuel-bounded recursive procedure thrifty_greedy_aux : ℕ → Finset TimelyItem → Finset TimelyBin that, on remaining items R, returns…
  • TimelyItemA structure TimelyItem representing an item in online timely bin packing, with fields id : ℕ (a unique natural identifier),…
  • TimelyBinA structure TimelyBin representing a bin in timely bin packing, with fields items : Finset TimelyItem (the finite set of items packed…
Used by 1
  • thrifty_greedy_countThe number of bins thrifty_greedy_count I produced by Thrifty-Greedy on instance I : Finset TimelyItem, defined as the cardinality…

Read back from the Lean

Definition of a function thrifty_greedy mapping a finite set of timely items I : Finset TimelyItem to a finite set of timely bins Finset TimelyBin. It runs thrifty_greedy_aux initialized with fuel equal to I.card and remaining item set I.

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

/-- The Thrifty-Greedy packing of an instance I. -/
noncomputable def thrifty_greedy (I : Finset TimelyItem) : Finset TimelyBin := thrifty_greedy_aux I.card I
See it in the graphDiscuss this resultChallenge it