Download data/lean/OAI/Combinatorics/MatchingCount/Graphs/Height.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 17.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatchingCount/Graphs/Height.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/MatchingCount/Graphs/Height.lean
-
curl -L -o Height.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/MatchingCount/Graphs/Height.lean
17.8 kB
| import Mathlib | |
| import OAI.Combinatorics.MatchingCount.Graphs.ColoredEdge | |
| import OAI.Combinatorics.MatchingCount.Graphs.Related | |
| namespace OAI | |
| namespace MatchingFPRAS.Enlargement | |
| open MatchingFPRAS.Switching MatchingFPRAS.Subdivision MatchingFPRAS.RealGeometry | |
| open MatchingFPRAS.Hierarchy Finset | |
| variable {V : Type*} [Fintype V] [LinearOrder V] [Nontrivial V] | |
| lemma row_nonempty (x : V) : (Finset.univ.erase x : Finset V).Nonempty := by | |
| obtain β¨y,hyβ© := exists_ne x | |
| exact β¨y,by simp [hy]β© | |
| noncomputable def sourceHeight (w : V β V β β) (x : V) : β := | |
| (Finset.univ.erase x).sup' (row_nonempty x) (bottleneck w x) | |
| lemma bottleneck_le_sourceHeight (w : V β V β β) {x y : V} (hxy : x β y) : | |
| bottleneck w x y β€ sourceHeight w x := | |
| Finset.le_sup' (bottleneck w x) (by simp [hxy.symm]) | |
| lemma one_le_sourceHeight (w : V β V β β) (x : V) : 1 β€ sourceHeight w x := by | |
| obtain β¨y,hyβ© := exists_ne x | |
| exact (one_le_bottleneck w x y).trans (bottleneck_le_sourceHeight w hy.symm) | |
| lemma sourceHeight_nonneg (w : V β V β β) (x : V) : 0 β€ sourceHeight w x := | |
| zero_le_one.trans (one_le_sourceHeight w x) | |
| lemma sourceHeight_bound (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) (x : V) : sourceHeight w x β€ 4^K := by | |
| apply Finset.sup'_le | |
| intro y hy | |
| exact bottleneck_le_row_bound w x (4^K) (one_le_powβ (by norm_num)) (hw x) y | |
| noncomputable def maxSourceHeight (w : V β V β β) : β := | |
| Finset.univ.sup' Finset.univ_nonempty (sourceHeight w) | |
| lemma sourceHeight_le_max (w : V β V β β) (x : V) : sourceHeight w x β€ maxSourceHeight w := | |
| Finset.le_sup' (sourceHeight w) (Finset.mem_univ x) | |
| lemma one_le_maxSourceHeight (w : V β V β β) : 1 β€ maxSourceHeight w := by | |
| obtain β¨xβ© := (inferInstance : Nonempty V) | |
| exact (one_le_sourceHeight w x).trans (sourceHeight_le_max w x) | |
| lemma maxSourceHeight_bound (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) : maxSourceHeight w β€ 4^K := by | |
| exact Finset.sup'_le _ _ (fun x _ => sourceHeight_bound w K hw x) | |
| noncomputable def sourceLevels (w : V β V β β) (K : β) : β := | |
| (dyadicLevel (2*K) (maxSourceHeight w)).val | |
| lemma sourceLevels_le (w : V β V β β) (K : β) : sourceLevels w K β€ 2*K := by | |
| have := (dyadicLevel (2*K) (maxSourceHeight w)).isLt | |
| dsimp [sourceLevels]; omega | |
| lemma maxSourceHeight_lt (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) : | |
| maxSourceHeight w < (2:β)^(sourceLevels w K+1) := by | |
| apply dyadic_upper | |
| convert maxSourceHeight_bound w K hw using 1 | |
| rw [pow_mul]; norm_num | |
| abbrev SourceVertex (V : Type*) [LinearOrder V] (K : β) := Vertex V (LogicalEdge V) (4*(2*K+2)) | |
| abbrev SourceRealEdge (V : Type*) [LinearOrder V] (K : β) := LogicalEdge V Γ Fin (4*(2*K+2)+1) | |
| def realLeft (K : β) (e : SourceRealEdge V K) : SourceVertex V K := | |
| atVertex source target (4*(2*K+2)) e.1 e.2.castSucc | |
| def realRight (K : β) (e : SourceRealEdge V K) : SourceVertex V K := | |
| atVertex source target (4*(2*K+2)) e.1 e.2.succ | |
| noncomputable def sourceRealB (w : V β V β β) (K : β) : SourceVertex V K β SourceVertex V K β β := | |
| realBottleneck source target (2*K+2) (fun e => bottleneck w (source e) (target e)) | |
| (fun e => sourceHeight w (source e)) (fun e => sourceHeight w (target e)) (logicalActivity w) | |
| lemma source_profile_strength (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) (e : SourceRealEdge V K) : | |
| sourceRealB w K (realLeft K e) (realRight K e) = | |
| profileActivity (2*K+2) (bottleneck w (source e.1) (target e.1)) | |
| (sourceHeight w (source e.1)) (sourceHeight w (target e.1)) | |
| (bottleneck w (source e.1) (target e.1)) e.2 := by | |
| apply source_effective_profile | |
| Β· omega | |
| Β· intro e; exact sourceHeight_nonneg w _ | |
| Β· intro e; exact sourceHeight_nonneg w _ | |
| Β· intro f | |
| rw [show 2*K+2-1=2*K+1 by omega] | |
| exact profile_innermost K _ _ (one_le_bottleneck _ _ _) (sourceHeight_bound w K hw _) | |
| lemma source_strength_incident_near (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) | |
| (x : SourceVertex V K) (e f : SourceRealEdge V K) | |
| (he : Incident (realLeft K) (realRight K) e x) | |
| (hf : Incident (realLeft K) (realRight K) f x) : | |
| sourceRealB w K (realLeft K e) (realRight K e) β€ 2*sourceRealB w K (realLeft K f) (realRight K f) := by | |
| simp only [source_profile_strength w K hw] | |
| apply effective_profile_incident_near source target (2*K+2) (by omega) | |
| (fun e => bottleneck w (source e) (target e)) (sourceHeight w) | |
| Β· intro e; exact zero_le_one.trans (one_le_bottleneck _ _ _) | |
| Β· exact sourceHeight_nonneg w | |
| Β· intro e | |
| exact β¨bottleneck_le_sourceHeight w (source_ne_target e),by | |
| rw [bottleneck_comm]; exact bottleneck_le_sourceHeight w (source_ne_target e).symmβ© | |
| Β· intro e | |
| rw [show 2*K+2-1=2*K+1 by omega] | |
| exact profile_innermost K _ _ (one_le_bottleneck _ _ _) (sourceHeight_bound w K hw _) | |
| Β· intro e | |
| rw [show 2*K+2-1=2*K+1 by omega] | |
| exact profile_innermost K _ _ (one_le_bottleneck _ _ _) (sourceHeight_bound w K hw _) | |
| Β· exact he | |
| Β· exact hf | |
| lemma profile_upper (p : β) (B HU HV lam T : β) (hB : B β€ T) (hU : HU β€ T) (hV : HV β€ T) | |
| (hU0 : 0 β€ HU) (hV0 : 0 β€ HV) (hlam : lam β€ T) (i : Fin (4*p+1)) : | |
| profileActivity p B HU HV lam i β€ T := by | |
| rcases lt_trichotomy i.val (2*p) with h | h | h | |
| Β· rw [profile_left _ _ _ _ _ _ h] | |
| exact max_le hB ((div_le_self hU0 (one_le_powβ (by norm_num))).trans hU) | |
| Β· have hi : i=β¨2*p,by omegaβ© := Fin.ext h | |
| rw [hi,profile_center]; exact hlam | |
| Β· rw [profile_right _ _ _ _ _ _ h] | |
| exact max_le hB ((div_le_self hV0 (one_le_powβ (by norm_num))).trans hV) | |
| lemma source_strength_le_max (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) (e : SourceRealEdge V K) : | |
| sourceRealB w K (realLeft K e) (realRight K e) β€ maxSourceHeight w := by | |
| rw [source_profile_strength w K hw] | |
| have hb := (bottleneck_le_sourceHeight w (source_ne_target e.1)).trans (sourceHeight_le_max w _) | |
| exact profile_upper _ _ _ _ _ _ hb (sourceHeight_le_max w _) (sourceHeight_le_max w _) | |
| (sourceHeight_nonneg w _) (sourceHeight_nonneg w _) hb _ | |
| lemma sourceRealB_comm (w : V β V β β) (K : β) (x y : SourceVertex V K) : | |
| sourceRealB w K x y = sourceRealB w K y x := bottleneck_comm _ _ _ | |
| lemma sourceRealB_tri (w : V β V β β) (K : β) (x y z : SourceVertex V K) | |
| (hxy : x β y) (hxz : x β z) (hyz : y β z) : | |
| min (sourceRealB w K x z) (sourceRealB w K z y) β€ sourceRealB w K x y := | |
| bottleneck_ultrametric _ _ _ _ hxy hxz hyz | |
| lemma sourceRealB_floor (w : V β V β β) (K : β) (x y : SourceVertex V K) : | |
| 1 β€ sourceRealB w K x y := one_le_bottleneck _ _ _ | |
| abbrev SourceLabel (w : V β V β β) (K : β) := | |
| Label (sourceRealB w K) (sourceRealB_comm w K) (sourceRealB_tri w K) (sourceLevels w K) | |
| noncomputable def sourceBags (w : V β V β β) (K : β) (x : SourceVertex V K) : | |
| Finset (SourceLabel w K) := | |
| memberships (sourceRealB w K) (sourceRealB_comm w K) (sourceRealB_tri w K) | |
| (realLeft K) (realRight K) (sourceLevels w K) x | |
| noncomputable abbrev sourceTree (w : V β V β β) (K : β) : SimpleGraph (SourceLabel w K) := | |
| tree (sourceRealB w K) (sourceRealB_comm w K) (sourceRealB_tri w K) | |
| lemma sourceTree_isTree (w : V β V β β) (K : β) : (sourceTree w K).IsTree := by | |
| exact β¨tree_connected _ _ _ (sourceRealB_floor w K) _,tree_acyclic _ _ _ _β© | |
| lemma sourceBag_card_le_two (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) (x : SourceVertex V K) : | |
| (sourceBags w K x).card β€ 2 := by | |
| apply membership_count | |
| Β· exact sourceRealB_floor w K | |
| Β· intro e | |
| exact (source_strength_le_max w K hw e).trans_lt (maxSourceHeight_lt w K hw) | |
| Β· exact source_strength_incident_near w K hw | |
| lemma sourceBag_tree_adjacent (w : V β V β β) (K : β) | |
| (hw : β x y, x β y β edgeActivity w x y β€ (4:β)^K) | |
| (x : SourceVertex V K) (a b : SourceLabel w K) | |
| (ha : a β sourceBags w K x) (hb : b β sourceBags w K x) : | |
| a=b β¨ (sourceTree w K).Adj a b := by | |
| apply memberships_tree_bags _ _ _ (sourceRealB_floor w K) (realLeft K) (realRight K) | |
| (sourceLevels w K) (fun e => (source_strength_le_max w K hw e).trans_lt | |
| (maxSourceHeight_lt w K hw)) (source_strength_incident_near w K hw) x a b ha hb | |
| lemma sourceBag_height (w : V β V β β) (K : β) {x y : SourceVertex V K} | |
| (hxy : x β y) (l : SourceLabel w K) (hx : l β sourceBags w K x) | |
| (hy : l β sourceBags w K y) : (2:β)^l.1.val β€ sourceRealB w K x y := by | |
| exact common_height_le _ _ _ (sourceRealB_floor w K) (realLeft K) (realRight K) | |
| (sourceLevels w K) hxy hx hy | |
| end MatchingFPRAS.Enlargement | |
| namespace MatchingFPRAS.Transport | |
| section | |
| open Finset | |
| variable {V E : Type*} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] | |
| variable (inc : E β V β Prop) | |
| noncomputable def support (Q : Finset E) : Finset V := by | |
| classical | |
| exact Finset.univ.filter fun v => β e β Q, inc e v | |
| omit [Fintype E] [DecidableEq V] [DecidableEq E] in | |
| lemma mem_support (Q : Finset E) (v : V) : v β support inc Q β β e β Q, inc e v := by | |
| classical | |
| simp [support] | |
| omit [Fintype E] [DecidableEq V] [DecidableEq E] in | |
| lemma support_eq_of_matching {Q : Finset E} {U : Finset V} (h : MatchingOn inc Q U) : | |
| support inc Q=U := by | |
| ext v | |
| rw [mem_support] | |
| constructor | |
| Β· rintro β¨e,he,hvβ©; exact h.1 e he v hv | |
| Β· intro hv | |
| obtain β¨e,he,_β© := h.2 v hv | |
| exact β¨e,heβ© | |
| abbrev Partial := {Q : Finset E // MatchingOn inc Q (support inc Q)} | |
| abbrev Matchings (U : Finset V) := {M : Finset E // MatchingOn inc M U} | |
| noncomputable instance partialFintype : Fintype (Partial inc) := Fintype.ofFinite _ | |
| noncomputable instance matchingsFintype (U : Finset V) : Fintype (Matchings inc U) := Fintype.ofFinite _ | |
| omit [Fintype E] [DecidableEq V] [DecidableEq E] in | |
| lemma submatching {M Q : Finset E} {U : Finset V} (hM : MatchingOn inc M U) (hQ : QβM) : | |
| MatchingOn inc Q (support inc Q) := by | |
| refine β¨?_,?_β© | |
| Β· intro e he v hv; exact (mem_support inc Q v).mpr β¨e,he,hvβ© | |
| Β· intro v hv | |
| obtain β¨e,he,hevβ© := (mem_support inc Q v).mp hv | |
| refine β¨e,β¨he,hevβ©,?_β© | |
| intro f hf | |
| exact hM.unique (hM.1 e (hQ he) v hev) (hQ hf.1) hf.2 (hQ he) hev | |
| omit [Fintype E] [DecidableEq E] in | |
| lemma support_sdiff_disjoint (Q : Finset E) : Disjoint (support inc Q) (univ \ support inc Q) := by | |
| exact Finset.disjoint_left.mpr (fun x hx hy => (Finset.mem_sdiff.mp hy).2 hx) | |
| noncomputable def expansionEquiv (hinc : β e, β v, inc e v) : | |
| (Ξ£ M : Matchings inc univ, {Q : Finset E // QβM.val}) β | |
| Ξ£ Q : Partial inc, Matchings inc (univ \ support inc Q.val) where | |
| toFun a := β¨β¨a.2.val,submatching inc a.1.property a.2.propertyβ©, | |
| β¨a.1.val \ a.2.val,a.1.property.sdiff | |
| (submatching inc a.1.property a.2.property) a.2.propertyβ©β© | |
| invFun a := β¨β¨a.1.val βͺ a.2.val,by | |
| have h := a.1.property.union a.2.property (support_sdiff_disjoint inc a.1.val) | |
| rw [Finset.union_sdiff_of_subset (Finset.subset_univ _)] at h | |
| exact hβ©,β¨a.1.val,Finset.subset_union_leftβ©β© | |
| left_inv a := by | |
| rcases a with β¨M,Q,hQβ© | |
| have h : Q βͺ (M.val \ Q)=M.val := Finset.union_sdiff_of_subset hQ | |
| apply Sigma.ext (Subtype.ext h) | |
| change HEq (β¨Q,Finset.subset_union_leftβ© : {R : Finset E // R β Q βͺ (M.val \ Q)}) | |
| (β¨Q,hQβ© : {R : Finset E // R β M.val}) | |
| exact (Subtype.heq_iff_coe_eq (fun R => by rw [h])).mpr rfl | |
| right_inv a := by | |
| rcases a with β¨Q,Mβ© | |
| have hd : Disjoint Q.val M.val := Q.property.disjoint_edges M.property hinc | |
| (support_sdiff_disjoint inc Q.val) | |
| change (β¨Q,β¨(Q.val βͺ M.val) \ Q.val,_β©β© : | |
| Ξ£ Q : Partial inc, Matchings inc (univ \ support inc Q.val)) = β¨Q,Mβ© | |
| apply congrArg (fun R : Matchings inc (univ \ support inc Q.val) => | |
| (β¨Q,Rβ© : Ξ£ Q : Partial inc, Matchings inc (univ \ support inc Q.val))) | |
| exact Subtype.ext (Finset.union_sdiff_cancel_left hd) | |
| noncomputable def partitionWeight {R : Type*} [CommSemiring R] (w : E β R) (U : Finset V) : R := | |
| β M : Matchings inc U, β e β M.val, w e | |
| theorem partition_add {R : Type*} [CommSemiring R] (r v : E β R) | |
| (hinc : β e, β x, inc e x) : | |
| partitionWeight inc (fun e => r e+v e) univ = | |
| β Q : Partial inc, (β e β Q.val, v e) * partitionWeight inc r (univ \ support inc Q.val) := by | |
| classical | |
| unfold partitionWeight | |
| have hex (M : Matchings inc univ) : | |
| (β e β M.val, (r e+v e)) = | |
| β Q : {Q : Finset E // QβM.val}, (β e β Q.val, v e) * β e β M.val \ Q.val, r e := by | |
| rw [show (β e β M.val, (r e+v e))=(β e β M.val, (v e+r e)) by | |
| apply Finset.prod_congr rfl; intro e he; exact add_comm _ _] | |
| rw [Finset.prod_add] | |
| exact Finset.sum_subtype _ (fun Q => Finset.mem_powerset) | |
| (fun Q => (β e β Q, v e) * β e β M.val \ Q, r e) | |
| simp_rw [hex,Finset.mul_sum] | |
| have h := (expansionEquiv inc hinc).sum_comp | |
| (fun a => (β e β a.1.val, v e) * β e β a.2.val, r e) | |
| rw [Fintype.sum_sigma,Fintype.sum_sigma] at h | |
| exact h | |
| end | |
| open Finset | |
| variable {V E : Type*} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E] | |
| variable (inc : E β V β Prop) | |
| omit [Fintype E] [DecidableEq V] [DecidableEq E] in | |
| @[simp] lemma support_empty : support inc β =β := by | |
| ext x; simp [support] | |
| noncomputable def emptyPartial : Partial inc := β¨β ,by simp [MatchingOn]β© | |
| omit [Fintype E] [DecidableEq V] [DecidableEq E] in | |
| lemma partial_eq_empty_iff (Q : Partial inc) : Q=emptyPartial inc β Q.val=β := by | |
| exact Subtype.ext_iff | |
| omit [Fintype V] [DecidableEq V] [DecidableEq E] in | |
| lemma partitionWeight_nonneg (r : E β β) (hr : β e,0β€r e) (U : Finset V) : | |
| 0β€partitionWeight inc r U := Finset.sum_nonneg (fun _ _ => Finset.prod_nonneg (fun e _ => hr e)) | |
| omit [Fintype V] [DecidableEq V] [DecidableEq E] in | |
| lemma partitionWeight_mono (r w : E β β) (hr : β e,0β€r e) (hrw : β e,r eβ€w e) | |
| (U : Finset V) : partitionWeight inc r Uβ€partitionWeight inc w U := | |
| Finset.sum_le_sum (fun _ _ => Finset.prod_le_prodβ (fun e _ => hr e) (fun e _ => hrw e)) | |
| lemma pow_mul_linear_le_one (x : β) (hx : 0β€x) (m : β) : | |
| (1+x)^m * (1-(m:β)*x) β€ 1 := by | |
| induction m with | |
| | zero => simp | |
| | succ m ih => | |
| rw [pow_succ,Nat.cast_succ] | |
| have hp : 0β€(1+x)^m := pow_nonneg (by linarith) _ | |
| have h : (1+x) * (1-((m:β)+1)*x) β€ 1-(m:β)*x := by | |
| have hm : 0β€(m:β) := Nat.cast_nonneg _ | |
| nlinarith [sq_nonneg x,mul_nonneg hm (sq_nonneg x)] | |
| calc | |
| _ = (1+x)^m * ((1+x) * (1-((m:β)+1)*x)) := by ring | |
| _ β€ (1+x)^m * (1-(m:β)*x) := mul_le_mul_of_nonneg_left h hp | |
| _ β€ 1 := ih | |
| lemma pow_small_le (x : β) (hx : 0β€x) (m : β) (hm : (m:β)*xβ€1/100) : | |
| (1+x)^mβ€100/99 := by | |
| have hp : 0β€(1+x)^m := pow_nonneg (by linarith) _ | |
| have h := pow_mul_linear_le_one x hx m | |
| nlinarith [mul_nonneg hp (show 0β€1/100-(m:β)*x by linarith)] | |
| lemma all_subsets_pow (x : β) : | |
| (β Q : Finset E, x^Q.card)=(1+x)^Fintype.card E := by | |
| classical | |
| have h := Finset.prod_add (fun _ : E => x) (fun _ => (1:β)) univ | |
| simpa [Finset.prod_const,Finset.prod_const_one,add_comm] using h.symm | |
| omit [DecidableEq V] in | |
| lemma partial_pow_sum_le (x : β) (hx : 0β€x) : | |
| (β Q : Partial inc, x^Q.val.card) β€ (1+x)^Fintype.card E := by | |
| classical | |
| rw [βall_subsets_pow] | |
| calc | |
| _ = β Q β univ.image (Subtype.val : Partial inc β Finset E), x^Q.card := | |
| (Finset.sum_image (fun a _ b _ h => Subtype.ext h)).symm | |
| _ β€ _ := Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) | |
| (fun Q _ _ => pow_nonneg hx _) | |
| theorem finite_inflation (r v : E β β) (hr : β e,0β€r e) (hv : β e,0β€v e) | |
| (hinc : β e,β x,inc e x) (hz : 0<partitionWeight inc r univ) | |
| (x : β) (hx : 0β€x) (hm : (Fintype.card E:β)*xβ€1/100) | |
| (hlocal : β Q : Partial inc, Q.valβ β β | |
| (β e β Q.val, v e) * partitionWeight inc r (univ \ support inc Q.val) / | |
| partitionWeight inc r univ β€ 2*x^Q.val.card) : | |
| 1 β€ partitionWeight inc (fun e => r e+v e) univ / partitionWeight inc r univ β§ | |
| partitionWeight inc (fun e => r e+v e) univ / partitionWeight inc r univ β€ 2 := by | |
| classical | |
| constructor | |
| Β· apply (le_div_iffβ hz).mpr | |
| simpa using partitionWeight_mono inc r (fun e => r e+v e) hr (fun e => le_add_of_nonneg_right (hv e)) univ | |
| Β· let mass (Q : Partial inc) := (β e β Q.val, v e) * | |
| partitionWeight inc r (univ \ support inc Q.val) / partitionWeight inc r univ | |
| have hmass : β Q : Partial inc, mass Q+(if Q=emptyPartial inc then 1 else 0)β€2*x^Q.val.card := by | |
| intro Q | |
| by_cases he : Q=emptyPartial inc | |
| Β· subst Q | |
| norm_num [mass,emptyPartial,hz.ne'] | |
| Β· simpa only [ite_eq_right he,add_zero] using hlocal Q (fun h => he ((partial_eq_empty_iff inc Q).mpr h)) | |
| have hs := Finset.sum_le_sum (s := (univ : Finset (Partial inc))) (fun Q _ => hmass Q) | |
| simp only [Finset.sum_add_distrib,Finset.sum_ite_eq',Finset.mem_univ,ite_true, | |
| βFinset.mul_sum] at hs | |
| have hsum := partial_pow_sum_le inc x hx | |
| have hpow := pow_small_le x hx (Fintype.card E) hm | |
| rw [partition_add inc r v hinc,Finset.sum_div] | |
| change (β Q : Partial inc, mass Q) β€ 2 | |
| linarith | |
| end MatchingFPRAS.Transport | |
| end OAI | |