Proof of Theorem 1 — the minimum C_max is n − |S|
ProvedResourceScheduling.Poly.p2_min_makespan_matchingConsider : two identical machines (speed ), unit-time jobs, resources with positive integer sizes and nonnegative integer requirements , and no precedence constraints. Let be the graph on the jobs with an edge whenever for all , and let be a matching of maximum cardinality in . Then the minimum value of is
some feasible schedule has , and every feasible schedule has .
This is the content of the proof of Theorem 1 (Garey & Johnson): "Obviously, the minimum value of is equal to ." It reduces two-machine scheduling under arbitrary resource constraints to maximum matching.
Formalization Note The matching is a Mathlib Subgraph of with IsMatching; maximality is over all matchings of , and is the number of its edges. The value is computed in , so there is no natural-number subtraction. The hypothesis is implicit in the paper. The running time is not formalized.
import Mathlib import Definitions.Def_ResourceScheduling_Poly_Model import Definitions.Def_ResourceScheduling_Poly_CompatibilityGraph
namespace ResourceScheduling.Poly
/-- Proof of Theorem 1 (p. 15): for `P2 | res···, p_j = 1 | C_max` with every job fitting alone,
if `S` is a matching of maximum cardinality in the compatibility graph `G`, the minimum value of
`C_max` over feasible schedules is `n - |S|`: it is attained, and no feasible schedule does
better. -/
theorem p2_min_makespan_matching (I : Instance) (hm : I.m = 2) (hq : ∀ i, I.q i = 1)
(hprec : I.NoPrecedence) (hfit : I.EveryJobFits)
(S : I.compatGraph.Subgraph) (hS : S.IsMatching)
(hmax : ∀ S' : I.compatGraph.Subgraph, S'.IsMatching → S'.edgeSet.ncard ≤ S.edgeSet.ncard) :
(∃ σ : Schedule I, σ.Feasible ∧ σ.makespan = (I.n : ℝ) - S.edgeSet.ncard) ∧
∀ σ : Schedule I, σ.Feasible → (I.n : ℝ) - S.edgeSet.ncard ≤ σ.makespan := by sorry
end ResourceScheduling.Poly
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Hypotheses. Take any instance with jobs, an arbitrary number of resources with sizes , natural-number requirements , and an acyclic precedence relation, such that:
- there are machines, both with speed , so every processing time is ;
- there are no precedence arcs;
- for every resource and every job .
Let be the graph on the jobs in which are adjacent if and only if for every .
Let be a subgraph of that is a matching: every vertex of has exactly one neighbour in . Assume is of maximum size: every matching subgraph of has at most as many edges as . Write for the number of edges of .
A schedule gives each job a machine and a real start , with . It is feasible if:
- ;
- distinct jobs on one machine have or ;
- precedence is respected (vacuous here);
- at every real , the jobs with satisfy for every .
is the largest , or if .
Conclusion.
- Some feasible schedule has , computed as a real number.
- Every feasible schedule has .
Degenerate cases.
- If , has no edges and the claim is for the empty schedule.
- If , is complete and the resource condition is vacuous.
- The subtraction is in , so no truncation occurs.
- The hypotheses are satisfiable: a maximum matching always exists since is finite.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.