Compactness upgrades approximate extensions to an envy-free greedy profile
ProvedEF104Compactness__p2m_e30dcdf5_697c_4dac_9565_d07a1e730ebe_a1This isolates the source’s final compactness argument for an arbitrary family of greedy profiles. First prove the pure greedy analogue of Claim 7 by induction over positions. Hence a failed profile has no envy-free suffix extension. Parametrize extensions by total suffix length in each ordered piece; these parameters form a nonempty compact box, including singleton factors for empty pieces. Integrability gives continuous valuation functions, and the finite maximum envy attains a strictly positive minimum for every failed profile. Take the minimum over finitely many guesses and apply happrox below that positive threshold. Mathlib’s IsCompact.exists_isMinOn supports the extreme-value step. The core obligation is the suffix parametrization and continuity proof; strict positivity is inferred only under failure, so zero valuations and plateaus are preserved.
import Definitions.Def_EnvyFreeCake104_Divide_Protocols import Definitions.Def_EF104GreedyProfile__p2m_e30dcdf5_697c_4dac_9565_d07a1e730ebe_a1 open EnvyFreeCake104.Divide
theorem EF104Compactness__p2m_e30dcdf5_697c_4dac_9565_d07a1e730ebe_a1
{ι : Type} [DecidableEq ι] (V : ι → Valuation) (N : Finset ι)
(hN : N.Nonempty) (P : ι → Piece) (hP : ∀ i ∈ N, (P i).WF)
(hPdisj : ∀ i ∈ N, ∀ j ∈ N, i ≠ j → Disjoint (P i).toSet (P j).toSet)
(C : (List ι × List ι) → ι → Set ℝ)
(hC : ∀ g ∈ guesses N, EF104GreedyProfile__p2m_e30dcdf5_697c_4dac_9565_d07a1e730ebe_a1 V P g.1 g.2 (C g))
(happrox : ∀ δ : ℝ, 0 < δ →
∃ g ∈ guesses N, ∃ X : ι → Set ℝ,
(∀ p ∈ g.1.zip g.2, IsSuffix (X p.1) (P p.2)) ∧
(∀ i ∈ N, C g i ⊆ X i) ∧
(∀ i ∈ N, ∀ j ∈ N, (V i).value (X j) ≤ (V i).value (X i) + δ)) :
∃ g ∈ guesses N, EnvyFree V N (C g) := by sorry