import YM.MergeProof.Badlands import YM.MergeProof.North.Thunder import YM.MultipleContact.Bunch.Focal import YM.MultipleContact.Bunch.Dew import YM.MultipleContact.Bunch.Gush import YM.MultipleContact.Bunch.Sugary import YM.MultipleContact.Bunch.Stained import YM.MultipleContact.Bunch.Stator import YM.MultipleContact.Bunch.Wiring import YM.MultipleContact.Bunch.Frost import YM.MultipleContact.Bunch.Fermi import YM.MultipleContact.Bunch.Corn import YM.MultipleContact.Bunch.Lyme import YM.MultipleContact.Bunch.Botan import YM.MultipleContact.Bunch.Junction import YM.MultipleContact.Bunch.Nigella import YM.MultipleContact.Bunch.Buoy import YM.MultipleContact.Bunch.Gild import YM.MultipleContact.Bunch.Farr import YM.MultipleContact.Bunch.Billow import YM.MultipleContact.Bunch.Blot import YM.MultipleContact.Bunch.Pond import YM.MultipleContact.Bunch.Shan import YM.MultipleContact.Bunch.SkyFall import YM.MultipleContact.Bunch.Quark import YM.MultipleContact.Bunch.Menu import YM.MultipleContact.Bunch.Wraith import YM.MultipleContact.Bunch.Thumb import YM.MultipleContact.Bunch.Arbor import YM.MultipleContact.Bunch.Platform import YM.MultipleContact.Bunch.Islands import YM.MultipleContact.Bunch.Quiet import YM.MultipleContact.Bunch.Price import YM.MultipleContact.Bunch.Antique import YM.MultipleContact.Bunch.Apiary import YM.MultipleContact.Bunch.Stable import YM.MultipleContact.Bunch.Belvedere import YM.MultipleContact.Bunch.Thunder /- generalized from YM.MergeProof.North.Muscat to arbitrary arity -/ set_option autoImplicit false set_option linter.unusedSectionVars false noncomputable section namespace YM.MergeProof.BatchRibbons variable {slot:Type}[Fintype slot][DecidableEq slot][Inhabited slot] open Function Filter Lattice RG Pressure Wilson Finset MeasureTheory open Push Marker Source Accent BatchRibbon Local Menu Extra.Histories Motion Merge PhysicalNext.Repeat Lotus open Extra.Multi GridApprox.Nil open Extra.Trajectories MergeProof.Float open scoped Topology BigOperators Classical section variable {V : Type}[Fintype V][DecidableEq V]{G:Gauge} variable (H:History G) {N m p k:ℕ}(δ:ℕ→ℝ)(r:ℕ→ℕ) (D:∀ N p m:ℕ,m (Aged V slot) local notation "P'"=> H.levels.budget local notation "ω"=> (fun i (j:Name V slot)=> w i j.2) local notation "R"=> H.rep N p local notation "Q"=> R N variable {l:Name V slot→ℂ}(σ χ:ℕ→ℝ){μ j:ℕ} {S:∀ m:ℕ,m≤N→ Config G (H.S.side m p)→Poly (Aged V slot)} (h:H.Selected) (hr:Thor (slot:=slot) H δ r D σ χ μ)(ht':μ≤k)(hQ: Migrating H k p N E) (hΔ: ∀ m:ℕ, k ≤ m→∀ hm:m w i j.2) (Aged V slot)) (hO:∀ m:ℕ, k ≤ m→m≤j→∀ i,i≠v→∀ b:slot,o m (i,b)=affine (P i).1 (E m i) (o m (v,b))) local notation "W"=> (fun i (j:Name V slot)=>δ i*w (i+1) j.2) variable (x:ℕ→ℝ) include h hr ht' hQ hΔ hp ht hO local notation "d'"=> (fun i (b:slot)=> (1:ℝ)/(2*w i b)) structure Sprout (i:ℕ)(hn:i≤N) : Prop where flor : ∃ g:Name V slot→ Config G (H.S.side i p)→ℂ,∃ K:Name V slot→ℕ→ Config G (H.S.side i p)→ℂ, (∀ b:slot,Blade (R i) (o i (v,b)) (g (v,b)) (profile (R i).activities (K (v,b))) (l (v,b)) (d' i b)) ∧ (∀ j,Dominated (K j)) ∧ May v P (E i) B g (fun j=> profile (R i).activities (K j)) l ∧ Serves (R i) g (fun j=> profile (R i).activities (K j)) (S i hn) v P (E i) B (o i) (ω i) ((P' i).supportExponent) 1 local notation "X"=> Sprout H E o P v w B (S:=S) (l:=l) variable (hN:j≤N)(hY:∀ m:ℕ,k ≤ m→∀ hi:m (H.levels.clock.op m p).ratio.embed (E m i):= (hQ.mare m hk hx).symm have hv(i:Name V slot):2*w (m+1) i.2*d' (m+1) i.snd ≤1:= by rw [mul_div_cancel₀ _ (by have he:0rfl) (fun i he j=> by rw [show _ = E (m+1) i from (congr_fun hS i).symm]; exact hO (m+1) hi hm i he j) (hS ▸ he) hd hb hv (hY m hk hm) (hX _ hk hm) (hp _ hi hx) have hT := descended H N m p r h hx hA (ht.pos _ hi hm) (ht.pos m hk hm.le) (hP.symm ▸ ht.occ m hk hm.le) (hP.symm ▸ ht.runs m hk hm) hU hG hF rw [hP,← hΔ m hk hx] at hU hT refine ⟨G,F,hU,⟨G,F,fun i=>?_ ,hG,hφ,hT⟩⟩ have he:=hC i; rw [hP] at he; apply he.more change x m*(1/(2*w (m+1) i)) ≤ 1/(2*w m i); rw [← mul_div_assoc]; have hP:0 < w (m+1) i:= ht.pos (m+1) hi hm (v,i);have ht:0 < w m i:=ht.pos m hk hm.le (v,i); exact (div_le_div_iff₀ (by positivity) (by positivity)).mpr (by linarith only [hf m hk hm i]) end end YM.MergeProof.BatchRibbons