Download data/lean/OAI/Computability/BinPacking/Configurations/ConfigurationLP.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 19.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/BinPacking/Configurations/ConfigurationLP.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/BinPacking/Configurations/ConfigurationLP.lean
-
curl -L -o ConfigurationLP.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/BinPacking/Configurations/ConfigurationLP.lean
19.3 kB
| import Mathlib.Algebra.BigOperators.Ring.Finset | |
| import Mathlib.Algebra.Order.Archimedean.Basic | |
| import Mathlib.Algebra.Order.BigOperators.Group.Finset | |
| import Mathlib.Data.Fintype.Pi | |
| import Mathlib.Basic.Real.Basic | |
| import Mathlib.Tactic.FieldSimp | |
| import Mathlib.Topology.Algebra.Ring.Real | |
| import Mathlib.Topology.Order.Compact | |
| import OAI.Computability.BinPacking.Packing.FractionWidth | |
| namespace OAI | |
| noncomputable section | |
| section | |
| open scoped BigOperators | |
| open Set | |
| namespace BinPackingGap.FractionalCover | |
| variable {I C : Type*} [Fintype C] | |
| theorem objective_nonneg {w : C β β} (hw : β c, 0 β€ w c) : | |
| 0 β€ objective w := | |
| Finset.sum_nonneg fun c _ => hw c | |
| theorem coordinate_le_objective {w : C β β} (hw : β c, 0 β€ w c) (c : C) : | |
| w c β€ objective w := | |
| Finset.single_le_sum (fun j _ => hw j) (Finset.mem_univ c) | |
| theorem objectiveSet_nonempty {a : C β I β β} {d : I β β} | |
| (hfeas : β w, Feasible a d w) : (objectiveSet a d).Nonempty := by | |
| obtain β¨w, hwβ© := hfeas | |
| exact β¨objective w, w, hw, rflβ© | |
| theorem objectiveSet_bddBelow (a : C β I β β) (d : I β β) : | |
| BddBelow (objectiveSet a d) := by | |
| refine β¨0, ?_β© | |
| rintro v β¨w, hw, rflβ© | |
| exact objective_nonneg hw.1 | |
| theorem value_le_of_feasible {a : C β I β β} {d : I β β} {w : C β β} | |
| (hw : Feasible a d w) : value a d β€ objective w := | |
| csInf_le (objectiveSet_bddBelow a d) β¨w, hw, rflβ© | |
| theorem le_value_of_lower_bound {a : C β I β β} {d : I β β} {b : β} | |
| (hfeas : β w, Feasible a d w) | |
| (hb : β w, Feasible a d w β b β€ objective w) : b β€ value a d := by | |
| apply le_csInf (objectiveSet_nonempty hfeas) | |
| rintro v β¨w, hw, rflβ© | |
| exact hb w hw | |
| theorem value_nonneg {a : C β I β β} {d : I β β} | |
| (hfeas : β w, Feasible a d w) : 0 β€ value a d := | |
| le_value_of_lower_bound hfeas fun _ hw => objective_nonneg hw.1 | |
| theorem continuous_objective : Continuous (objective (C := C)) := by | |
| unfold objective | |
| exact continuous_finsetSum _ fun c _ => continuous_apply c | |
| theorem continuous_coverage (a : C β I β β) (i : I) : | |
| Continuous (fun w : C β β => β c, a c i * w c) := | |
| continuous_finsetSum _ fun c _ => continuous_const.mul (continuous_apply c) | |
| theorem isClosed_feasible (a : C β I β β) (d : I β β) : | |
| IsClosed {w | Feasible a d w} := by | |
| have hn : IsClosed {w : C β β | β c, 0 β€ w c} := by | |
| rw [Set.ofPred_forall] | |
| exact isClosed_iInter fun c => isClosed_le continuous_const (continuous_apply c) | |
| have hd : IsClosed {w : C β β | β i, d i β€ β c, a c i * w c} := by | |
| rw [Set.ofPred_forall] | |
| exact isClosed_iInter fun i => isClosed_le continuous_const (continuous_coverage a i) | |
| exact hn.inter hd | |
| theorem isCompact_sublevel (a : C β I β β) (d : I β β) (b : β) : | |
| IsCompact {w | Feasible a d w β§ objective w β€ b} := by | |
| have hc : IsClosed {w | Feasible a d w β§ objective w β€ b} := | |
| (isClosed_feasible a d).inter (isClosed_le continuous_objective continuous_const) | |
| apply (isCompact_Icc (a := (0 : C β β)) (b := fun _ => b)).of_isClosed_subset hc | |
| intro w hw | |
| exact β¨hw.1.1, fun c => (coordinate_le_objective hw.1.1 c).trans hw.2β© | |
| theorem exists_minimum {a : C β I β β} {d : I β β} | |
| (hfeas : β w, Feasible a d w) : | |
| β w, Feasible a d w β§ β v, Feasible a d v β objective w β€ objective v := by | |
| obtain β¨wβ, hwββ© := hfeas | |
| obtain β¨w, hw, hminβ© := | |
| (isCompact_sublevel a d (objective wβ)).exists_isMinOn | |
| β¨wβ, hwβ, le_rflβ© continuous_objective.continuousOn | |
| refine β¨w, hw.1, fun v hv => ?_β© | |
| rcases le_total (objective v) (objective wβ) with h | h | |
| Β· exact hmin β¨hv, hβ© | |
| Β· exact hw.2.trans h | |
| theorem exists_minimizer {a : C β I β β} {d : I β β} | |
| (hfeas : β w, Feasible a d w) : | |
| β w, Feasible a d w β§ objective w = value a d := by | |
| obtain β¨w, hw, hminβ© := exists_minimum hfeas | |
| exact β¨w, hw, le_antisymm (le_value_of_lower_bound β¨w, hwβ© hmin) | |
| (value_le_of_feasible hw)β© | |
| theorem value_eq_of_feasible_of_lower_bound {a : C β I β β} {d : I β β} | |
| {w : C β β} {b : β} (hw : Feasible a d w) (hwobj : objective w = b) | |
| (hb : β v, Feasible a d v β b β€ objective v) : value a d = b := by | |
| apply le_antisymm | |
| Β· exact hwobj βΈ value_le_of_feasible hw | |
| Β· exact le_value_of_lower_bound β¨w, hwβ© hb | |
| theorem sum_demand_le_mul_objective [Fintype I] {a : C β I β β} {d : I β β} | |
| {w : C β β} {K : β} (hw : Feasible a d w) | |
| (hcol : β c, (β i, a c i) β€ K) : (β i, d i) β€ K * objective w := by | |
| calc | |
| (β i, d i) β€ β i, β c, a c i * w c := | |
| Finset.sum_le_sum fun i _ => hw.2 i | |
| _ = β c, (β i, a c i) * w c := by | |
| rw [Finset.sum_comm] | |
| simp only [Finset.sum_mul] | |
| _ β€ β c, K * w c := | |
| Finset.sum_le_sum fun c _ => mul_le_mul_of_nonneg_right (hcol c) (hw.1 c) | |
| _ = K * objective w := (Finset.mul_sum _ _ _).symm | |
| theorem sum_demand_le_mul_value [Fintype I] {a : C β I β β} {d : I β β} {K : β} | |
| (hfeas : β w, Feasible a d w) (hcol : β c, (β i, a c i) β€ K) : | |
| (β i, d i) β€ K * value a d := by | |
| obtain β¨w, hw, hwobjβ© := exists_minimizer hfeas | |
| rw [β hwobj] | |
| exact sum_demand_le_mul_objective hw hcol | |
| variable {J : Type*} [Fintype J] | |
| def pushforward (f : J β C) (mass : J β β) : C β β := by | |
| classical | |
| exact fun c => β j, if f j = c then mass j else 0 | |
| omit [Fintype C] in | |
| theorem pushforward_nonneg (f : J β C) {mass : J β β} | |
| (hmass : β j, 0 β€ mass j) : β c, 0 β€ pushforward f mass c := by | |
| classical | |
| intro c | |
| exact Finset.sum_nonneg fun j _ => by | |
| by_cases h : f j = c | |
| Β· simpa [h] using hmass j | |
| Β· simp [h] | |
| theorem objective_pushforward (f : J β C) (mass : J β β) : | |
| objective (pushforward f mass) = objective mass := by | |
| classical | |
| unfold objective pushforward | |
| rw [Finset.sum_comm] | |
| simp | |
| theorem coverage_pushforward (a : C β I β β) (f : J β C) (mass : J β β) (i : I) : | |
| (β c, a c i * pushforward f mass c) = β j, a (f j) i * mass j := by | |
| classical | |
| simp only [pushforward, Finset.mul_sum, mul_ite, mul_zero] | |
| rw [Finset.sum_comm] | |
| simp | |
| theorem feasible_pushforward {a : C β I β β} {d : I β β} | |
| (f : J β C) {mass : J β β} | |
| (hmass : Feasible (fun j i => a (f j) i) d mass) : | |
| Feasible a d (pushforward f mass) := by | |
| refine β¨pushforward_nonneg f hmass.1, fun i => ?_β© | |
| rw [coverage_pushforward] | |
| exact hmass.2 i | |
| end BinPackingGap.FractionalCover | |
| end | |
| namespace BinPackingGap | |
| open scoped BigOperators | |
| namespace NumericalSize | |
| variable {I : Instance} | |
| theorem le_one (s : NumericalSize I) : s.val β€ 1 := by | |
| obtain β¨i, _, hiβ© := Finset.mem_image.mp s.property | |
| rw [β hi] | |
| exact I.size_le_one i | |
| def ofItem (i : I.Item) : NumericalSize I := | |
| β¨I.size i, Finset.mem_image.mpr β¨i, Finset.mem_univ _, rflβ©β© | |
| @[simp] theorem ofItem_val (i : I.Item) : (ofItem i).val = I.size i := rfl | |
| end NumericalSize | |
| namespace TypeConfiguration | |
| variable {I : Instance} | |
| def empty (I : Instance) : TypeConfiguration I := β¨fun _ => 0, by simpβ© | |
| instance : Nonempty (TypeConfiguration I) := β¨empty Iβ© | |
| def ofIndividual (H : IndividualConfiguration I) : TypeConfiguration I where | |
| val s := (H.val.filter fun i => I.size i = s.val).card | |
| property := by | |
| classical | |
| have hsum : (β s : NumericalSize I, | |
| s.val * ((H.val.filter fun i => I.size i = s.val).card : β)) = | |
| β i β H.val, I.size i := by | |
| calc | |
| _ = β s : NumericalSize I, β i β H.val, | |
| if I.size i = s.val then I.size i else 0 := by | |
| apply Finset.sum_congr rfl | |
| intro s _ | |
| rw [β Finset.sum_filter] | |
| rw [Finset.sum_congr rfl (fun i hi => (Finset.mem_filter.mp hi).2)] | |
| simp [mul_comm] | |
| _ = β i β H.val, β s : NumericalSize I, | |
| if I.size i = s.val then I.size i else 0 := by rw [Finset.sum_comm] | |
| _ = β i β H.val, I.size i := by | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| have heq : β s : NumericalSize I, I.size i = s.val β NumericalSize.ofItem i = s := by | |
| intro s | |
| constructor | |
| Β· intro h | |
| exact Subtype.ext h | |
| Β· intro h | |
| exact congrArg Subtype.val h | |
| simp [heq] | |
| rw [hsum] | |
| exact H.property | |
| @[simp] theorem ofIndividual_count (H : IndividualConfiguration I) (s : NumericalSize I) : | |
| (ofIndividual H).val s = (H.val.filter fun i => I.size i = s.val).card := rfl | |
| theorem card_le_five (hlarge : β i, (1 / 6 : β) < I.size i) | |
| (c : TypeConfiguration I) : (β s, c.val s) β€ 5 := by | |
| classical | |
| by_contra h | |
| have hc : 6 β€ β s, c.val s := by omega | |
| have hcq : (6 : β) β€ β s, (c.val s : β) := by exact_mod_cast hc | |
| have hsize : β s : NumericalSize I, (1 / 6 : β) < s.val := by | |
| intro s | |
| obtain β¨i, _, hiβ© := Finset.mem_image.mp s.property | |
| simpa [hi] using hlarge i | |
| have hnz : β s : NumericalSize I, 0 < c.val s := by | |
| by_contra hn | |
| push Not at hn | |
| have hz : β s, c.val s = 0 := fun s => Nat.eq_zero_of_le_zero (hn s) | |
| simp [hz] at hc | |
| obtain β¨s, hsβ© := hnz | |
| have hstrict : (β t : NumericalSize I, (1 / 6 : β) * (c.val t : β)) < | |
| β t : NumericalSize I, t.val * (c.val t : β) := by | |
| apply Finset.sum_lt_sum | |
| Β· intro t _ | |
| exact mul_le_mul_of_nonneg_right (le_of_lt (hsize t)) (Nat.cast_nonneg _) | |
| Β· refine β¨s, Finset.mem_univ _, ?_β© | |
| exact mul_lt_mul_of_pos_right (hsize s) (by exact_mod_cast hs) | |
| rw [β Finset.mul_sum] at hstrict | |
| have hcap := c.property | |
| linarith | |
| end TypeConfiguration | |
| theorem sum_type_multiplicity (I : Instance) : | |
| β s : NumericalSize I, s.multiplicity = I.n := by | |
| classical | |
| simp only [NumericalSize.multiplicity, Finset.card_eq_sum_ones, Finset.sum_filter] | |
| rw [Finset.sum_comm] | |
| calc | |
| (β i : I.Item, β s : NumericalSize I, if I.size i = s.val then 1 else 0) = | |
| β _i : I.Item, 1 := by | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| have heq : β s : NumericalSize I, I.size i = s.val β NumericalSize.ofItem i = s := by | |
| intro s | |
| constructor | |
| Β· intro h | |
| exact Subtype.ext h | |
| Β· intro h | |
| exact congrArg Subtype.val h | |
| simp [heq] | |
| _ = I.n := by simp [Instance.Item] | |
| def IndividualFeasible (I : Instance) (w : IndividualConfiguration I β β) : Prop := | |
| FractionalCover.Feasible (individualMatrix I) (fun _ => 1) w | |
| def TypeFeasible (I : Instance) (w : TypeConfiguration I β β) : Prop := | |
| FractionalCover.Feasible (typeMatrix I) (fun s => (s.multiplicity : β)) w | |
| theorem individualMatrix_sum (I : Instance) (H : IndividualConfiguration I) : | |
| β i, individualMatrix I H i = (H.val.card : β) := by | |
| classical | |
| simp [individualMatrix] | |
| theorem typeMatrix_sum (I : Instance) (c : TypeConfiguration I) : | |
| β s, typeMatrix I c s = ((β s, c.val s : β) : β) := by | |
| simp [typeMatrix] | |
| def singletonWeights (I : Instance) : IndividualConfiguration I β β := | |
| FractionalCover.pushforward IndividualConfiguration.singleton (fun _ : I.Item => 1) | |
| theorem singletonWeights_feasible (I : Instance) : IndividualFeasible I (singletonWeights I) := by | |
| classical | |
| apply FractionalCover.feasible_pushforward | |
| constructor | |
| Β· intro i | |
| norm_num | |
| Β· intro i | |
| simp [individualMatrix, IndividualConfiguration.singleton] | |
| theorem singletonWeights_objective (I : Instance) : | |
| FractionalCover.objective (singletonWeights I) = (I.n : β) := by | |
| rw [singletonWeights, FractionalCover.objective_pushforward] | |
| simp [FractionalCover.objective, Instance.Item] | |
| theorem individualLP_attained (I : Instance) : | |
| β w, IndividualFeasible I w β§ FractionalCover.objective w = individualLP I := | |
| FractionalCover.exists_minimizer β¨singletonWeights I, singletonWeights_feasible Iβ© | |
| theorem individualLP_nonneg (I : Instance) : 0 β€ individualLP I := | |
| FractionalCover.value_nonneg β¨singletonWeights I, singletonWeights_feasible Iβ© | |
| theorem individualLP_le_n (I : Instance) : individualLP I β€ I.n := by | |
| rw [β singletonWeights_objective I] | |
| exact FractionalCover.value_le_of_feasible (singletonWeights_feasible I) | |
| theorem typeMatrix_ofIndividual (I : Instance) (H : IndividualConfiguration I) | |
| (s : NumericalSize I) : | |
| typeMatrix I (TypeConfiguration.ofIndividual H) s = | |
| β i : I.Item, if I.size i = s.val then individualMatrix I H i else 0 := by | |
| classical | |
| change ((H.val.filter fun i => I.size i = s.val).card : β) = _ | |
| calc | |
| _ = β i β H.val, if I.size i = s.val then (1 : β) else 0 := by | |
| simp | |
| _ = β i β H.val, if I.size i = s.val then individualMatrix I H i else 0 := by | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| simp [individualMatrix, hi] | |
| _ = β i : I.Item, if I.size i = s.val then individualMatrix I H i else 0 := by | |
| apply Finset.sum_subset (Finset.subset_univ H.val) | |
| intro i _ hi | |
| simp [individualMatrix, hi] | |
| def projectWeights (I : Instance) (w : IndividualConfiguration I β β) : | |
| TypeConfiguration I β β := | |
| FractionalCover.pushforward TypeConfiguration.ofIndividual w | |
| theorem projectWeights_objective (I : Instance) (w : IndividualConfiguration I β β) : | |
| FractionalCover.objective (projectWeights I w) = FractionalCover.objective w := | |
| FractionalCover.objective_pushforward _ _ | |
| theorem projectWeights_feasible (I : Instance) {w : IndividualConfiguration I β β} | |
| (hw : IndividualFeasible I w) : TypeFeasible I (projectWeights I w) := by | |
| classical | |
| apply FractionalCover.feasible_pushforward | |
| refine β¨hw.1, fun s => ?_β© | |
| have hcoverage := Finset.sum_le_sum (s := Finset.univ) (fun i _ => | |
| show (if I.size i = s.val then (1 : β) else 0) β€ | |
| if I.size i = s.val then β H, individualMatrix I H i * w H else 0 by | |
| split_ifs | |
| Β· exact hw.2 i | |
| Β· rfl) | |
| have hleft : (β i : I.Item, if I.size i = s.val then (1 : β) else 0) = | |
| s.multiplicity := by | |
| simp [NumericalSize.multiplicity] | |
| have hright : | |
| (β i : I.Item, if I.size i = s.val then β H, individualMatrix I H i * w H else 0) = | |
| β H, typeMatrix I (TypeConfiguration.ofIndividual H) s * w H := by | |
| simp_rw [typeMatrix_ofIndividual, Finset.sum_mul] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| split_ifs with h | |
| Β· simp | |
| Β· simp | |
| simpa only [hleft, hright] using hcoverage | |
| theorem typeLP_attained (I : Instance) : | |
| β w, TypeFeasible I w β§ FractionalCover.objective w = typeLP I := | |
| FractionalCover.exists_minimizer | |
| β¨projectWeights I (singletonWeights I), projectWeights_feasible I (singletonWeights_feasible I)β© | |
| theorem typeLP_nonneg (I : Instance) : 0 β€ typeLP I := | |
| FractionalCover.value_nonneg | |
| β¨projectWeights I (singletonWeights I), projectWeights_feasible I (singletonWeights_feasible I)β© | |
| theorem typeLP_le_individualLP (I : Instance) : typeLP I β€ individualLP I := by | |
| obtain β¨w, hw, hobjβ© := individualLP_attained I | |
| calc | |
| typeLP I β€ FractionalCover.objective (projectWeights I w) := | |
| FractionalCover.value_le_of_feasible (projectWeights_feasible I hw) | |
| _ = individualLP I := (projectWeights_objective I w).trans hobj | |
| theorem individualLP_eq_zero_of_n_eq_zero (I : Instance) (h : I.n = 0) : | |
| individualLP I = 0 := by | |
| have hle := individualLP_le_n I | |
| rw [h, Nat.cast_zero] at hle | |
| exact le_antisymm hle (individualLP_nonneg I) | |
| theorem typeLP_eq_zero_of_n_eq_zero (I : Instance) (h : I.n = 0) : typeLP I = 0 := by | |
| apply le_antisymm | |
| Β· simpa [individualLP_eq_zero_of_n_eq_zero I h] using typeLP_le_individualLP I | |
| Β· exact typeLP_nonneg I | |
| namespace Packing | |
| def fractionalWeights {I : Instance} {b : β} (p : Packing I b) : | |
| IndividualConfiguration I β β := | |
| FractionalCover.pushforward p.configuration (fun _ : Fin b => 1) | |
| theorem fractionalWeights_feasible {I : Instance} {b : β} (p : Packing I b) : | |
| IndividualFeasible I p.fractionalWeights := by | |
| classical | |
| apply FractionalCover.feasible_pushforward | |
| constructor | |
| Β· intro j | |
| norm_num | |
| Β· intro i | |
| simp [individualMatrix, configuration] | |
| theorem fractionalWeights_objective {I : Instance} {b : β} (p : Packing I b) : | |
| FractionalCover.objective p.fractionalWeights = (b : β) := by | |
| rw [fractionalWeights, FractionalCover.objective_pushforward] | |
| simp [FractionalCover.objective] | |
| end Packing | |
| theorem individualLP_le_opt (I : Instance) : individualLP I β€ (opt I : β) := by | |
| obtain β¨pβ© := opt_attained I | |
| rw [β p.fractionalWeights_objective] | |
| exact FractionalCover.value_le_of_feasible p.fractionalWeights_feasible | |
| theorem typeLP_le_opt (I : Instance) : typeLP I β€ (opt I : β) := | |
| (typeLP_le_individualLP I).trans (individualLP_le_opt I) | |
| theorem n_le_five_mul_individual_objective (I : Instance) | |
| (hlarge : β i, (1 / 6 : β) < I.size i) | |
| {w : IndividualConfiguration I β β} (hw : IndividualFeasible I w) : | |
| (I.n : β) β€ 5 * FractionalCover.objective w := by | |
| have hcol : β H : IndividualConfiguration I, (β i, individualMatrix I H i) β€ 5 := by | |
| intro H | |
| rw [individualMatrix_sum] | |
| exact_mod_cast H.card_le_five hlarge | |
| simpa [Instance.Item] using FractionalCover.sum_demand_le_mul_objective hw hcol | |
| theorem n_le_five_mul_type_objective (I : Instance) | |
| (hlarge : β i, (1 / 6 : β) < I.size i) | |
| {w : TypeConfiguration I β β} (hw : TypeFeasible I w) : | |
| (I.n : β) β€ 5 * FractionalCover.objective w := by | |
| have hcol : β c : TypeConfiguration I, (β s, typeMatrix I c s) β€ 5 := by | |
| intro c | |
| rw [typeMatrix_sum] | |
| exact_mod_cast c.card_le_five hlarge | |
| have h := FractionalCover.sum_demand_le_mul_objective hw hcol | |
| have hdem : (β s : NumericalSize I, (s.multiplicity : β)) = I.n := by | |
| rw [β Nat.cast_sum, sum_type_multiplicity] | |
| simpa only [hdem] using h | |
| theorem n_le_five_mul_individualLP (I : Instance) | |
| (hlarge : β i, (1 / 6 : β) < I.size i) : (I.n : β) β€ 5 * individualLP I := by | |
| obtain β¨w, hw, hobjβ© := individualLP_attained I | |
| rw [β hobj] | |
| exact n_le_five_mul_individual_objective I hlarge hw | |
| theorem n_le_five_mul_typeLP (I : Instance) | |
| (hlarge : β i, (1 / 6 : β) < I.size i) : (I.n : β) β€ 5 * typeLP I := by | |
| obtain β¨w, hw, hobjβ© := typeLP_attained I | |
| rw [β hobj] | |
| exact n_le_five_mul_type_objective I hlarge hw | |
| theorem bothLP_eq_of_physical_witness (I : Instance) (B : β) | |
| (hcount : I.n = 5 * B) (hlarge : β i, (1 / 6 : β) < I.size i) | |
| (w : IndividualConfiguration I β β) (hw : IndividualFeasible I w) | |
| (hobj : FractionalCover.objective w = (B : β)) : | |
| individualLP I = (B : β) β§ typeLP I = (B : β) := by | |
| have hcountR : (I.n : β) = 5 * (B : β) := by exact_mod_cast hcount | |
| have hilow := n_le_five_mul_individualLP I hlarge | |
| have htlow := n_le_five_mul_typeLP I hlarge | |
| have hiup : individualLP I β€ (B : β) := by | |
| rw [β hobj] | |
| exact FractionalCover.value_le_of_feasible hw | |
| have htup : typeLP I β€ (B : β) := (typeLP_le_individualLP I).trans hiup | |
| constructor <;> linarith | |
| end BinPackingGap | |
| end | |
| end OAI | |