From 11d97b20b3e86ab42f3a2c92ac9736f3728b1442 Mon Sep 17 00:00:00 2001 From: Per Alexandersson Date: Sun, 22 Nov 2026 19:24:28 +0000 Subject: [PATCH] Anchored Euler capacity transport and forced root-flux budgets (#1878, #1879) Co-Authored-By: Claude Opus 5.5 --- RealRooted.lean | 2 + .../AnchoredCapacity.lean | 278 +++++++++++++ RealRooted/MaWang/ForcingBudget.lean | 374 ++++++++++++++++++ RealRooted/Production.lean | 2 + docs/WORKHORSES.md | 24 +- scripts/import_architecture.json | 4 +- 6 files changed, 670 insertions(+), 14 deletions(-) create mode 100644 RealRooted/EulerianMixedCompatibility/AnchoredCapacity.lean create mode 100644 RealRooted/MaWang/ForcingBudget.lean diff --git a/RealRooted.lean b/RealRooted.lean index 3c12ed178..45c9fd20e 100644 --- a/RealRooted.lean +++ b/RealRooted.lean @@ -597,6 +597,7 @@ public import RealRooted.EulerOperator.Shift public import RealRooted.EulerianCompletion public import RealRooted.EulerianCompletion.ProperPosition public import RealRooted.EulerianMixedCompatibility +public import RealRooted.EulerianMixedCompatibility.AnchoredCapacity public import RealRooted.EulerianMixedCompatibility.Insertion public import RealRooted.EulerianTriangles.LagTwoOperators public import RealRooted.EulerianTriangles.LagTwoRecurrence @@ -669,6 +670,7 @@ public import RealRooted.Laguerre.FiniteCombinations public import RealRooted.MaWang.CubicEndpoint public import RealRooted.MaWang.EndpointClassification public import RealRooted.MaWang.EndpointMultiplicity +public import RealRooted.MaWang.ForcingBudget public import RealRooted.MaWang.IntervalSequence public import RealRooted.Mathlib.Algebra.Polynomial.DifferentialEquation.Degree public import RealRooted.Mathlib.Algebra.Polynomial.DifferentialEquation.EulerSolutions diff --git a/RealRooted/EulerianMixedCompatibility/AnchoredCapacity.lean b/RealRooted/EulerianMixedCompatibility/AnchoredCapacity.lean new file mode 100644 index 000000000..e70ff0455 --- /dev/null +++ b/RealRooted/EulerianMixedCompatibility/AnchoredCapacity.lean @@ -0,0 +1,278 @@ +module + +public import RealRooted.EulerianMixedCompatibility.Insertion +import RealRooted.AffineDerivative +import RealRooted.PosCombo +import RealRooted.CommonInterleaver.SuccDegreeLowDegree +import RealRooted.WagnerX.NonnegativeRoots +import RealRooted.WagnerX.AffineFactors +import RealRooted.MaWang.Weak.DerivativeSign +import RealRooted.SimpleRoots + +/-! +# Anchored Euler capacity transport + +We formalize §§1–4 of the unpublished manuscript +`weyl-operators/notes/anchored-euler-capacity-matrices.md` (RealRooted #1878). +An anchored state `(p,1)` transports an interval of split constant shifts. This is an +actual-state certificate; it supplies neither universal matrix preservation nor an adjacent edge. +-/ + +public section + +open Polynomial + +noncomputable section + +namespace RealRooted + +/-- Every constant shift with level in the closed interval splits. -/ +@[expose] def LevelCapacity (a b : ℝ) (p : ℝ[X]) : Prop := + ∀ s, a ≤ s → s ≤ b → (p - C s).Splits + +/-- Capacity can be restricted to a smaller interval. -/ +theorem LevelCapacity.mono {a b a' b' : ℝ} {p : ℝ[X]} (h : LevelCapacity a b p) + (ha : a ≤ a') (hb : b' ≤ b) : LevelCapacity a' b' p := by + intro s hs ht + exact h s (ha.trans hs) (ht.trans hb) + +/-- The division-free affine identity transporting a level through an anchored Euler step. -/ +theorem eulerInsertionStep_add_const_sub_const (c lambda s : ℝ) (d : ℕ) (p : ℝ[X]) : + eulerInsertionStep c d p + C lambda - C (lambda + c * s) = + eulerInsertionStep 0 d p + C c * (p - C s) := by + simp only [eulerInsertionStep, map_zero, zero_mul, zero_add, map_add, map_mul] + ring + +/-- Inverse affine form of the exact shift identity. Only the algebraic nonzero gate +is needed here; positivity is reserved for interval membership and compatibility. -/ +theorem eulerInsertionStep_add_const_sub_const_div {c : ℝ} (hc : c ≠ 0) + (lambda t : ℝ) (d : ℕ) (p : ℝ[X]) : + eulerInsertionStep c d p + C lambda - C t = + eulerInsertionStep 0 d p + C c * (p - C ((t - lambda) / c)) := by + have h := eulerInsertionStep_add_const_sub_const c lambda ((t - lambda) / c) d p + have heq : lambda + c * ((t - lambda) / c) = t := by field_simp [hc]; ring + rwa [heq] at h + +/-- Positive boundary weight transports compatible shifts, with nonzeroness explicit. -/ +theorem levelCapacity_eulerInsertionStep_add_const + {c a b lambda : ℝ} {d : ℕ} {p : ℝ[X]} (hc : 0 < c) + (hcompat : ∀ s, a ≤ s → s ≤ b → Compatible (eulerInsertionStep 0 d p) (p - C s)) + (hne : ∀ t, lambda + c * a ≤ t → t ≤ lambda + c * b → + eulerInsertionStep c d p + C lambda - C t ≠ 0) : + LevelCapacity (lambda + c * a) (lambda + c * b) + (eulerInsertionStep c d p + C lambda) := by + intro t ht hu + have ha : a ≤ (t - lambda) / c := (le_div_iff₀ hc).2 (by linarith) + have hb : (t - lambda) / c ≤ b := (div_le_iff₀ hc).2 (by linarith) + have hid := eulerInsertionStep_add_const_sub_const_div hc.ne' lambda t d p + rw [hid] + exact (hcompat _ ha hb).splits_add_C_mul hc.le (hid ▸ hne t ht hu) + +/-- Degree growth excludes the zero alternative in compatibility transport. +In particular, this supplies the nonzero gate for PF inputs. -/ +theorem levelCapacity_eulerInsertionStep_add_const_of_degree + {c a b lambda : ℝ} {d : ℕ} {p : ℝ[X]} (hc : 0 < c) + (hp : HasPosLeadingCoeff p) (hd : p.natDegree ≤ d) + (hcompat : ∀ s, a ≤ s → s ≤ b → Compatible (eulerInsertionStep 0 d p) (p - C s)) : + LevelCapacity (lambda + c * a) (lambda + c * b) + (eulerInsertionStep c d p + C lambda) := by + apply levelCapacity_eulerInsertionStep_add_const hc hcompat + intro t _ _ hz + have hdeg := (eulerInsertionStep_degree_pos (c := c) hd hp).1 + have heq := congrArg natDegree hz + simp only [natDegree_sub_C, natDegree_add_C, natDegree_zero] at heq + lia + +/-- Zero boundary weight has a singleton target interval and needs no division. -/ +theorem levelCapacity_eulerInsertionStep_zero_add_const + {lambda : ℝ} {d : ℕ} {p : ℝ[X]} (h : (eulerInsertionStep 0 d p).Splits) : + LevelCapacity lambda lambda (eulerInsertionStep 0 d p + C lambda) := by + intro t ht hu + have : t = lambda := le_antisymm hu ht + simpa [this] using h + +/-- Positive leading coefficient is unchanged by subtracting a constant at positive degree. -/ +private lemma posLeading_sub_const {p : ℝ[X]} (hp : HasPosLeadingCoeff p) + (hd : p.natDegree ≠ 0) (s : ℝ) : HasPosLeadingCoeff (p - C s) := by + change 0 < (p - C s).leadingCoeff + rw [leadingCoeff, natDegree_sub_C, coeff_sub, coeff_C, ite_eq_right hd, sub_zero] + exact hp + +/-- Constant shifts interpolate exactly between two distinct levels. -/ +theorem sub_const_eq_endpoint_combo {a b : ℝ} (hab : a < b) (s : ℝ) (p : ℝ[X]) : + p - C s = C ((b - s) / (b - a)) * (p - C a) + + C ((s - a) / (b - a)) * (p - C b) := by + have hne : b - a ≠ 0 := sub_ne_zero.mpr hab.ne' + have hw : (b - s) / (b - a) + (s - a) / (b - a) = 1 := by field_simp [hne]; ring + have hl : (b - s) / (b - a) * a + (s - a) / (b - a) * b = s := by + field_simp [hne] + ring + calc + p - C s = C (1 : ℝ) * p - C s := by simp + _ = C ((b - s) / (b - a) + (s - a) / (b - a)) * p - + C ((b - s) / (b - a) * a + (s - a) / (b - a) * b) := by rw [hw, hl] + _ = _ := by simp only [map_add, map_mul]; ring + +/-- Two endpoint edges control every shift between them. Endpoints and singleton intervals +are handled without applying strict interlacing to a zero scalar multiple. -/ +theorem strictInterl_sub_const_of_endpoints {p m : ℝ[X]} {a b s : ℝ} + (hp : HasPosLeadingCoeff p) (hd : p.natDegree ≠ 0) (hm : HasPosLeadingCoeff m) + (ha : StrictInterl m (p - C a)) (hb : StrictInterl m (p - C b)) + (hs : a ≤ s) (ht : s ≤ b) : StrictInterl m (p - C s) := by + by_cases hsa : s = a + · simpa [hsa] using ha + by_cases hsb : s = b + · simpa [hsb] using hb + have has : a < s := lt_of_le_of_ne hs (Ne.symm hsa) + have hsb' : s < b := lt_of_le_of_ne ht hsb + have hab : a < b := has.trans hsb' + have hw : 0 < (b - s) / (b - a) := div_pos (sub_pos.mpr hsb') (sub_pos.mpr hab) + have hv : 0 < (s - a) / (b - a) := div_pos (sub_pos.mpr has) (sub_pos.mpr hab) + rw [sub_const_eq_endpoint_combo hab s p] + have hsum := StrictInterl.sum_left_of_common_left + [C ((b - s) / (b - a)) * (p - C a), C ((s - a) / (b - a)) * (p - C b)] m + (by simp only [List.mem_cons, List.not_mem_nil, or_false]; + rintro q (rfl | rfl) + · exact ha.C_mul_right hw.ne' + · exact hb.C_mul_right hv.ne') hm + (by simp only [List.mem_cons, List.not_mem_nil, or_false]; + rintro q (rfl | rfl) + · exact hasPosLeadingCoeff_C_mul hw (posLeading_sub_const hp hd a) + · exact hasPosLeadingCoeff_C_mul hv (posLeading_sub_const hp hd b)) (by simp) + simpa using hsum + +/-- The zero-boundary Euler step is `X` times the affine derivative companion. -/ +theorem eulerInsertionStep_zero_eq_X_mul (d : ℕ) (p : ℝ[X]) : + eulerInsertionStep 0 d p = X * (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) := by + simp only [eulerInsertionStep, map_zero, zero_mul, zero_add] + ring + +/-- A single affine-derivative edge supplies splitness at the corresponding target level. +Degree growth excludes the zero combination. This is the pointwise capacity frontend. -/ +theorem splits_eulerInsertionStep_add_const_sub_const + {p : ℝ[X]} {d : ℕ} {c lambda t : ℝ} (hc : 0 < c) + (hp : HasPosLeadingCoeff p) (hd : p.natDegree ≤ d) + (he : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) + (p - C ((t - lambda) / c))) + (hmnn : HasNonnegCoeffs (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hnn : HasNonnegCoeffs (p - C ((t - lambda) / c))) : + (eulerInsertionStep c d p + C lambda - C t).Splits := by + have hcompat : Compatible (eulerInsertionStep 0 d p) (p - C ((t - lambda) / c)) := by + rw [eulerInsertionStep_zero_eq_X_mul] + exact (Compatible.of_strictInterl + (strictInterl_mul_X_of_strictInterl_of_nonneg he hmnn hnn)).comm + have hid := eulerInsertionStep_add_const_sub_const_div hc.ne' lambda t d p + rw [hid] + apply hcompat.splits_add_C_mul hc.le + rw [← hid] + intro hz + have hdeg := (eulerInsertionStep_degree_pos (c := c) hd hp).1 + have heq := congrArg natDegree hz + simp only [natDegree_sub_C, natDegree_add_C, natDegree_zero] at heq + lia + +/-- Endpoint interpolation and positive-`X` transfer supply all required compatibilities. -/ +theorem compatible_eulerInsertionStep_zero_sub_const_of_endpoints + {p : ℝ[X]} {d : ℕ} {a b s : ℝ} + (hp : HasPosLeadingCoeff p) (hd : p.natDegree ≠ 0) + (hm : HasPosLeadingCoeff (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hmnn : HasNonnegCoeffs (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (ha : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C a)) + (hb : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C b)) + (hnn : HasNonnegCoeffs (p - C s)) (hs : a ≤ s) (ht : s ≤ b) : + Compatible (eulerInsertionStep 0 d p) (p - C s) := by + rw [eulerInsertionStep_zero_eq_X_mul] + exact (Compatible.of_strictInterl (strictInterl_mul_X_of_strictInterl_of_nonneg + (strictInterl_sub_const_of_endpoints hp hd hm ha hb hs ht) hmnn hnn)).comm + +/-- Two endpoint edges give affine capacity transport, with degree-based nonzeroness. -/ +theorem levelCapacity_eulerInsertionStep_add_const_of_endpoints + {p : ℝ[X]} {d : ℕ} {c a b lambda : ℝ} (hc : 0 < c) + (hp : HasPosLeadingCoeff p) (hd : p.natDegree ≠ 0) (hbound : p.natDegree ≤ d) + (hm : HasPosLeadingCoeff (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hmnn : HasNonnegCoeffs (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (ha : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C a)) + (hb : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C b)) + (hnn : ∀ s, a ≤ s → s ≤ b → HasNonnegCoeffs (p - C s)) : + LevelCapacity (lambda + c * a) (lambda + c * b) + (eulerInsertionStep c d p + C lambda) := by + apply levelCapacity_eulerInsertionStep_add_const_of_degree hc hp hbound + intro s hs ht + exact compatible_eulerInsertionStep_zero_sub_const_of_endpoints hp hd hm hmnn ha hb + (hnn s hs ht) hs ht + +/-- On `[0,b]`, the affine-derivative theorem discharges the left endpoint. +The only orbit-specific interlacing premise is the edge at `b`. -/ +theorem levelCapacity_eulerInsertionStep_add_const_of_endpoint + {p : ℝ[X]} {d : ℕ} {c b lambda : ℝ} (hc : 0 < c) + (hp : p.Splits) (hd : p.natDegree ≠ 0) (hbound : p.natDegree ≤ d) + (hpnn : HasNonnegCoeffs p) + (hm : HasPosLeadingCoeff (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hmnn : HasNonnegCoeffs (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hb : StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C b)) + (hnn : ∀ s, 0 ≤ s → s ≤ b → HasNonnegCoeffs (p - C s)) : + LevelCapacity lambda (lambda + c * b) (eulerInsertionStep c d p + C lambda) := by + have hpne : p ≠ 0 := by intro hz; simp [hz] at hd + have ha := strictInterl_affine_derivative_of_nonnegCoeffs hp (by lia) hpnn + (c := (d : ℝ) + 1) (by exact_mod_cast Nat.lt_succ_of_le hbound) + simpa using levelCapacity_eulerInsertionStep_add_const_of_endpoints hc + (hpnn.pos_leadingCoeff hpne) hd hbound hm hmnn (by simpa using ha) hb hnn + +/-- A same-degree polynomial with positive derivative-oriented signs at all roots precedes +that simple split row. We reuse the successor sign theorem by adding a far-right root. -/ +private theorem strictInterl_of_eval_mul_derivative_pos_same + {h m : ℝ[X]} (hh : HasPosLeadingCoeff h) (hs : h.Splits) (hn : h.roots.Nodup) + (hm : HasPosLeadingCoeff m) (hd : m.natDegree = h.natDegree) + (hflux : ∀ r, h.IsRoot r → 0 < m.eval r * h.derivative.eval r) : + StrictInterl m h := by + obtain ⟨bm, hbm⟩ := exists_root_upper_bound m + obtain ⟨bh, hbh⟩ := exists_root_upper_bound h + let R := max bm bh + 1 + have hmR : ∀ r ∈ m.roots, r ≤ R := by + intro r hr + exact (hbm r hr).trans (by dsimp [R]; linarith [le_max_left bm bh]) + have hhR : ∀ r ∈ h.roots, r ≤ R := by + intro r hr + exact (hbh r hr).trans (by dsimp [R]; linarith [le_max_right bm bh]) + have he : StrictInterl h ((X - C R) * m) := by + apply strictInterl_of_eval_mul_derivative_nonpos hh hs hn + (hasPosLeadingCoeff_X_sub_C_mul hm) + · rw [natDegree_mul (X_sub_C_ne_zero R) hm.ne_zero, natDegree_X_sub_C, hd] + lia + · rw [natDegree_mul (X_sub_C_ne_zero R) hm.ne_zero, natDegree_X_sub_C, hd] + lia + · intro r hr + have hrR : r - R ≤ 0 := sub_nonpos.mpr (hhR r ((mem_roots hh.ne_zero).2 hr)) + simp only [eval_mul, eval_sub, eval_X, eval_C] + rw [mul_assoc] + exact mul_nonpos_of_nonpos_of_nonneg hrR (hflux r hr).le + exact he.of_mul_X_sub_C_of_sameDegree_of_roots_le hd hm hh hmR hhR + +/-- Descending-root flux is the only nonautomatic endpoint sign. +Simple nonpositive roots and all degree/leading gates remain explicit. -/ +theorem strictInterl_affineDerivative_sub_const_of_rootFlux + {p : ℝ[X]} {d : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hh : HasPosLeadingCoeff (p - C b)) (hs : (p - C b).Splits) + (hn : (p - C b).roots.Nodup) + (hm : HasPosLeadingCoeff (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative)) + (hd : (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative).natDegree = + (p - C b).natDegree) + (hroots : ∀ r, (p - C b).IsRoot r → r ≤ 0) + (hflux : ∀ r, (p - C b).IsRoot r → p.derivative.eval r < 0 → + ((d : ℝ) + 1) * b < (1 - r) * (-p.derivative.eval r)) : + StrictInterl (C ((d : ℝ) + 1) * p + (1 - X) * p.derivative) (p - C b) := by + apply strictInterl_of_eval_mul_derivative_pos_same hh hs hn hm hd + intro r hr + have hpval : p.eval r = b := sub_eq_zero.mp (by simpa [IsRoot.def] using hr) + have hder : p.derivative.eval r ≠ 0 := by + simpa using (HasSimpleRoots.of_roots_nodup hh.ne_zero hn).eval_derivative_ne_zero hr + have hone : 0 < 1 - r := by linarith [hroots r hr] + have hmass : 0 ≤ ((d : ℝ) + 1) * b := mul_nonneg (by positivity) hb + simp only [eval_add, eval_mul, eval_C, eval_sub, eval_one, eval_X, + derivative_sub, derivative_C, sub_zero, hpval] + rcases lt_or_gt_of_ne hder with hneg | hpos + · have h := hflux r hr hneg + exact mul_pos_of_neg_of_neg (by linarith) hneg + · exact mul_pos (by nlinarith [mul_pos hone hpos]) hpos + +end RealRooted diff --git a/RealRooted/MaWang/ForcingBudget.lean b/RealRooted/MaWang/ForcingBudget.lean new file mode 100644 index 000000000..d49e7d3f8 --- /dev/null +++ b/RealRooted/MaWang/ForcingBudget.lean @@ -0,0 +1,374 @@ +module + +import RealRooted.MaWang.Weak.DerivativeSign +import RealRooted.Interlacing.OuterDifference +import RealRooted.Linear +public import RealRooted.SimpleRoots +public import RealRooted.EulerOperator + +/-! +# Root-flux budgets for forced recurrences + +The exact statewise criterion of the unpublished manuscript +`weyl-operators/notes/forcing-budget-weyl-recurrences.md`, §§1–3 (RealRooted #1879). +The current row must have simple roots. Arbitrary forcing at repeated roots is not covered; +use `LiuWang.strictInterl_derivative_lag_of_combined_flux` with its repeated-root gates instead. +The degree and leading-sign gates are retained even when the current row is constant. +-/ + +public section + +open Polynomial + +noncomputable section + +namespace RealRooted + +/-- Exact weak root-flux criterion for a simple split current row. Shared roots are allowed. -/ +theorem strictInterl_iff_eval_mul_derivative_nonpos + {f q : ℝ[X]} (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) : + StrictInterl f q ↔ ∀ r, f.IsRoot r → q.eval r * f.derivative.eval r ≤ 0 := by + exact ⟨fun h _ hr => h.eval_mul_derivative_nonpos_of_left_root hf hq hr, + strictInterl_of_eval_mul_derivative_nonpos hf hs hn hq hlo hhi⟩ + +/-- Strict root flux is exactly the coprime branch of the directed interlacing criterion. -/ +theorem strictInterl_isCoprime_iff_eval_mul_derivative_neg + {f q : ℝ[X]} (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) : + (StrictInterl f q ∧ IsCoprime f q) ↔ + ∀ r, f.IsRoot r → q.eval r * f.derivative.eval r < 0 := by + constructor + · rintro ⟨h, hc⟩ r hr + exact h.eval_mul_derivative_neg_of_left_root_of_isCoprime hf hq hc hr + · intro h + have he := strictInterl_of_eval_mul_derivative_nonpos hf hs hn hq hlo hhi + (fun r hr => (h r hr).le) + refine ⟨he, isCoprime_of_no_common_real_root_of_isRealRooted hf.ne_zero hs ?_⟩ + intro r hr hqr + have hneg := h r hr + simp [hqr.eq_zero] at hneg + +/-- Strict flux also gives simple roots of the output, including the constant-row boundary. -/ +theorem hasSimpleRoots_of_eval_mul_derivative_neg + {f q : ℝ[X]} (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (h : ∀ r, f.IsRoot r → q.eval r * f.derivative.eval r < 0) : + HasSimpleRoots q := by + obtain ⟨he, hc⟩ := + (strictInterl_isCoprime_iff_eval_mul_derivative_neg hf hs hn hq hlo hhi).2 h + exact (he.hasSimpleRoots_of_isCoprime hc).2 + +/-- Division-free relative root-motion margin. It is valid for every real margin parameter; +nonnegative parameters measure rightward motion relative to the distance to the origin. -/ +theorem strictInterl_sub_theta_iff {f q : ℝ[X]} {c : ℝ} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff (q - C c * theta f)) + (hlo : f.natDegree ≤ (q - C c * theta f).natDegree) + (hhi : (q - C c * theta f).natDegree ≤ f.natDegree + 1) : + StrictInterl f (q - C c * theta f) ↔ + ∀ r, f.IsRoot r → q.eval r * f.derivative.eval r ≤ + c * r * (f.derivative.eval r) ^ 2 := by + rw [strictInterl_iff_eval_mul_derivative_nonpos hf hs hn hq hlo hhi] + apply forall_congr' + intro r + apply imp_congr_right + intro _ + simp only [eval_sub, eval_mul, eval_C, theta, eval_X] + constructor <;> intro h <;> nlinarith [h] + +/-- Quotient form of the relative-motion criterion, using nonvanishing at simple roots. -/ +theorem strictInterl_sub_theta_iff_div {f q : ℝ[X]} {c : ℝ} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff (q - C c * theta f)) + (hlo : f.natDegree ≤ (q - C c * theta f).natDegree) + (hhi : (q - C c * theta f).natDegree ≤ f.natDegree + 1) : + StrictInterl f (q - C c * theta f) ↔ + ∀ r, f.IsRoot r → c * (-r) ≤ -q.eval r / f.derivative.eval r := by + rw [strictInterl_sub_theta_iff hf hs hn hq hlo hhi] + apply forall_congr' + intro r + apply imp_congr_right + intro hr + have hd := (HasSimpleRoots.of_roots_nodup hf.ne_zero hn).eval_derivative_ne_zero hr + have heq : -q.eval r / f.derivative.eval r = + -(q.eval r * f.derivative.eval r) / (f.derivative.eval r) ^ 2 := by + field_simp [hd] + rw [heq, le_div_iff₀ (sq_pos_iff.mpr hd)] + constructor <;> intro h <;> nlinarith [h] + +/-- Adding any scalar multiple of the current row leaves its relative-motion margin unchanged. +Both corrected outputs retain their degree and leading-sign gates. -/ +theorem strictInterl_add_C_mul_sub_theta_iff {f q : ℝ[X]} {a c : ℝ} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff (q - C c * theta f)) + (hlo : f.natDegree ≤ (q - C c * theta f).natDegree) + (hhi : (q - C c * theta f).natDegree ≤ f.natDegree + 1) + (hq' : HasPosLeadingCoeff (q + C a * f - C c * theta f)) + (hlo' : f.natDegree ≤ (q + C a * f - C c * theta f).natDegree) + (hhi' : (q + C a * f - C c * theta f).natDegree ≤ f.natDegree + 1) : + StrictInterl f (q + C a * f - C c * theta f) ↔ + StrictInterl f (q - C c * theta f) := by + rw [strictInterl_sub_theta_iff hf hs hn hq' hlo' hhi', + strictInterl_sub_theta_iff hf hs hn hq hlo hhi] + simp only [eval_add, eval_mul, eval_C] + apply forall_congr' + intro r + apply imp_congr_right + intro hr + simp [hr.eq_zero] + +/-- Positive simultaneous scaling preserves the relative-motion margin. +The original and scaled corrected outputs each keep their degree and leading-sign gates. -/ +theorem strictInterl_C_mul_sub_theta_iff {f q : ℝ[X]} {a c : ℝ} (ha : 0 < a) + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff (q - C c * theta f)) + (hlo : f.natDegree ≤ (q - C c * theta f).natDegree) + (hhi : (q - C c * theta f).natDegree ≤ f.natDegree + 1) + (hq' : HasPosLeadingCoeff (C a * q - C c * theta (C a * f))) + (hlo' : (C a * f).natDegree ≤ (C a * q - C c * theta (C a * f)).natDegree) + (hhi' : (C a * q - C c * theta (C a * f)).natDegree ≤ (C a * f).natDegree + 1) : + StrictInterl (C a * f) (C a * q - C c * theta (C a * f)) ↔ + StrictInterl f (q - C c * theta f) := by + have hn' : (C a * f).roots.Nodup := by rwa [roots_C_mul f ha.ne'] + rw [strictInterl_sub_theta_iff (hasPosLeadingCoeff_C_mul ha hf) (hs.C_mul a) hn' + hq' hlo' hhi', strictInterl_sub_theta_iff hf hs hn hq hlo hhi] + apply forall_congr' + intro r + have hr : (C a * f).IsRoot r ↔ f.IsRoot r := by simp [IsRoot.def, ha.ne'] + have hd : (C a * f).derivative.eval r = a * f.derivative.eval r := by + simp [derivative_mul] + rw [hr] + apply imp_congr_right + intro _ + simp only [eval_mul, eval_C, hd] + rw [show a * q.eval r * (a * f.derivative.eval r) = + (a * a) * (q.eval r * f.derivative.eval r) by ring] + rw [show c * r * (a * f.derivative.eval r) ^ 2 = + (a * a) * (c * r * (f.derivative.eval r) ^ 2) by ring] + exact mul_le_mul_iff_right₀ (mul_pos ha ha) + +/-- Relative-motion margins decrease monotonically for PF current rows. +The corrected outputs keep explicit degree and leading-sign gates. -/ +theorem strictInterl_sub_theta_of_le {f q : ℝ[X]} {c c' : ℝ} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hfnn : HasNonnegCoeffs f) (hcc : c' ≤ c) + (hq : HasPosLeadingCoeff (q - C c * theta f)) + (hlo : f.natDegree ≤ (q - C c * theta f).natDegree) + (hhi : (q - C c * theta f).natDegree ≤ f.natDegree + 1) + (hq' : HasPosLeadingCoeff (q - C c' * theta f)) + (hlo' : f.natDegree ≤ (q - C c' * theta f).natDegree) + (hhi' : (q - C c' * theta f).natDegree ≤ f.natDegree + 1) + (he : StrictInterl f (q - C c * theta f)) : + StrictInterl f (q - C c' * theta f) := by + apply (strictInterl_sub_theta_iff hf hs hn hq' hlo' hhi').2 + intro r hr + have hflux := (strictInterl_sub_theta_iff hf hs hn hq hlo hhi).1 he r hr + have hr0 := roots_nonpos_of_hasNonnegCoeffs hfnn r ((mem_roots hf.ne_zero).2 hr) + exact hflux.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonpos_right hcc hr0) (sq_nonneg _)) + +namespace ForcingBudget + +variable {ι : Type*} {f q H : ℝ[X]} {s : Finset ι} {g : ι → ℝ[X]} + {v : ℝ → ℝ} {ell : ι → ℝ → ℝ} + +/-- At a root, the pointwise recurrence identity expands to the division-free flux budget. -/ +theorem eval_mul_derivative_eq + (hrec : ∀ r, f.IsRoot r → q.eval r = v r * f.derivative.eval r + + ∑ i ∈ s, ell i r * (g i).eval r + H.eval r) + {r : ℝ} (hr : f.IsRoot r) : + q.eval r * f.derivative.eval r = + v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r + + H.eval r * f.derivative.eval r := by + rw [hrec r hr, add_mul, add_mul, Finset.sum_mul] + ring + +/-- Exact finite-family forcing budget, allowing arbitrary real-valued root coefficients. -/ +theorem strictInterl_iff_of_root_identity + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : ∀ r, f.IsRoot r → q.eval r = v r * f.derivative.eval r + + ∑ i ∈ s, ell i r * (g i).eval r + H.eval r) : + StrictInterl f q ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r ≤ + -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r) := by + rw [strictInterl_iff_eval_mul_derivative_nonpos hf hs hn hq hlo hhi] + apply forall_congr' + intro r + apply imp_congr_right + intro hr + rw [eval_mul_derivative_eq hrec hr] + constructor <;> intro h <;> linarith + +/-- Strict finite-family forcing budget, with coprimality as part of the exact conclusion. -/ +theorem strictInterl_isCoprime_iff_of_root_identity + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : ∀ r, f.IsRoot r → q.eval r = v r * f.derivative.eval r + + ∑ i ∈ s, ell i r * (g i).eval r + H.eval r) : + (StrictInterl f q ∧ IsCoprime f q) ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r < + -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r) := by + rw [strictInterl_isCoprime_iff_eval_mul_derivative_neg hf hs hn hq hlo hhi] + apply forall_congr' + intro r + apply imp_congr_right + intro hr + rw [eval_mul_derivative_eq hrec hr] + constructor <;> intro h <;> linarith + +/-- A polynomial recurrence supplies the pointwise identity; its current-row term vanishes. -/ +theorem root_identity_of_recurrence {U V : ℝ[X]} {L : ι → ℝ[X]} + (hrec : q = U * f + V * f.derivative + ∑ i ∈ s, L i * g i + H) + {r : ℝ} (hr : f.IsRoot r) : + q.eval r = V.eval r * f.derivative.eval r + + ∑ i ∈ s, (L i).eval r * (g i).eval r + H.eval r := by + simp [hrec, eval_add, eval_mul, eval_finsetSum, hr.eq_zero] + +/-- Exact polynomial finite-family recurrence budget. No coefficient signs are needed. -/ +theorem strictInterl_iff_of_recurrence {U V : ℝ[X]} {L : ι → ℝ[X]} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : q = U * f + V * f.derivative + ∑ i ∈ s, L i * g i + H) : + StrictInterl f q ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r ≤ + -(V.eval r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, (L i).eval r * (g i).eval r * f.derivative.eval r) := by + exact strictInterl_iff_of_root_identity hf hs hn hq hlo hhi + (fun _ hr => root_identity_of_recurrence hrec hr) + +/-- Strict polynomial finite-family recurrence budget. -/ +theorem strictInterl_isCoprime_iff_of_recurrence {U V : ℝ[X]} {L : ι → ℝ[X]} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : q = U * f + V * f.derivative + ∑ i ∈ s, L i * g i + H) : + (StrictInterl f q ∧ IsCoprime f q) ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r < + -(V.eval r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, (L i).eval r * (g i).eval r * f.derivative.eval r) := by + exact strictInterl_isCoprime_iff_of_root_identity hf hs hn hq hlo hhi + (fun _ hr => root_identity_of_recurrence hrec hr) + +/-- Exact weak budget for a single polynomial lag. -/ +theorem strictInterl_iff_of_one_lag {f q g U V L H : ℝ[X]} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : q = U * f + V * f.derivative + L * g + H) : + StrictInterl f q ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r ≤ + -(V.eval r * (f.derivative.eval r) ^ 2 + L.eval r * g.eval r * f.derivative.eval r) := by + simpa using strictInterl_iff_of_recurrence (s := Finset.univ) + (g := fun _ : Unit => g) (L := fun _ : Unit => L) hf hs hn hq hlo hhi (by simpa using hrec) + +/-- Exact strict budget for a single polynomial lag. -/ +theorem strictInterl_isCoprime_iff_of_one_lag {f q g U V L H : ℝ[X]} + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : q = U * f + V * f.derivative + L * g + H) : + (StrictInterl f q ∧ IsCoprime f q) ↔ ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r < + -(V.eval r * (f.derivative.eval r) ^ 2 + L.eval r * g.eval r * f.derivative.eval r) := by + simpa using strictInterl_isCoprime_iff_of_recurrence (s := Finset.univ) + (g := fun _ : Unit => g) (L := fun _ : Unit => L) hf hs hn hq hlo hhi (by simpa using hrec) + +/-- At a positive derivative, the strict one-lag budget keeps the entire favorable lag margin. -/ +theorem budget_lt_iff_of_pos {D : ℝ} (hD : 0 < D) (H v lag : ℝ) : + H * D < -(v * D ^ 2 + lag * D) ↔ H < -v * D - lag := by + rw [show -(v * D ^ 2 + lag * D) = (-v * D - lag) * D by ring] + exact mul_lt_mul_iff_left₀ hD + +/-- At a negative derivative, dividing the budget reverses its inequality. -/ +theorem budget_lt_iff_of_neg {D : ℝ} (hD : D < 0) (H v lag : ℝ) : + H * D < -(v * D ^ 2 + lag * D) ↔ -v * D - lag < H := by + rw [show -(v * D ^ 2 + lag * D) = (-v * D - lag) * D by ring] + exact mul_lt_mul_right_of_neg hD + +/-- Each lag-to-current edge supplies a nonnegative margin; no lag-to-lag edges are used. -/ +theorem margin_nonneg (hf : HasPosLeadingCoeff f) + (hg : ∀ i ∈ s, HasPosLeadingCoeff (g i)) + (he : ∀ i ∈ s, StrictInterl (g i) f) {r : ℝ} (hr : f.IsRoot r) + (hv : v r ≤ 0) (hl : ∀ i ∈ s, ell i r ≤ 0) : + 0 ≤ -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r) := by + apply neg_nonneg.mpr + apply add_nonpos (mul_nonpos_of_nonpos_of_nonneg hv (sq_nonneg _)) + apply Finset.sum_nonpos + intro i hi + rw [mul_assoc] + exact mul_nonpos_of_nonpos_of_nonneg (hl i hi) + ((he i hi).eval_mul_eval_derivative_nonneg (hg i hi) hf hr) + +/-- Only adverse forcing roots require a quantitative weak budget. -/ +theorem strictInterl_of_adverse_roots + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : ∀ r, f.IsRoot r → q.eval r = v r * f.derivative.eval r + + ∑ i ∈ s, ell i r * (g i).eval r + H.eval r) + (hg : ∀ i ∈ s, HasPosLeadingCoeff (g i)) + (he : ∀ i ∈ s, StrictInterl (g i) f) + (hv : ∀ r, f.IsRoot r → v r ≤ 0) + (hl : ∀ r, f.IsRoot r → ∀ i ∈ s, ell i r ≤ 0) + (hbudget : ∀ r, f.IsRoot r → 0 < H.eval r * f.derivative.eval r → + H.eval r * f.derivative.eval r ≤ + -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r)) : + StrictInterl f q := by + apply (strictInterl_iff_of_root_identity hf hs hn hq hlo hhi hrec).2 + intro r hr + by_cases ha : 0 < H.eval r * f.derivative.eval r + · exact hbudget r hr ha + · exact (le_of_not_gt ha).trans (margin_nonneg hf hg he hr (hv r hr) (hl r hr)) + +/-- With a strictly negative derivative coefficient, nonadverse roots have strict slack. +An adverse-root strict budget gives coprimality and simple output roots. -/ +theorem strictInterl_isCoprime_of_adverse_roots + (hf : HasPosLeadingCoeff f) (hs : f.Splits) (hn : f.roots.Nodup) + (hq : HasPosLeadingCoeff q) (hlo : f.natDegree ≤ q.natDegree) + (hhi : q.natDegree ≤ f.natDegree + 1) + (hrec : ∀ r, f.IsRoot r → q.eval r = v r * f.derivative.eval r + + ∑ i ∈ s, ell i r * (g i).eval r + H.eval r) + (hg : ∀ i ∈ s, HasPosLeadingCoeff (g i)) + (he : ∀ i ∈ s, StrictInterl (g i) f) + (hv : ∀ r, f.IsRoot r → v r < 0) + (hl : ∀ r, f.IsRoot r → ∀ i ∈ s, ell i r ≤ 0) + (hbudget : ∀ r, f.IsRoot r → 0 < H.eval r * f.derivative.eval r → + H.eval r * f.derivative.eval r < + -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r)) : + StrictInterl f q ∧ IsCoprime f q ∧ HasSimpleRoots q := by + have hb : ∀ r, f.IsRoot r → + H.eval r * f.derivative.eval r < + -(v r * (f.derivative.eval r) ^ 2 + + ∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r) := by + intro r hr + by_cases ha : 0 < H.eval r * f.derivative.eval r + · exact hbudget r hr ha + · have hder := (HasSimpleRoots.of_roots_nodup hf.ne_zero hn).eval_derivative_ne_zero hr + have hstrict := mul_neg_of_neg_of_pos (hv r hr) (sq_pos_iff.mpr hder) + have hlag : (∑ i ∈ s, ell i r * (g i).eval r * f.derivative.eval r) ≤ 0 := by + apply Finset.sum_nonpos + intro i hi + rw [mul_assoc] + exact mul_nonpos_of_nonpos_of_nonneg (hl r hr i hi) + ((he i hi).eval_mul_eval_derivative_nonneg (hg i hi) hf hr) + linarith [le_of_not_gt ha] + obtain ⟨he, hc⟩ := + (strictInterl_isCoprime_iff_of_root_identity hf hs hn hq hlo hhi hrec).2 hb + exact ⟨he, hc, (he.hasSimpleRoots_of_isCoprime hc).2⟩ + +end ForcingBudget +end RealRooted diff --git a/RealRooted/Production.lean b/RealRooted/Production.lean index 825703abe..8f0faed98 100644 --- a/RealRooted/Production.lean +++ b/RealRooted/Production.lean @@ -596,6 +596,7 @@ public import RealRooted.EulerOperator.Shift public import RealRooted.EulerianCompletion public import RealRooted.EulerianCompletion.ProperPosition public import RealRooted.EulerianMixedCompatibility +public import RealRooted.EulerianMixedCompatibility.AnchoredCapacity public import RealRooted.EulerianMixedCompatibility.Insertion public import RealRooted.EulerianTriangles.LagTwoOperators public import RealRooted.EulerianTriangles.LagTwoRecurrence @@ -668,6 +669,7 @@ public import RealRooted.Laguerre.FiniteCombinations public import RealRooted.MaWang.CubicEndpoint public import RealRooted.MaWang.EndpointClassification public import RealRooted.MaWang.EndpointMultiplicity +public import RealRooted.MaWang.ForcingBudget public import RealRooted.MaWang.IntervalSequence public import RealRooted.Mathlib.Algebra.Polynomial.DifferentialEquation.Degree public import RealRooted.Mathlib.Algebra.Polynomial.DifferentialEquation.EulerSolutions diff --git a/docs/WORKHORSES.md b/docs/WORKHORSES.md index 572fecb38..9eb9a8782 100644 --- a/docs/WORKHORSES.md +++ b/docs/WORKHORSES.md @@ -17,7 +17,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g |---:|---|---|---| | 72 | `RealRooted.StrictInterl.refl` | `RealRooted.Basic.ProperPosition` | A nonzero real-rooted polynomial is in same-degree proper position with itself. | | 58 | `RealRooted.Interl.toStrictInterl_of_ne` | `RealRooted.Basic.ProperPosition` | | -| 41 | `RealRooted.strictInterl_mul_X_of_strictInterl_of_nonneg` | `RealRooted.WagnerX.NonnegativeRoots` | Nonnegative-coefficients form of Wagner (3): if `f ≪ g` and both polynomials have nonnegative coefficients, then `g ≪ X * f`. | +| 42 | `RealRooted.strictInterl_mul_X_of_strictInterl_of_nonneg` | `RealRooted.WagnerX.NonnegativeRoots` | Nonnegative-coefficients form of Wagner (3): if `f ≪ g` and both polynomials have nonnegative coefficients, then `g ≪ X * f`. | | 34 | `RealRooted.StrictInterl.C_mul_left` | `RealRooted.Basic.ProperPosition` | Multiplying the left polynomial in a proper-position relation by a nonzero real scalar preserves proper position. | | 33 | `RealRooted.StrictInterl.C_mul_right` | `RealRooted.Basic.ProperPosition` | Multiplying the right polynomial in a proper-position relation by a nonzero real scalar preserves proper position. | | 27 | `RealRooted.strictInterl_of_allComboRealRooted` | `RealRooted.ObreschkoffConverse.Converse` | **Obreschkoff's theorem** (Brändén, Theorem 7.7.3): `f` and `g` interlace if and only if every polynomial in the real linear span `{αf + βg : α, β ∈ ℝ}` is real-rooted (or zero). | @@ -105,9 +105,9 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| +| 6 | `RealRooted.Compatible.of_strictInterl` | `RealRooted.CommonInterleaver.SuccDegreeLowDegree` | A `StrictInterl` relation implies Chudnovsky--Seymour nonnegative compatibility. | | 6 | `RealRooted.Compatible.self_X_mul_of_splits` | `RealRooted.Compatibility.Pair` | A split polynomial is compatible with its `X`-multiple. | | 6 | `RealRooted.Compatible.self_of_splits` | `RealRooted.Compatibility.Pair` | A split polynomial is compatible with itself. | -| 5 | `RealRooted.Compatible.of_strictInterl` | `RealRooted.CommonInterleaver.SuccDegreeLowDegree` | A `StrictInterl` relation implies Chudnovsky--Seymour nonnegative compatibility. | | 4 | `RealRooted.Compatible.of_commonInterleaver` | `RealRooted.Compatibility.Basic` | A common right interleaver gives full nonnegative compatibility for a pair. | | 4 | `RealRooted.Compatible.of_commonLeftInterleaver` | `RealRooted.Compatibility.Basic` | A common left interleaver gives full nonnegative compatibility for a pair, not just the strictly positive `PosComboRealRooted` condition. | | 4 | `RealRooted.hasCommonInterleaver_of_pairwiseHasCommonInterleaver` | `RealRooted.CommonInterleaver.FamilyUpgrade` | If every member of `fs` splits and has positive leading coefficient, then pairwise common right interleavers upgrade to a single common right interleaver. | @@ -235,7 +235,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 90 | `RealRooted.roots_nonpos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A real polynomial with nonnegative coefficients has no positive real roots. | +| 91 | `RealRooted.roots_nonpos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A real polynomial with nonnegative coefficients has no positive real roots. | | 45 | `RealRooted.IsPFPolynomial.roots_nonpos` | `RealRooted.PFPolynomial` | | | 20 | `RealRooted.hasNonnegCoeffs_iff_pos_leadingCoeff_and_roots_nonpos` | `RealRooted.WagnerX.NonnegativeRoots` | | | 17 | `RealRooted.roots_neg_of_hasNonnegCoeffs_of_coeff_zero_ne` | `RealRooted.Basic.Coefficients` | A nonnegative-coefficient polynomial with nonzero constant coefficient has strictly negative roots. | @@ -249,12 +249,12 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 7 | `Polynomial.roots_reverse_eq_map_inv` | `RealRooted.Mathlib.Algebra.Polynomial.Reverse` | If `p` splits over a field and `p 0 ≠ 0`, the roots of `p.reverse` are the inverses of the roots of `p`, retaining multiplicity. | | 7 | `RealRooted.HasSimpleRoots.roots_count_eq_one` | `RealRooted.SimpleRoots` | At a simple real root the root multiset carries exactly one copy. | | 7 | `RealRooted.Polynomial.exists_strictMono_roots` | `RealRooted.Bezoutian.RootEvaluation` | | +| 7 | `RealRooted.exists_root_upper_bound` | `RealRooted.Basic.PolynomialFacts` | Every polynomial has an upper bound for its roots. | | 7 | `RealRooted.rootCountAbove_diff_le_one_of_nonRoot_isRoot` | `RealRooted.RootCountJump` | `IsRoot`-form wrapper for `rootCountAbove_diff_le_one_of_nonRoot`. | | 6 | `RealRooted.DegreeDropReversal.isRoot_reflect_inv_iff` | `RealRooted.DegreeDropReversal` | Reflection sends a nonzero root to its inverse at any valid degree bound. | | 6 | `RealRooted.MaWang.exists_isRoot_ge_of_eval_nonpos_of_tendsto_atTop_atTop` | `RealRooted.MaWang.StrictSigns.Assembly` | Right-hand IVT bridge: if a polynomial is nonpositive at `r` and tends to `+∞` at `+∞`, then it has a real root to the right of `r`. | | 6 | `RealRooted.StrictInterl.exists_listAlternates_of_natDegree_eq` | `RealRooted.Basic.ProperPosition` | Same-degree proper position exposes sorted root lists in its oriented `ListAlternates` branch. | | 6 | `RealRooted.exists_rightmost_root_of_isRealRooted` | `RealRooted.Basic.PolynomialFacts` | A nonconstant real-rooted polynomial has a rightmost root. | -| 6 | `RealRooted.exists_root_upper_bound` | `RealRooted.Basic.PolynomialFacts` | Every polynomial has an upper bound for its roots. | | 6 | `RealRooted.isRoot_derivative_of_rootMultiplicity_ge_two` | `RealRooted.Derivative.RootCounting` | | | 6 | `RealRooted.noCommonRoot_succ_of_favard` | `RealRooted.Favard` | Consecutive members of a Favard family with positive subdiagonal coefficients have no common real root. | | 6 | `RealRooted.roots_rootPolynomial` | `RealRooted.RootPolynomial` | The roots of `rootPolynomial s`, with multiplicity, are exactly `s`. | @@ -270,7 +270,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 52 | `RealRooted.hasNonnegCoeffs_C` | `RealRooted.Basic.Coefficients` | | | 50 | `RealRooted.hasNonnegCoeffs_X` | `RealRooted.Basic.Coefficients` | | | 49 | `RealRooted.HasNonnegCoeffs.basisTransform` | `RealRooted.BasisTransform` | A basis transform preserves coefficientwise nonnegativity when every basis element has nonnegative coefficients. | -| 44 | `RealRooted.hasPosLeadingCoeff_C_mul` | `RealRooted.Basic.Coefficients` | | +| 46 | `RealRooted.hasPosLeadingCoeff_C_mul` | `RealRooted.Basic.Coefficients` | | | 40 | `RealRooted.HasNonnegCoeffs.weightedSum` | `RealRooted.GarloffWagner.SchurProductPF` | | | 32 | `RealRooted.HasNonnegCoeffs.diagonalOperator` | `RealRooted.MultiplierSequence` | Nonnegative diagonal coefficients preserve nonnegative coefficients. | | 32 | `RealRooted.hasPosLeadingCoeff_of_monic` | `RealRooted.Basic.Coefficients` | | @@ -287,9 +287,9 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 10 | `RealRooted.hasNonnegCoeffs_affine_linear` | `RealRooted.AffineFamily` | | | 9 | `MvPolynomial.HasNonnegCoeffs.add` | `RealRooted.Mathlib.Algebra.MvPolynomial.Nonnegative` | | | 9 | `RealRooted.hasNonnegCoeffs_sum` | `RealRooted.Basic.Coefficients` | | +| 9 | `RealRooted.hasPosLeadingCoeff_X_sub_C_mul` | `RealRooted.Linear` | | | 9 | `RealRooted.hasPosLeadingCoeff_neg` | `RealRooted.Basic.Coefficients` | | | 9 | `RealRooted.hasPosLeadingCoeff_of_X_sub_C_mul` | `RealRooted.Linear` | | -| 9 | `RealRooted.hasPosLeadingCoeff_weightedSum` | `RealRooted.WeightedSum` | A nonnegative weighted sum of positive-leading polynomials has positive leading coefficient when at least one weight is positive. | ## natDegree @@ -385,13 +385,13 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | uses | theorem | module | doc | |---:|---|---|---| -| 432 | `RealRooted.EffectiveBKW.IntPoly2.eval_mul` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate multiplication. | -| 279 | `RealRooted.EffectiveBKW.IntPoly2.eval_add` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate addition. | +| 434 | `RealRooted.EffectiveBKW.IntPoly2.eval_mul` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate multiplication. | +| 281 | `RealRooted.EffectiveBKW.IntPoly2.eval_add` | `RealRooted.EffectiveBKW.Certificate.ListPoly` | Evaluation commutes with bivariate addition. | | 19 | `RealRooted.bezoutEntry.wronskian` | `RealRooted.Bezoutian.RootEvaluation` | | | 16 | `RealRooted.eval_pos_of_all_roots_lt` | `RealRooted.WagnerRightSum.Sign` | | +| 13 | `RealRooted.StrictInterl.eval_mul_eval_derivative_nonneg` | `RealRooted.MaWang.Weak.DerivativeSign` | Every interlacer `g ≪ f` with positive leading coefficients has the sign of `f'` at the roots of `f`: `g(r) f'(r) ≥ 0`. | | 13 | `RealRooted.eval_complexify_ne_zero_of_splits_of_im_pos` | `RealRooted.HermiteBiehler.Basic` | A nonzero split real polynomial has no root in the open upper half-plane. | | 13 | `RealRooted.eval_pos_of_hasNonnegCoeffs` | `RealRooted.Basic.Coefficients` | A nonzero polynomial with nonnegative coefficients is strictly positive at every strictly positive real argument. | -| 12 | `RealRooted.StrictInterl.eval_mul_eval_derivative_nonneg` | `RealRooted.MaWang.Weak.DerivativeSign` | Every interlacer `g ≪ f` with positive leading coefficients has the sign of `f'` at the roots of `f`: `g(r) f'(r) ≥ 0`. | | 10 | `RealRooted.eval_hermiteBiehlerPolynomial` | `RealRooted.HermiteBiehler.Basic` | | | 10 | `RealRooted.wronskian_eval_nonneg_of_strictInterl` | `RealRooted.Wronskian.WeakForward` | Interlacing with positive leading coefficients gives global nonnegativity of the oriented Wronskian. | | 9 | `RealRooted.eval_derivative_ne_zero_of_rootMultiplicity_eq_one` | `RealRooted.Derivative.Algebra` | The derivative does not vanish at a root of multiplicity one. | @@ -401,12 +401,12 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 8 | `RealRooted.tendsto_eval_atBot_atTop_of_posLeadingCoeff_even` | `RealRooted.WagnerRightSum.Sign` | | | 8 | `RealRooted.wronskian_pos_of_strictInterl_succ` | `RealRooted.Wronskian.Forward` | **Global forward Wronskian bridge, degree gap one.** If `q` strictly interlaces `p` in the differ-by-one sense (`StrictInterl q p` with `deg p = deg q + 1`, all roots simple and no common root), then | | 7 | `MvPolynomial.eval_specializeAt` | `RealRooted.Mathlib.Algebra.MvPolynomial.Specialize` | Evaluation after scalar specialization is evaluation at the updated assignment. | +| 7 | `RealRooted.StrictInterl.eval_mul_derivative_nonpos_of_left_root` | `RealRooted.Interlacing.OuterDifference` | At a root of the left polynomial in a positive-leading interlacing pair, the right value and left derivative have nonpositive product. | | 7 | `RealRooted.deriv2_mul_lt_deriv_sq_at_non_root` | `RealRooted.IteratedDerivativeShift` | | | 7 | `RealRooted.eval_neg_of_all_roots_gt_of_odd` | `RealRooted.WagnerRightSum.Sign` | | | 7 | `RealRooted.eval_pos_of_all_roots_gt_of_even` | `RealRooted.WagnerRightSum.Sign` | | | 7 | `RealRooted.isPFMultiplierSequence_inv_ascPochhammer` | `RealRooted.MultiplierSequence.InvPochhammer` | **The reciprocal rising factorials `1 / (α)_k`, for `α > 0`, form a PF multiplier sequence.** | | 6 | `RealRooted.EffectiveBKW.Branch.check_sound` | `RealRooted.EffectiveBKW.Certificate.Branch` | A checked branch is continuous, lies on the curve, and stays inside every covering strip. | -| 6 | `RealRooted.StrictInterl.eval_mul_derivative_nonpos_of_left_root` | `RealRooted.Interlacing.OuterDifference` | At a root of the left polynomial in a positive-leading interlacing pair, the right value and left derivative have nonpositive product. | | 6 | `RealRooted.eval_complexify_oddEvenPolynomial` | `RealRooted.HermiteBiehler.OddEven` | | | 6 | `RealRooted.eval_complexify_ofReal` | `RealRooted.HermiteBiehler.Converse.Wronskian` | Value of a complexified real polynomial at a real point. | | 6 | `RealRooted.exists_left_endpoint_sign` | `RealRooted.RootCounting.SignChanges` | A positive-leading degree-`d` polynomial has the sign `(-1)^d` sufficiently far to the left. | @@ -546,7 +546,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g |---:|---|---|---| | 45 | `RealRooted.StrictInterl.hasSimpleRoots_of_no_common_root` | `RealRooted.SimpleRoots` | A strictly interlacing pair with no common real root has simple real roots in both entries. | | 34 | `RealRooted.allComboRealRooted_of_strictInterl` | `RealRooted.ObreschkoffConverse.Forward` | Forward direction of Obreschkoff: if `f ≪ g` then all real combinations `αf + βg` are real-rooted (or zero). | -| 21 | `RealRooted.HasSimpleRoots.of_roots_nodup` | `RealRooted.SimpleRoots` | A nonzero polynomial with a duplicate-free root multiset has simple real roots. | +| 23 | `RealRooted.HasSimpleRoots.of_roots_nodup` | `RealRooted.SimpleRoots` | A nonzero polynomial with a duplicate-free root multiset has simple real roots. | | 16 | `RealRooted.IsRealRootedIn.mem_of_mem_roots` | `RealRooted.RootLocation.Basic` | Every multiset root of a polynomial rooted in `S` lies in `S`. | | 15 | `MvPolynomial.IsRayleigh.specializeAt` | `RealRooted.Multiaffine.Rayleigh` | Real scalar specialization preserves the Rayleigh property. | | 15 | `RealRooted.MapsRealRootedIn.mono_left` | `RealRooted.RootLocation.Basic` | Shrinking the source set preserves `MapsRealRootedIn`. | @@ -561,6 +561,7 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 9 | `RealRooted.hermiteBiehlerForwardPos` | `RealRooted.HermiteBiehler.Forward` | | | 8 | `MvPolynomial.IsMultiaffine.sum` | `RealRooted.Multiaffine` | | | 8 | `RealRooted.IsRealRootedIn.mem_of_isRoot` | `RealRooted.RootLocation.Basic` | Every root of a polynomial rooted in `S` lies in `S`. | +| 8 | `RealRooted.StrictInterl.hasSimpleRoots_of_isCoprime` | `RealRooted.SimpleRoots` | A coprime strictly interlacing pair has simple real roots in both entries. | | 8 | `RealRooted.mvRealStableOrZero_iff_complexifyMv` | `RealRooted.MultivariateStability` | Weak real stability agrees with weak upper-half-plane stability after complexifying coefficients. | | 8 | `RealRooted.sequence_of_base_and_step` | `RealRooted.SequenceClosure` | Generic sequence induction from one base case and a successor step. | | 7 | `Matrix.IsTotallyNonneg.hurwitzLeadingPrincipal` | `RealRooted.ClassicalHurwitzMatrix.TotallyNonnegative` | Every finite leading principal section inherits total nonnegativity from the infinite classical Hurwitz matrix. | @@ -568,4 +569,3 @@ Counts are lexical estimates: distinctive leaves count unqualified references; g | 7 | `MvPolynomial.IsMultiaffine.esymm` | `RealRooted.Multiaffine` | | | 7 | `ParkingFunction.mem_parkingFunctions_iff` | `RealRooted.Mathlib.Combinatorics.Enumerative.ParkingFunction` | Membership in `parkingFunctions` is the parking-function predicate. | | 7 | `Polynomial.MeshGE.of_natDegree_le_one` | `RealRooted.Mesh.Basic` | A polynomial of degree at most one has mesh at least every nonnegative number. | -| 7 | `Polynomial.natDegree_and_leadingCoeff_quadratic_derivative_add_linear_mul_add` | `RealRooted.Mathlib.Algebra.Polynomial.Derivative` | A nonzero prospective top coefficient gives both the exact degree and leading coefficient of a quadratic-derivative plus linear-multiple step. | diff --git a/scripts/import_architecture.json b/scripts/import_architecture.json index 51dad3fb7..f4b7a6aa0 100644 --- a/scripts/import_architecture.json +++ b/scripts/import_architecture.json @@ -16,10 +16,10 @@ ], "budgets": { "RealRooted": { - "max_modules": 2419 + "max_modules": 2421 }, "RealRooted.Production": { - "max_modules": 2347 + "max_modules": 2349 }, "RealRooted.Tactic.Examples": { "max_modules": 844