KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest
theoremverifiedformalizationimported Lean
KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open KnapsackAuction in open scoped BigOperators in variable {I : Type*} [Fintype I] [DecidableEq I] [LinearOrder I] [Nonempty I] in lemma KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest (w b : I → Nat) (capacity : Nat) (hwpos : ∀ i, 0 < w i) : natFractionalGreedyValue w b capacity ≤ integralGreedyValue w b capacity + highestBidValue b
- Formalizes
- EconCSLib, `KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest`
- Lean proof
- By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at
1a88f809b538(Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest← KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest (EconCSLib/MechanismDesign/Auction/Knapsack.lean:1006): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 18
- KnapsackAuction.natFractionalGreedyListFractional greedy prefix algorithm on a natural-number remaining capacity: take each whole item if it fits, and otherwise take exactly the…
- KnapsackAuction.natFractionalGreedyValueWelfare of the ratio-sorted fractional greedy allocation.
- KnapsackAuction.integralGreedyAllocationThe ratio-sorted integral greedy allocation.
- KnapsackAuction.integralGreedyValueWelfare of the ratio-sorted integral greedy allocation.
- KnapsackAuction.natFractionalGreedyList_le_integralGreedyList_plus_highestKnapsackAuction.natFractionalGreedyList_le_integralGreedyList_plus_highest
- KnapsackAuction.ratioTieKeySorting key for the fractional greedy rule: higher ratio first, ties broken by the ambient linear order on
I. - KnapsackAuction.natFractionalGreedyAllocationThe ratio-sorted fractional greedy allocation on natural-number data.
- KnapsackAuction.sortedAgentsByRatioAgents sorted by decreasing value-to-weight ratio, with lexicographic tie-breaking via the ambient order on
I. - KnapsackAuction.integralGreedyListThe integral greedy prefix algorithm: process items in a fixed order, take each whole item if it fits, and halt when the first item fails…
- KnapsackAuction.highestBidValueHighest single-item value.
- KnapsackAuction.natAuctionDataThe knapsack-auction data obtained from natural-number weights and capacity, with dummy zero allocation/payment rules. This is only used…
- KnapsackAuction.realBidOfNatNatural-number bids viewed as real-valued bids.
- TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - KnapsackAuction.fractionalSocialWelfareFractional social welfare for a
U-valued allocation vector. - KnapsackAuction.natBinarySocialWelfareInteger-valued welfare of a binary allocation profile.
- KnapsackAuctionA knapsack auction with public weights
w iand total capacityW. The underlying strategic object is aSingleParameterMechanism I U,… - KnapsackAuction.capacityThe total capacity bound.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen KnapsackAuction inopen scoped BigOperators invariable {I : Type*} [Fintype I] [DecidableEq I] [LinearOrder I] [Nonempty I] inlemma KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest (w b : I → Nat) (capacity : Nat) (hwpos : ∀ i, 0 < w i) : natFractionalGreedyValue w b capacity ≤ integralGreedyValue w b capacity + highestBidValue b := by classical have hnodup : ((natAuctionData w capacity).sortedAgentsByRatio (realBidOfNat b)).Nodup := by simpa [sortedAgentsByRatio] using ((List.nodup_mergeSort (l := (Finset.univ : Finset I).toList) (le := fun i j => decide ((natAuctionData w capacity).ratioTieKey (realBidOfNat b) i ≤ (natAuctionData w capacity).ratioTieKey (realBidOfNat b) j))).2 (by simpa using (Finset.nodup_toList (s := (Finset.univ : Finset I))))) simpa [natFractionalGreedyValue, natFractionalGreedyAllocation, integralGreedyValue, integralGreedyAllocation] using (natFractionalGreedyList_le_integralGreedyList_plus_highest (w := w) (b := b) hwpos hnodup capacity)