From 92428c204bef2cd4b1a327085401c7ca778344c4 Mon Sep 17 00:00:00 2001 From: Per Alexandersson Date: Fri, 2 Oct 2026 14:46:15 +0000 Subject: [PATCH 1/4] =?UTF-8?q?CommonInterleaver:=20delete=20dead=20Chudno?= =?UTF-8?q?vsky=E2=80=93Seymour=20reduction=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chudnovsky–Seymour is proved, so the alternative reduction routes in the CommonInterleaver/Compatibility cluster are dead scaffolding. Delete: - statement defs that no proof consumes (orientation, all-combo bridge, affine-family, boundary-right-pair, degree-close, residual/lead, right-pencil, closed-segment no-gap, endpoint-sign, cubic discriminant and not-splits leaves, duplicate compatible-pair statements); - every theorem conditional on them, and conditional reductions between proved statements that have no callers; - statement aliases of proved theorems (family upgrades, shifted slots); - the tactic syntax, rules and examples that dispatched to them. Refuted statements are deleted together with their names; their checked counterexamples are kept as explicit negated propositions in CommonInterleaverExamples. Co-Authored-By: Claude Opus 5.5 --- .../CommonInterleaver/AffineBoundary.lean | 32 - .../CommonInterleaver/FamilyUpgrade.lean | 30 - .../PairBridge/Compatibility.lean | 170 --- .../Compatibility/NonnegativeShift.lean | 41 - .../PairBridge/Reduction/AllCombo.lean | 82 -- .../PairBridge/Reduction/Basic.lean | 27 - .../PairBridge/SuccDegree/ClosedSegment.lean | 111 -- .../PairBridge/SuccDegree/RootCount.lean | 211 --- .../PairBridge/SuccDegree/RootCrossing.lean | 28 - .../PairBridge/SuccDegree/SlotData.lean | 123 -- .../CommonInterleaver/PairwiseUpgrade.lean | 134 -- .../PairwiseUpgrade/FourWay.lean | 223 +-- .../PairwiseUpgrade/FourWay/Equivalences.lean | 374 ----- .../PairwiseUpgrade/LowDegree.lean | 2 +- RealRooted/CommonInterleaver/RightPencil.lean | 320 ----- .../RootCountCombinatorics.lean | 144 -- .../SameDegreeRootCount.lean | 233 ---- RealRooted/CommonInterleaver/Sequence.lean | 80 +- RealRooted/CommonInterleaver/Statements.lean | 105 -- .../CommonInterleaver/SuccDegreeEndpoint.lean | 391 ------ .../SuccDegreeLowDegree.lean | 97 -- RealRooted/CommonInterleaverExamples.lean | 135 +- .../Compatibility/InterleaverBridge.lean | 130 -- RealRooted/ProductFamily.lean | 2 +- RealRooted/SameDegreeCubicRootCount.lean | 432 ------ .../CommonInterleaver/AnalyticRules.lean | 241 ---- .../CommonInterleaver/AnalyticSyntax.lean | 194 --- .../Tactic/CommonInterleaver/BasicRules.lean | 4 - .../Tactic/CommonInterleaver/BasicSyntax.lean | 8 - .../Tactic/CommonInterleaver/FamilyRules.lean | 657 --------- .../CommonInterleaver/FamilySyntax.lean | 492 ------- .../CommonInterleaver/LowDegreeRules.lean | 33 - .../CommonInterleaver/LowDegreeSyntax.lean | 30 - .../Tactic/Examples/CommonInterleaver.lean | 1213 ++--------------- 34 files changed, 205 insertions(+), 6324 deletions(-) diff --git a/RealRooted/CommonInterleaver/AffineBoundary.lean b/RealRooted/CommonInterleaver/AffineBoundary.lean index fe5798189..e01841c55 100644 --- a/RealRooted/CommonInterleaver/AffineBoundary.lean +++ b/RealRooted/CommonInterleaver/AffineBoundary.lean @@ -64,36 +64,4 @@ theorem pairHasCommonInterleaver_of_strictInterl_right_pair_nonneg have hf : (f ≠ 0 ∧ f.Splits) := isRealRooted_of_X_mul hstrictInterl.2.1.1 hstrictInterl.2.1.2 exact ⟨X * f, strictInterl_self_X_mul_of_nonneg hf.1 hf.2 hfnn, hstrictInterl⟩ -/-- Orienting each boundary pair `(C t * f + g, X * f)` is already enough to -recover the full affine-family hypothesis. The no-common condition for the -boundary pair is automatic from nonnegative coefficients and the original -no-common hypothesis. -/ -theorem posComboNoCommonAffineFamily_of_boundaryRightPairOrientation - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PosComboNoCommonAffineFamilyStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno s t hs ht - let p : ℝ[X] := C t * f + g - have hp_rr : (p ≠ 0 ∧ p.Splits) := by - dsimp [p] - simpa using PosComboRealRooted.isRealRooted_add_left hfg ht - have hp_nn : HasNonnegCoeffs p := by - dsimp [p] - exact (nonnegCoeffs_C_mul ht.le hfnn).add hgnn - have hp_pos : HasPosLeadingCoeff p := hp_nn.pos_leadingCoeff hp_rr.1 - have hXf_pos : HasPosLeadingCoeff (X * f) := hf_pos.X_mul - have hstrictInterl_or : StrictInterl p (X * f) ∨ StrictInterl (X * f) p := by - dsimp [p] - exact hboundary hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno ht - have hno_right : ∀ r, p.IsRoot r → ¬ (X * f).IsRoot r := by - dsimp [p] - exact no_common_boundary_right_pair_of_no_common_nonneg hfnn hgnn hno ht - have hstrictInterl : StrictInterl p (X * f) := - strictInterl_right_pair_of_strictInterl_or_reverse_of_no_common_nonneg - hstrictInterl_or hp_rr.1 hp_rr.2 hp_nn hno_right - have hcombo_rr : - ((C (1 : ℝ) * p + C s * (X * f)) ≠ 0 ∧ (C (1 : ℝ) * p + C s * (X * f)).Splits) := - StrictInterl.isRealRooted_nonneg_combo - hstrictInterl hp_pos hXf_pos (by simp) hs.le (Or.inl zero_lt_one) - grind - end RealRooted diff --git a/RealRooted/CommonInterleaver/FamilyUpgrade.lean b/RealRooted/CommonInterleaver/FamilyUpgrade.lean index a749d8125..47adb8045 100644 --- a/RealRooted/CommonInterleaver/FamilyUpgrade.lean +++ b/RealRooted/CommonInterleaver/FamilyUpgrade.lean @@ -168,21 +168,6 @@ theorem hasCommonInterleaver_of_pairwiseHasCommonInterleaver hasCommonInterleaver_of_pairwiseHasCommonInterleaver_ge_two (f := f) (g := g) (fs := fs) hrr hpos hpair -/-- Global finite-family right upgrade: pairwise common interleavers imply a -single common interleaver under the usual split and positive-leading -hypotheses. -/ -def CommonInterleaverFamilyUpgradeStatement : Prop := - ∀ {fs : List ℝ[X]}, - (∀ f ∈ fs, f.Splits) → - (∀ f ∈ fs, HasPosLeadingCoeff f) → - PairwiseHasCommonInterleaver fs → - HasCommonInterleaver fs - -/-- The proved global finite-family right upgrade, packaged as a statement alias. -/ -theorem commonInterleaverFamilyUpgrade : - CommonInterleaverFamilyUpgradeStatement := - hasCommonInterleaver_of_pairwiseHasCommonInterleaver - /-- Chudnovsky--Seymour `2 ⇒ 3`, left-oriented version: pairwise common left interleavers can be upgraded to a single common left interleaver. -/ private theorem hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver_ge_two @@ -253,21 +238,6 @@ theorem hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver_ge_two (f := f) (g := g) (fs := fs) hrr hpos hpair -/-- Global finite-family left upgrade: pairwise common left interleavers imply a -single common left interleaver under the usual split and positive-leading -hypotheses. -/ -def CommonLeftInterleaverFamilyUpgradeStatement : Prop := - ∀ {fs : List ℝ[X]}, - (∀ f ∈ fs, f.Splits) → - (∀ f ∈ fs, HasPosLeadingCoeff f) → - PairwiseHasCommonLeftInterleaver fs → - HasCommonLeftInterleaver fs - -/-- The proved global finite-family left upgrade, packaged as a statement alias. -/ -theorem commonLeftInterleaverFamilyUpgrade : - CommonLeftInterleaverFamilyUpgradeStatement := - hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver - /-- A common interleaver immediately implies real-rootedness of the full sum, by Wagner's finite-sum theorem on the right. -/ theorem isRealRooted_sum_of_commonInterleaver diff --git a/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean b/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean index f4af9c26c..291f44f91 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean @@ -13,98 +13,6 @@ noncomputable section namespace RealRooted -/-- Reduction of no-common orientation to the all-combinations bridge plus -Obreschkoff converse (`strictInterl_of_allComboRealRooted`). -/ -theorem posComboNoCommonOrientation_of_allComboBridge - (hallBridge : PosComboNoCommonToAllComboBridgeStatement) : - PosComboNoCommonOrientationStatement := by - intro f g hfg hf_pos hg_pos hdeg_lo hdeg_hi hno - have hall : AllComboRealRooted f g := - hallBridge hf_pos hg_pos hfg hdeg_lo hdeg_hi hno - exact - CommonInterleaver.PairBridge.strictInterl_or_reverse_of_allComboRealRooted_ordered - hf_pos hg_pos hall hdeg_lo hdeg_hi - -/-- Converse reduction: the no-common orientation core immediately yields the -all-combinations bridge by passing through `allComboRealRooted_of_strictInterl`. -/ -theorem posComboAllComboBridge_of_noCommonOrientation - (hstep : PosComboNoCommonOrientationStatement) : - PosComboNoCommonToAllComboBridgeStatement := - fun _ _ hf_pos hg_pos hfg hdeg_lo hdeg_hi hno => - allComboRealRooted_of_strictInterl_or_reverse <| - hstep hfg hf_pos hg_pos hdeg_lo hdeg_hi hno - -/-- The two no-common bridge formulations are equivalent: -orientation (`StrictInterl f g ∨ StrictInterl g f`) and all-combinations real-rootedness. -/ -theorem posComboNoCommonBridge_iff_orientation : - PosComboNoCommonToAllComboBridgeStatement ↔ - PosComboNoCommonOrientationStatement := - ⟨posComboNoCommonOrientation_of_allComboBridge, - posComboAllComboBridge_of_noCommonOrientation⟩ - -/-- Reduction of the two-polynomial bridge to an orientation theorem for the -positive-combination cone. If one can show `StrictInterl f g ∨ StrictInterl g f` for every -positive-leading `PosComboRealRooted` pair, then compatibility gives a common -right interleaver immediately. -/ -theorem compatiblePairHasCommonInterleaver_of_posComboOrientation - (horient : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - PosComboRealRooted f g → - StrictInterl f g ∨ StrictInterl g f) : - CompatiblePairHasCommonInterleaverStatement := - fun {_ _} hf_pos hg_pos hfg => - pairHasCommonInterleaver_of_strictInterl_or_reverse <| - horient hf_pos hg_pos (hfg.toPosComboRealRooted hf_pos hg_pos) - -/-- Compatibility-to-common-interleaver reduction through the positive-combo -bridge. -/ -theorem compatiblePairHasCommonInterleaver_of_posComboPair - (hposCombo : PosComboPairHasCommonInterleaverStatement) : - CompatiblePairHasCommonInterleaverStatement := - fun {_ _} hf_pos hg_pos hfg => - hposCombo hf_pos hg_pos - (hfg.toPosComboRealRooted hf_pos hg_pos) - -/-- If one has both the no-common-roots orientation core and degree closeness -for the current `PosComboRealRooted` pair, then the pair has a common right -interleaver. -/ -theorem posComboPairHasCommonInterleaver_of_noCommonOrientation_and_degreeBounds - (hstep : PosComboNoCommonOrientationStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfg : PosComboRealRooted f g) - (hclose : - f.natDegree ≤ g.natDegree + 1 ∧ - g.natDegree ≤ f.natDegree + 1) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by - by_cases hfg_deg : f.natDegree ≤ g.natDegree - · have hstrictInterl_or : StrictInterl f g ∨ StrictInterl g f := - PosComboRealRooted.strictInterl_or_reverse_of_posComboRealRooted_of_no_common - (hstep := fun hfg hf_pos hg_pos hdeg_lo hdeg_hi hno => - hstep hfg hf_pos hg_pos hdeg_lo hdeg_hi hno) - hfg hf_pos hg_pos hfg_deg hclose.2 - exact pairHasCommonInterleaver_of_strictInterl_or_reverse hstrictInterl_or - · have hgf_deg : g.natDegree ≤ f.natDegree := le_of_not_ge hfg_deg - have hstrictInterl_or : StrictInterl g f ∨ StrictInterl f g := - PosComboRealRooted.strictInterl_or_reverse_of_posComboRealRooted_of_no_common - (hstep := fun hfg hf_pos hg_pos hdeg_lo hdeg_hi hno => - hstep hfg hf_pos hg_pos hdeg_lo hdeg_hi hno) - (PosComboRealRooted.comm hfg) hg_pos hf_pos hgf_deg hclose.1 - exact pairHasCommonInterleaver_of_strictInterl_or_reverse (Or.symm hstrictInterl_or) - -/-- If one has both the no-common-roots orientation core and degree closeness -for `PosComboRealRooted` pairs, then every positive-leading `PosComboRealRooted` -pair has a common right interleaver. -/ -theorem posComboPairHasCommonInterleaver_of_noCommonOrientation_and_degreeClose - (hstep : PosComboNoCommonOrientationStatement) - (hdegClose : PosComboNatDegreeCloseStatement) : - PosComboPairHasCommonInterleaverStatement := - fun _ _ hf_pos hg_pos hfg => - posComboPairHasCommonInterleaver_of_noCommonOrientation_and_degreeBounds - hstep hf_pos hg_pos hfg (hdegClose hfg) - /-- Degree-closeness specialization with nonnegative coefficients. -/ theorem posComboNatDegreeClose_of_nonnegCoeffs {f g : ℝ[X]} @@ -117,32 +25,6 @@ theorem posComboNatDegreeClose_of_nonnegCoeffs hfg (hf_pos.ne_zero) (hg_pos.ne_zero) hfnn hgnn -/-- In the nonnegative-coefficient regime, the no-common-roots orientation -core already implies the full positive-combo pair bridge. -/ -theorem posComboPairHasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - (hstep : PosComboNoCommonOrientationStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - posComboPairHasCommonInterleaver_of_noCommonOrientation_and_degreeBounds - hstep hf_pos hg_pos hfg - (posComboNatDegreeClose_of_nonnegCoeffs hf_pos hg_pos hfnn hgnn hfg) - -/-- In the nonnegative-coefficient regime, the affine-family bridge already -implies the full positive-combo pair bridge. -/ -theorem posComboPairHasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - pairHasCommonInterleaver_of_strictInterl_or_reverse <| - posComboOrientation_of_affineFamilyBridge_and_nonnegCoeffs - haffBridge hf_pos hg_pos hfnn hgnn hfg - /-- An ordered positive-combo pair bridge plus the nonnegative degree-closeness theorem gives the unordered pair bridge. -/ theorem posComboPairHasCommonInterleaver_of_orderedBridge_and_nonnegCoeffs @@ -211,32 +93,6 @@ private theorem compatiblePairHasCommonInterleaver_of_nonnegPosComboPairBridge hbridge hf_pos hg_pos hfnn hgnn (hfg.toPosComboRealRooted hf_pos hg_pos) -private theorem nonnegPosComboPairBridge_of_noCommonOrientation - (hstep : PosComboNoCommonOrientationStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - posComboPairHasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - hstep hf_pos hg_pos hfnn hgnn hfg - -private theorem nonnegPosComboPairBridge_of_affineFamilyBridge - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - posComboPairHasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - haffBridge hf_pos hg_pos hfnn hgnn hfg - private theorem nonnegPosComboPairBridge_of_pairDegreeSplit (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : @@ -251,32 +107,6 @@ private theorem nonnegPosComboPairBridge_of_pairDegreeSplit posComboPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs hsame hsucc hf_pos hg_pos hfnn hgnn hfg -/-- Compatibility-to-common-interleaver bridge under no-common orientation and -nonnegative coefficients. -/ -theorem compatiblePairHasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - (hstep : PosComboNoCommonOrientationStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - compatiblePairHasCommonInterleaver_of_nonnegPosComboPairBridge - (nonnegPosComboPairBridge_of_noCommonOrientation hstep) - hf_pos hg_pos hfnn hgnn hfg - -/-- Compatibility bridge under nonnegative coefficients, reduced to the -affine-family bridge. -/ -theorem compatiblePairHasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - compatiblePairHasCommonInterleaver_of_nonnegPosComboPairBridge - (nonnegPosComboPairBridge_of_affineFamilyBridge haffBridge) - hf_pos hg_pos hfnn hgnn hfg - /-- Compatibility bridge under nonnegative coefficients, reduced to the repaired degree-split package with common-interleaver conclusions in both branches. -/ diff --git a/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean b/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean index b1e918b62..c44a02115 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean @@ -206,16 +206,6 @@ theorem compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift posComboPairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift hsame hsucc hf_ne hf_splits hg_ne hg_splits hf_pos hg_pos hfg) -/-- Shifted compatibility bridge from the concrete slot-data endpoints for the -same-degree and succ-degree nonnegative branches. -/ -theorem compatiblePairHasCommonInterleaver_of_slotData_via_nonnegShift - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - (sameDegreePairHasCommonInterleaver_nonneg_of_slotData hsame) - (succDegreePairHasCommonInterleaver_nonneg_of_slotData hsucc) - /-- Shifted compatibility bridge from the root-crossing formulations of the nonnegative same-degree and succ-degree branches. The succ-degree branch also needs the left-splitting input that is part of its slot-data decomposition. -/ @@ -238,37 +228,6 @@ theorem compatiblePairHasCommonInterleaver_of_rootCrossing compatiblePairHasCommonInterleaver_of_rootCrossing_via_nonnegShift hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc -/-- Shifted compatibility bridge from lower-threshold root-count -formulations. The succ-degree left endpoint is supplied by the -root-continuity theorem before shifting. -/ -theorem compatiblePairHasCommonInterleaver_of_rootCount - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCount hsame) - (posComboNoCommonSuccDegreeRootCrossing_of_rootCount hsucc) - -/-- Shifted compatibility bridge from upper-threshold root-count formulations -in both the same-degree and succ-degree branches. -/ -theorem compatiblePairHasCommonInterleaver_of_rootCountAboveBoth - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove hsame) - (posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove hsucc) - -/-- Shifted compatibility bridge from common-non-root lower-threshold root-count -formulations in both branches. -/ -theorem compatiblePairHasCommonInterleaver_of_rootCountNonRoot - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCountNonRoot hsame) - (posComboNoCommonSuccDegreeRootCrossing_of_rootCountNonRoot hsucc) - /-- Shifted compatibility bridge from common-non-root upper-threshold root-count formulations in both branches. -/ theorem compatiblePairHasCommonInterleaver_of_rootCountAboveBothNonRoot diff --git a/RealRooted/CommonInterleaver/PairBridge/Reduction/AllCombo.lean b/RealRooted/CommonInterleaver/PairBridge/Reduction/AllCombo.lean index fb7902969..5c2aa8932 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Reduction/AllCombo.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Reduction/AllCombo.lean @@ -104,86 +104,4 @@ theorem posComboOrientation_of_allComboRealRooted_and_nonnegCoeffs (allComboRealRooted_comm hall) hdeg'' exact Or.symm hstrictInterl' -private theorem allComboRealRooted_of_affineFamilyBridge_and_nonnegCoeffs_ordered - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg_lo : f.natDegree ≤ g.natDegree) - (hdeg_hi : g.natDegree ≤ f.natDegree + 1) : - AllComboRealRooted f g := - allComboRealRooted_of_noCommonBridge_and_nonnegCoeffs_ordered - (fun {f g} hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno => - allComboRealRooted_of_affineFamilyBridge_and_nonnegCoeffs - haffBridge (f := f) (g := g) - hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno) - hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi - -/-- Recursive upgrade of the affine-family no-common bridge to a full -all-combinations result in the nonnegative-coefficient regime. Shared roots are -factored out using the positive-combination recursion, and the bridge is only -used at the terminal no-common quotient. -/ -theorem allComboRealRooted_of_posCombo_and_affineFamilyBridge_and_nonnegCoeffs - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) : - AllComboRealRooted f g := - allComboRealRooted_of_orderedBridge_and_nonnegCoeffs - (fun {f g} hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi => - allComboRealRooted_of_affineFamilyBridge_and_nonnegCoeffs_ordered - (f := f) (g := g) haffBridge hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi) - hf_pos hg_pos hfnn hgnn hfg - -/-- The affine-family bridge therefore yields the full Obreschkoff orientation -alternative for every positive-combination pair with nonnegative coefficients, -not just the no-common case. -/ -theorem posComboOrientation_of_affineFamilyBridge_and_nonnegCoeffs - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) : - StrictInterl f g ∨ StrictInterl g f := by - have hall : AllComboRealRooted f g := - allComboRealRooted_of_posCombo_and_affineFamilyBridge_and_nonnegCoeffs - haffBridge hf_pos hg_pos hfnn hgnn hfg - exact - posComboOrientation_of_allComboRealRooted_and_nonnegCoeffs - hf_pos hg_pos hfnn hgnn hfg hall - -/-- Consequently, the same boundary-right-pair orientation input already gives -the full Obreschkoff orientation alternative for every positive-combination -pair with nonnegative coefficients. -/ -theorem posComboOrientation_of_boundaryRightPairOrientation_and_nonnegCoeffs - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) : - StrictInterl f g ∨ StrictInterl g f := - posComboOrientation_of_affineFamilyBridge_and_nonnegCoeffs - (posComboNoCommonAffineFamily_of_boundaryRightPairOrientation hboundary) - hf_pos hg_pos hfnn hgnn hfg - -/-- The stronger boundary-right-pair hypothesis already contains the honest -same-degree no-common branch in the nonnegative regime. -/ -theorem - boundaryRightPairOrientation_implies_sameDegreeOrientationAlternative_nonneg - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg _ _ => - posComboOrientation_of_boundaryRightPairOrientation_and_nonnegCoeffs - hboundary hf_pos hg_pos hfnn hgnn hfg - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/Reduction/Basic.lean b/RealRooted/CommonInterleaver/PairBridge/Reduction/Basic.lean index ef478eee6..8f5b4cc32 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Reduction/Basic.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Reduction/Basic.lean @@ -13,33 +13,6 @@ noncomputable section namespace RealRooted -/-- Affine-family bridge upgraded to the all-combinations conclusion in the -nonnegative-coefficient regime, via `AffineFamily.allComboRealRooted_of_affine_family_nonneg`. --/ -theorem allComboRealRooted_of_affineFamilyBridge_and_nonnegCoeffs - (haffBridge : PosComboNoCommonAffineFamilyStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg_lo : f.natDegree ≤ g.natDegree) - (hdeg_hi : g.natDegree ≤ f.natDegree + 1) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) : - AllComboRealRooted f g := by - have hf0 : f ≠ 0 := hf_pos.ne_zero - have hg0 : g ≠ 0 := hg_pos.ne_zero - have haff : - ∀ {s t : ℝ}, 0 < s → 0 < t → - ((((C s * X + C t) * f) + g) ≠ 0 ∧ - (((C s * X + C t) * f) + g).Splits) := - fun {s t} hs ht => - haffBridge hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno hs ht - exact - allComboRealRooted_of_affine_family_nonneg - hf0 hg0 hfnn hgnn haff - /-- Internal all-combinations orientation bridge for the endpoint layer. -/ protected lemma CommonInterleaver.PairBridge.strictInterl_or_reverse_of_allComboRealRooted_ordered {f g : ℝ[X]} diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean index 03552bb54..3d4fd9667 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean @@ -12,37 +12,6 @@ noncomputable section namespace RealRooted -/-- The compatible common-non-root root-count leaf implies closed-segment -endpoint count equality. The root-count leaf bounds the endpoint upper-count -difference by one in both directions, while the no-crossing hypothesis forces -that difference to be even. -/ -theorem compatibleSuccDegreeClosedSegmentCountEq_of_nonRoot - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - CompatibleSuccDegreeClosedSegmentCountEqStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - obtain ⟨hfg_le, hgf_le⟩ := - hcount hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - exact - compatibleSuccDegreeClosedSegmentCountEq_of_rootCountAbove_bounds - hcomp hf_pos hg_pos hdeg hf_split hxf hxg hseg hfg_le hgf_le - -/-- The compatible root-count target gives the gap-at-most-two target: in -degree at least two this is the derivative induction step, while degrees zero -and one are handled by the explicit low-degree bases. -/ -theorem compatibleSuccDegreeRootCountAboveLeTwo_of_nonRoot - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - CompatibleSuccDegreeRootCountAboveLeTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x _hxf _hxg - by_cases hfdeg : 2 ≤ f.natDegree - · exact compatibleSuccDegreeRootCountAbove_le_two_of_derivative - hcount hcomp hf_pos hg_pos hdeg hf_split hfdeg x - · have hfdeg_le_one : f.natDegree ≤ 1 := - Nat.lt_succ_iff.mp (Nat.lt_of_not_ge hfdeg) - obtain ⟨hfg, hgf⟩ := - compatibleSuccDegreeRootCountAbove_of_natDegree_le_one - hcomp hf_pos hg_pos hdeg hf_split hfdeg_le_one x - constructor <;> linarith - /-- The exact gap-two obstruction closes the compatible common-non-root root-count target. The proof is by strong induction on the lower endpoint degree: low degrees are explicit, while degree at least two uses derivative @@ -120,14 +89,6 @@ theorem compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegment (compatibleSuccDegreeClosedSegmentNoGapTwo_of_countEq hcount) -/-- The closed-segment endpoint count-equality target is equivalent to the -compatible common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeClosedSegmentCountEq_iff_nonRoot : - CompatibleSuccDegreeClosedSegmentCountEqStatement ↔ - CompatibleSuccDegreeRootCountAboveNonRootStatement := - ⟨compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq, - compatibleSuccDegreeClosedSegmentCountEq_of_nonRoot⟩ - /-- Closed-segment endpoint count equality also supplies the positive-combo succ-degree common-non-root upper root-count leaf used by the repaired #42 pair-interleaver route. -/ @@ -137,76 +98,4 @@ theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible (compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq hcount) -/-- Closed-segment no-gap-two supplies the positive-combo succ-degree -common-non-root upper root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentNoGapTwo - (hclosed : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegment hclosed) - -/-- The right-pencil no-gap-two theorem closes the compatible succ-degree -common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_rightFamily - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (compatibleSuccDegreeRootCountAboveNoGapTwo_of_rightFamily hright) - -/-- The endpoint-sign no-gap-two theorem closes the compatible succ-degree -common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSign - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSign hsign) - -/-- The lower-threshold endpoint-sign no-gap theorem closes the compatible -succ-degree common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSignLower - (hlower : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSignLower hlower) - -/-- The exact lower-count endpoint comparison closes the compatible -succ-degree common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (compatibleSuccDegreeRootCountAboveNoGapTwo_of_lowerCountEq hcount) - -/-- Right-pencil no-gap-two supplies the positive-combo succ-degree -common-non-root upper root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_rightFamilyNoGapTwo - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_rightFamily hright) - -/-- Endpoint-sign no-gap-two supplies the positive-combo succ-degree -common-non-root upper root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignNoGapTwo - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSign hsign) - -/-- Lower endpoint-sign no-gap supplies the positive-combo succ-degree -common-non-root upper root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignLower - (hlower : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSignLower hlower) - -/-- Exact lower-count endpoint comparison supplies the positive-combo -succ-degree common-non-root upper root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_lowerCountEq hcount) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean index 6dd9e884d..663584c6d 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean @@ -28,15 +28,6 @@ def PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement : Prop := f.Splits → ∃ h : ℝ[X], StrictInterl h f ∧ StrictInterl h g -/-- The fixed-orientation succ-degree endpoint supplies the common-left -interleaver formulation by using `f` as the witness. -/ -theorem posComboNoCommonSuccDegreeCommonLeftInterleaver_of_orientation - (horient : PosComboNoCommonSuccDegreeOrientationNonnegStatement) : - PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno _hf_split - exact pairHasCommonLeftInterleaver_of_strictInterl <| - horient hf_pos hg_pos hfnn hgnn hfg hdeg hno - /-- A common left interleaver gives the lower common-non-root succ-degree root-count target. The degrees force the left interleaver to have the same degree as `f`, so the same-degree and tight succ-degree oriented count bounds @@ -63,17 +54,6 @@ theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_commonLeftInterleaver posComboNoCommonSuccDegreeRootCountAboveNonRoot_iff_rootCountNonRoot.mpr (posComboNoCommonSuccDegreeRootCountNonRoot_of_commonLeftInterleaver hleft) -/-- The succ-degree root-count formulation implies the descending-root -crossing formulation. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCount - (hcount : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact succDegreeRootCrossing_of_rootCount hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) - /-- The upper-threshold succ-degree root-count formulation implies the descending-root crossing formulation. -/ theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove @@ -85,52 +65,6 @@ theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove exact succDegreeRootCrossing_of_rootCountAbove hf_split hg_split hdeg (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) -/-- The upper-threshold root-count target implies the lower-threshold -root-count target. -/ -theorem posComboNoCommonSuccDegreeRootCount_of_rootCountAbove - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact succDegreeRootCount_of_rootCountAbove hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) - -/-- The lower-threshold root-count target implies the upper-threshold -root-count target. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_of_rootCount - (hcount : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact succDegreeRootCountAbove_of_rootCount hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) - -/-- The lower- and upper-threshold succ-degree root-count targets are -equivalent. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_iff_rootCount : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement ↔ - PosComboNoCommonSuccDegreeRootCountNonnegStatement := - ⟨posComboNoCommonSuccDegreeRootCount_of_rootCountAbove, - posComboNoCommonSuccDegreeRootCountAbove_of_rootCount⟩ - -/-- The lower-threshold succ-degree root-count target follows from the lower -common-non-root formulation. -/ -theorem posComboNoCommonSuccDegreeRootCount_of_rootCountNonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := - posComboNoCommonSuccDegreeRootCount_of_rootCountAbove - (posComboNoCommonSuccDegreeRootCountAbove_of_rootCountNonRoot hcount) - -/-- The succ-degree root-crossing target follows from the lower -common-non-root root-count formulation. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountNonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := - posComboNoCommonSuccDegreeRootCrossing_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_rootCountNonRoot hcount) - /-- The succ-degree root-crossing target follows from the upper common-non-root root-count formulation. -/ theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot @@ -139,149 +73,4 @@ theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove (posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot hcount) -/-- The fixed-orientation succ-degree endpoint implies the upper-threshold -root-count target. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_of_orientation - (horient : PosComboNoCommonSuccDegreeOrientationNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno _hf_split - exact succDegreeRootCountAbove_of_strictInterl - (horient hf_pos hg_pos hfnn hgnn hfg hdeg hno) hdeg - -/-- Upper-threshold `divX` reduction of the right-zero lead branch. - -This is the same reduction as -`posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCount`, -but with the same-degree comparison supplied in the opposite upper-threshold -orientation between `g.divX` and `f`. -/ -theorem - posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCountAbove - (hcount : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - ∀ x : ℝ, - ((g.divX.roots.filter (x < ·)).card : ℤ) ≤ - (f.roots.filter (x < ·)).card ∧ - ((f.roots.filter (x < ·)).card : ℤ) ≤ - (g.divX.roots.filter (x < ·)).card + 1) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement := - posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCount - (fun {f g} hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 x => by - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - have hdiv_split : g.divX.Splits := - (DegreeDropReversal.splits_iff_divX_splits_of_coeff_zero hg0).1 hg_split - have hdiv_deg : g.divX.natDegree = f.natDegree := by - rw [Polynomial.natDegree_divX_eq_natDegree_tsub_one, hdeg] - simp - exact (sameDegreeRootCountAbove_oriented_iff_rootCount_oriented_pointwise - hf_split hdiv_split hdiv_deg x).mp - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 x)) - -/-- `StrictInterl`/`divX` reduction of the right-zero lead branch. - -When `g.coeff 0 = 0`, `g.divX` has the same degree as `f`, so a same-degree -interlacing orientation `StrictInterl (g.divX) f` supplies exactly the oriented -lower-threshold count comparison needed by -`posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCount`. -This packages the whole right-zero lead branch from a checked orientation. -/ -theorem posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_strictInterl - (horient : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement := by - apply posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCount - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 x - have hstrictInterl : StrictInterl (g.divX) f := - horient hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - have hgdivX : g.divX.natDegree = g.natDegree - 1 := - Polynomial.natDegree_divX_eq_natDegree_tsub_one - have hdeg' : f.natDegree = g.divX.natDegree := by - rw [hgdivX] - lia - exact sameDegreeRootCountOriented_of_strictInterl hstrictInterl hdeg' x - -/-- The full lead root-count branch follows from the both-nonzero branch and -the `divX` orientation target for the right-zero branch. -/ -theorem posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_divX_strictInterl - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement := - posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_rightZero hboth - (posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_strictInterl hdivX) - -/-- The residual succ-degree root-count branch follows from an interlacing -orientation in that branch. -/ -theorem posComboNoCommonSuccDegreeRootCountResidual_of_strictInterl - (horient : PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - exact succDegreeRootCount_of_strictInterl - (horient hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0) hdeg - -/-- The succ-degree no-common root-count target splits into exactly two -constant-term branches: the `f.coeff 0 ≠ 0` branch and the residual -`f.coeff 0 = 0`, `g.coeff 0 ≠ 0` branch. The no-common-root hypothesis rules -out the common-`X` branch. -/ -theorem posComboNoCommonSuccDegreeRootCount_of_residual_and_lead - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - by_cases hf0 : f.coeff 0 = 0 - · exact hres hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 - (right_coeff_zero_ne_of_no_common_of_left_coeff_zero hno hf0) - · exact hlead hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 - -/-- The upper-threshold succ-degree no-common root-count target follows from -the two lower-threshold constant-term branches. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_of_residual_and_lead - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := - posComboNoCommonSuccDegreeRootCountAbove_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_residual_and_lead hlead hres) - -/-- The succ-degree root-crossing target follows from the two constant-term -root-count branches. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_residual_and_lead - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := - posComboNoCommonSuccDegreeRootCrossing_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_residual_and_lead hlead hres) - -/-- The lower-threshold succ-degree root-count target follows from the -residual branch, the both-nonzero lead branch, and the right-zero `divX` -orientation target. -/ -theorem posComboNoCommonSuccDegreeRootCount_of_residual_bothNonzero_divX_strictInterl - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := - posComboNoCommonSuccDegreeRootCount_of_residual_and_lead - (posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_divX_strictInterl - hboth hdivX) - hres - -/-- The lower-threshold succ-degree root-count target follows from the -residual orientation target, the both-nonzero lead branch, and the right-zero -`divX` orientation target. -/ -theorem - posComboNoCommonSuccDegreeRootCount_of_residualStrictInterl_bothNonzero_divX_strictInterl - (hresStrictInterl : PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement) - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := - posComboNoCommonSuccDegreeRootCount_of_residual_bothNonzero_divX_strictInterl - hboth hdivX (posComboNoCommonSuccDegreeRootCountResidual_of_strictInterl hresStrictInterl) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCrossing.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCrossing.lean index 791232022..1ef28fe17 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCrossing.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCrossing.lean @@ -57,32 +57,4 @@ theorem rootCrossing_of_listInterlaces {ss rs : List ℝ} succCross_getD_mono hrs_pw (by lia) (by lia) exact le_trans hstep hmono -/-- The fixed-orientation succ-degree statement implies the descending-root -crossing endpoint. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_orientation - (hsucc : PosComboNoCommonSuccDegreeOrientationNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno _ - have hstrictInterl : StrictInterl f g := hsucc hf_pos hg_pos hfnn hgnn hfg hdeg hno - obtain ⟨hf, hg, ss, rs, hss_pw, hrs_pw, hss_eq, hrs_eq, hshape⟩ := hstrictInterl - have hss_len : ss.length = f.natDegree := by - rw [← Multiset.coe_card, hss_eq, card_roots_of_splits hf.2] - have hrs_len : rs.length = g.natDegree := by - rw [← Multiset.coe_card, hrs_eq, card_roots_of_splits hg.2] - have hint : ListInterlaces ss rs := by - rcases hshape with ⟨_, h⟩ | ⟨hlen2, _⟩ - · exact h - · exfalso - rw [hss_len, hrs_len, hdeg] at hlen2 - lia - have hlen : ss.length + 1 = rs.length := by rw [hss_len, hrs_len, hdeg] - have hdf : rootSeqDesc f = ss.reverse := - rootSeqDesc_eq_reverse_of_pairwise hss_pw hss_eq - have hdg : rootSeqDesc g = rs.reverse := - rootSeqDesc_eq_reverse_of_pairwise hrs_pw hrs_eq - obtain ⟨hc1, hc2⟩ := rootCrossing_of_listInterlaces hrs_pw hlen hint - rw [hdf, hdg] - exact ⟨fun j hj1 hj2 => hc1 j hj1 (by rw [hss_len]; exact hj2), - fun j hj1 hj2 => hc2 j hj1 (by rw [hss_len]; exact hj2)⟩ - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean index 38b41a79e..f247956a2 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean @@ -71,21 +71,6 @@ theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing succDegreePairHasCommonInterleaver_nonneg_of_slotData (posComboNoCommonSuccDegreeSlotData_of_rootCrossing hcross) -/-- The corrected succ-degree pair-interleaver endpoint follows directly from -the lower-threshold root-count formulation. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCount - (hcount : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (posComboNoCommonSuccDegreeRootCrossing_of_rootCount hcount) - -/-- Succ-degree slot data from the upper-threshold root-count formulation. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_rootCountAbove - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := - posComboNoCommonSuccDegreeSlotData_of_rootCrossing - (posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove hcount) - /-- The corrected succ-degree pair-interleaver endpoint follows directly from the upper-threshold root-count formulation. -/ theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove @@ -94,14 +79,6 @@ theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing (posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove hcount) -/-- Succ-degree slot data from the common-non-root upper-threshold root-count -formulation. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_nonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := - posComboNoCommonSuccDegreeSlotData_of_rootCountAbove - (posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot hcount) - /-- The repaired succ-degree pair-interleaver endpoint follows from the common-non-root upper-threshold root-count formulation. -/ theorem succDegreePairHasCommonInterleaver_nonneg_of_nonRoot @@ -118,104 +95,4 @@ theorem succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentCountEq succDegreePairHasCommonInterleaver_nonneg_of_nonRoot (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq hcount) -/-- Closed-segment no-gap-two supplies the repaired succ-degree #42 -pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentNoGapTwo - (hclosed : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentNoGapTwo hclosed) - -/-- Right-pencil no-gap-two supplies the repaired succ-degree #42 -pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_rightFamilyNoGapTwo - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_rightFamilyNoGapTwo hright) - -/-- Endpoint-sign no-gap-two supplies the repaired succ-degree #42 -pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_endpointSignNoGapTwo - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignNoGapTwo hsign) - -/-- Lower endpoint-sign no-gap supplies the repaired succ-degree #42 -pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_endpointSignLower - (hlower : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignLower hlower) - -/-- Exact lower-count endpoint comparison supplies the repaired succ-degree -#42 pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_lowerCountEq hcount) - -/-- The repaired succ-degree pair-interleaver endpoint follows from the lower -common-non-root root-count formulation. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCountNonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_rootCountNonRoot hcount) - -/-- The repaired succ-degree pair-interleaver endpoint follows from the two -lower-threshold constant-term root-count branches. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_residual_and_lead - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_residual_and_lead hlead hres) - -/-- The repaired succ-degree pair-interleaver endpoint follows from the -residual branch, the both-nonzero lead branch, and the right-zero `divX` -orientation target. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_residual_bothNonzero_divX_strictInterl - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_residual_bothNonzero_divX_strictInterl - hboth hdivX hres) - -/-- The repaired succ-degree pair-interleaver endpoint follows from the -residual orientation target, the both-nonzero lead branch, and the right-zero -`divX` orientation target. -/ -theorem - succDegreePairHasCommonInterleaver_nonneg_of_residualStrictInterl_bothNonzero_divX_strictInterl - (hresStrictInterl : PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement) - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCount - (posComboNoCommonSuccDegreeRootCount_of_residualStrictInterl_bothNonzero_divX_strictInterl - hresStrictInterl hboth hdivX) - -/-- Succ-degree slot data from left-endpoint real-rootedness and the fixed -orientation. The orientation supplies the root-crossing inequalities. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_leftSplits_and_orientation - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (horient : PosComboNoCommonSuccDegreeOrientationNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := - posComboNoCommonSuccDegreeSlotData_of_leftSplits_and_rootCrossing hsplit - (posComboNoCommonSuccDegreeRootCrossing_of_orientation horient) - -/-- The repaired succ-degree pair-interleaver endpoint follows from -left-endpoint real-rootedness and the fixed orientation. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_leftSplits_and_orientation - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (horient : PosComboNoCommonSuccDegreeOrientationNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_leftSplits_and_rootCrossing hsplit - (posComboNoCommonSuccDegreeRootCrossing_of_orientation horient) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade.lean index 4ad4dcfac..171e9406e 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade.lean @@ -13,20 +13,6 @@ noncomputable section namespace RealRooted -/-- Internal nonnegative pair bridge shared with the four-way package. -/ -protected theorem PairwiseUpgrade.nonnegPairBridge_of_noCommonOrientation - (hstep : PosComboNoCommonOrientationStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - compatiblePairHasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - hstep hf_pos hg_pos hfnn hgnn hfg - /-- Internal degree-split pair bridge shared with the four-way package. -/ protected theorem PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) @@ -42,20 +28,6 @@ protected theorem PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit compatiblePairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs hsame hsucc hf_pos hg_pos hfnn hgnn hfg -/-- Internal affine-family pair bridge shared with the four-way package. -/ -protected theorem PairwiseUpgrade.nonnegPairBridge_of_affineFamilyBridge - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - compatiblePairHasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - haffBridge hf_pos hg_pos hfnn hgnn hfg - /-- Pairwise upgrade using the natural positive-leading two-polynomial bridge. -/ theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos {fs : List ℝ[X]} @@ -69,112 +41,6 @@ theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos (hpos (fs.get j) (List.get_mem _ _)) (hpair i j hij) -/-- Pairwise upgrade from the repaired shifted nonnegative-coefficient -degree-split package. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairDegreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - hsame hsucc) - hpos hpair - -/-- Pairwise upgrade from the slot-data endpoints after shifting each pair -into the nonnegative regime. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_slotData_via_nonnegShift - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_slotData_via_nonnegShift hsame hsucc) - hpos hpair - -/-- Pairwise upgrade from the root-crossing formulations after shifting each -pair into the nonnegative regime. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCrossing_via_nonnegShift - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_rootCrossing_via_nonnegShift - hsame hsplit hsucc) - hpos hpair - -/-- Pairwise upgrade from root-crossing formulations alone. The succ-degree -left endpoint is supplied by root continuity before shifting. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCrossing - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCrossing_via_nonnegShift - hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc hpos hpair - -/-- Pairwise upgrade from lower-threshold root-count formulations. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCount - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCount hsame) - (posComboNoCommonSuccDegreeRootCrossing_of_rootCount hsucc) hpos hpair - -/-- Pairwise upgrade from upper-threshold root-count formulations in both the -same-degree and succ-degree branches. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountAboveBoth - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_rootCountAboveBoth hsame hsucc) - hpos hpair - -/-- Pairwise upgrade from common-non-root lower-threshold root-count -formulations in both branches. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountNonRoot - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_rootCountNonRoot hsame hsucc) - hpos hpair - -/-- Pairwise upgrade from common-non-root upper-threshold root-count -formulations in both branches. -/ -theorem - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountAboveBothNonRoot - {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos - (compatiblePairHasCommonInterleaver_of_rootCountAboveBothNonRoot hsame hsucc) - hpos hpair - /-- Internal pairwise-family lift shared with the four-way package. -/ protected theorem PairwiseUpgrade.pairwiseHasCommonInterleaver_of_nonnegPairBridge {fs : List ℝ[X]} diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean index 5a47fb133..060a43266 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean @@ -29,7 +29,7 @@ private theorem chudnovskySeymour_fourWay_of_pairwiseCompatible_iff_pairwiseComm (h12 : PairwiseCompatible fs ↔ PairwiseHasCommonInterleaver fs) : ChudnovskySeymourFourWayPackage fs := by have h23 : PairwiseHasCommonInterleaver fs ↔ HasCommonInterleaver fs := - ⟨commonInterleaverFamilyUpgrade + ⟨hasCommonInterleaver_of_pairwiseHasCommonInterleaver (fun f hf => (hrr f hf).2) hpos, pairwiseHasCommonInterleaver_of_commonInterleaver⟩ have h34 : HasCommonInterleaver fs ↔ FamilyCompatible fs := @@ -58,146 +58,6 @@ theorem chudnovskySeymour_fourWay_of_pairBridgePos PairwiseUpgrade.fourWay_of_pairwiseCommonForward hrr hpos <| pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos htwo hpos -/-- Four-way Chudnovsky--Seymour package from the honest same-degree/succ-degree -compatibility split. -/ -theorem chudnovskySeymour_fourWay_of_compatibleDegreeSplit - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : CompatibleSameDegreePairHasCommonInterleaverStatement) - (hsucc : CompatibleSuccDegreePairHasCommonInterleaverStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairBridgePos - (hrr := hrr) (hpos := hpos) - (compatiblePairHasCommonInterleaver_of_degreeSplit hsame hsucc) - -/-- Four-way Chudnovsky--Seymour package from the repaired shifted -nonnegative-coefficient degree split. -/ -theorem chudnovskySeymour_fourWay_of_pairDegreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairBridgePos - (hrr := hrr) (hpos := hpos) - (compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - hsame hsucc) - -/-- Four-way Chudnovsky--Seymour package from the concrete slot-data endpoints -for the nonnegative same-degree and succ-degree branches, upgraded by the -nonnegative-shift reduction. -/ -theorem chudnovskySeymour_fourWay_of_slotData_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairBridgePos - (hrr := hrr) (hpos := hpos) - (compatiblePairHasCommonInterleaver_of_slotData_via_nonnegShift hsame hsucc) - -/-- Four-way Chudnovsky--Seymour package from the root-crossing formulations -of the same-degree and succ-degree branches, upgraded by the nonnegative-shift -reduction. -/ -theorem chudnovskySeymour_fourWay_of_rootCrossing_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairBridgePos - (hrr := hrr) (hpos := hpos) - (compatiblePairHasCommonInterleaver_of_rootCrossing_via_nonnegShift - hsame hsplit hsucc) - -/-- Four-way Chudnovsky--Seymour package from root-crossing formulations alone. -The succ-degree left endpoint is supplied by root continuity before shifting. -/ -theorem chudnovskySeymour_fourWay_of_rootCrossing - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_rootCrossing_via_nonnegShift - hrr hpos hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc - -/-- Four-way Chudnovsky--Seymour package from the nonnegative-coefficient -degree-split package, upgraded to arbitrary positive-leading families by a -common translation trick applied pairwise. -/ -theorem chudnovskySeymour_fourWay_of_degreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairDegreeSplit_via_nonnegShift - (fs := fs) hrr hpos - (posComboNoCommonSameDegreePairHasCommonInterleaver_of_orientationAlternative_nonneg - hsame) - hsucc - -/-- Four-way Chudnovsky--Seymour package after the nonnegative shift -reduction, with the succ-degree branch discharged by the affine-family bridge. --/ -theorem chudnovskySeymour_fourWay_of_sameDegreeAlternative_and_affineFamily_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_degreeSplit_via_nonnegShift - (fs := fs) hrr hpos hsame - (posComboNoCommonSuccDegreePairHasCommonInterleaver_of_affineFamily haffBridge) - -/-- Four-way Chudnovsky--Seymour package from the stronger boundary-right-pair -statement, upgraded to arbitrary positive-leading families by the shift -reduction. -/ -theorem chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_sameDegreeAlternative_and_affineFamily_via_nonnegShift - (fs := fs) hrr hpos - (boundaryRightPairOrientation_implies_sameDegreeOrientationAlternative_nonneg - hboundary) - (posComboNoCommonAffineFamily_of_boundaryRightPairOrientation hboundary) - -/-- Same four-way Chudnovsky--Seymour package, with assumptions phrased via the -positive-combination two-polynomial bridge. -/ -theorem chudnovskySeymour_fourWay_of_posComboBridge - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hposComboBridge : PosComboPairHasCommonInterleaverStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairBridgePos - (hrr := hrr) (hpos := hpos) - (compatiblePairHasCommonInterleaver_of_posComboPair hposComboBridge) - -/-- Same four-way package from the reduced positive-combo ingredients: -no-common orientation and degree closeness for `PosComboRealRooted` pairs. -/ -theorem chudnovskySeymour_fourWay_of_noCommonOrientation_and_degreeClose - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hstep : PosComboNoCommonOrientationStatement) - (hdegClose : PosComboNatDegreeCloseStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_posComboBridge - (hrr := hrr) (hpos := hpos) - (posComboPairHasCommonInterleaver_of_noCommonOrientation_and_degreeClose - hstep hdegClose) - /-- Internal four-way package constructor shared with the equivalence layer. -/ protected theorem PairwiseUpgrade.fourWay_of_nonnegPairBridge {fs : List ℝ[X]} @@ -216,18 +76,6 @@ protected theorem PairwiseUpgrade.fourWay_of_nonnegPairBridge PairwiseUpgrade.fourWay_of_pairwiseCommonForward hrr hpos <| PairwiseUpgrade.pairwiseHasCommonInterleaver_of_nonnegPairBridge hbridge hpos hnn -/-- Four-way Chudnovsky--Seymour package from no-common orientation in the -nonnegative-coefficient regime (where degree closeness is automatic). -/ -theorem chudnovskySeymour_fourWay_of_noCommonOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hstep : PosComboNoCommonOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := - PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_noCommonOrientation hstep) - /-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime from the repaired degree split: both same-degree and succ-degree no-common branches are stated directly as common-interleaver bridges. -/ @@ -242,73 +90,4 @@ theorem chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn (PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit hsame hsucc) -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime -from the honest same-degree/succ-degree split, where the succ-degree branch is -stated directly as a common-interleaver bridge. -/ -theorem chudnovskySeymour_fourWay_of_degreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonSameDegreePairHasCommonInterleaver_of_orientationAlternative_nonneg hsame) - hsucc - -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime, -using the repaired same-degree branch and the affine-family bridge for the -succ-degree branch. -/ -theorem chudnovskySeymour_fourWay_of_sameDegreePair_and_affineFamily_nonneg - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hsame - (posComboNoCommonSuccDegreePairHasCommonInterleaver_of_affineFamily haffBridge) - -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime -from the all-combinations bridge. -/ -theorem chudnovskySeymour_fourWay_of_allComboBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hallBridge : PosComboNoCommonToAllComboBridgeStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_noCommonOrientation_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonOrientation_of_allComboBridge hallBridge) - -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime -from the affine-family bridge. -/ -theorem chudnovskySeymour_fourWay_of_affineFamilyBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := - PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_affineFamilyBridge haffBridge) - -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime -from the boundary-right-pair orientation statement. -/ -theorem chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_affineFamilyBridge_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonAffineFamily_of_boundaryRightPairOrientation hboundary) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean index 0c4aed276..4883df4e6 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean @@ -66,113 +66,6 @@ theorem pairwiseCompatible_iff_hasCommonInterleaver_of_pairBridgePos chudnovskySeymour_fourWay_of_pairBridgePos (fs := fs) hrr hpos htwo -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the honest same-degree / -succ-degree compatibility split. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_compatibleDegreeSplit - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : CompatibleSameDegreePairHasCommonInterleaverStatement) - (hsucc : CompatibleSuccDegreePairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_compatibleDegreeSplit - (fs := fs) hrr hpos hsame hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the repaired shifted -nonnegative-coefficient degree split. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_pairDegreeSplit_via_nonnegShift - (fs := fs) hrr hpos hsame hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the concrete slot-data -endpoints after the nonnegative-shift reduction. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_slotData_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_slotData_via_nonnegShift - (fs := fs) hrr hpos hsame hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the root-crossing -formulations after the nonnegative-shift reduction. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_rootCrossing_via_nonnegShift - (fs := fs) hrr hpos hsame hsplit hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from root-crossing formulations -alone. Root continuity supplies the succ-degree left endpoint. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing_via_nonnegShift - hrr hpos hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the nonnegative-coefficient -degree-split package, with the familywise nonnegativity assumption removed by -translation. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_degreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_degreeSplit_via_nonnegShift - (fs := fs) hrr hpos hsame hsucc - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary after the nonnegative shift -reduction, with the succ-degree branch discharged by the affine-family bridge. --/ -theorem - pairwiseCompatible_iff_hasCommonInterleaver_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_sameDegreeAlternative_and_affineFamily_via_nonnegShift - (fs := fs) hrr hpos hsame haffBridge - -/-- Chudnovsky--Seymour `1 ↔ 3` corollary from the stronger -boundary-right-pair statement after the nonnegative shift reduction. -/ -theorem - pairwiseCompatible_iff_hasCommonInterleaver_of_boundaryRightPairOrientation_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_via_nonnegShift - (fs := fs) hrr hpos hboundary - /-- Chudnovsky--Seymour `1 ↔ 4` corollary under the natural positive-leading pair bridge: pairwise compatibility is equivalent to full family compatibility. -/ @@ -186,85 +79,6 @@ theorem pairwiseCompatible_iff_familyCompatible_of_pairBridgePos (pairwiseCompatible_iff_hasCommonInterleaver_of_pairBridgePos (fs := fs) hrr hpos htwo).1 -/-- Chudnovsky--Seymour `1 ↔ 4` specialization from the repaired shifted -nonnegative-coefficient degree split. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_pairDegreeSplit_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - (fs := fs) hrr hpos hsame hsucc).1 - -/-- Chudnovsky--Seymour `1 ↔ 4` specialization from the concrete slot-data -endpoints after the nonnegative-shift reduction. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_slotData_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_slotData_via_nonnegShift - (fs := fs) hrr hpos hsame hsucc).1 - -/-- Chudnovsky--Seymour `1 ↔ 4` specialization from the root-crossing -formulations after the nonnegative-shift reduction. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_rootCrossing_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing_via_nonnegShift - (fs := fs) hrr hpos hsame hsplit hsucc).1 - -/-- Chudnovsky--Seymour `1 ↔ 4` specialization from root-crossing formulations -alone. Root continuity supplies the succ-degree left endpoint. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_rootCrossing - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_rootCrossing_via_nonnegShift - hrr hpos hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc - -/-- Chudnovsky--Seymour `1 ↔ 4` specialization after the nonnegative shift -reduction, with the succ-degree branch discharged by the affine-family bridge. --/ -theorem - pairwiseCompatible_iff_familyCompatible_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_via_nonnegShift - (fs := fs) hrr hpos hsame haffBridge).1 - -/-- Chudnovsky--Seymour `1 ↔ 4` specialization from the stronger -boundary-right-pair statement after the nonnegative shift reduction. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_boundaryRightPairOrientation_via_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_boundaryRightPairOrientation_via_nonnegShift - (fs := fs) hrr hpos hboundary).1 - /-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` from a direct nonnegative pair bridge. -/ private theorem pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge @@ -284,192 +98,4 @@ private theorem pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn hbridge -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the no-common orientation core. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hstep : PosComboNoCommonOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_noCommonOrientation hstep) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the repaired degree-split package. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit hsame hsucc) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the honest degree-split package. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_degreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonSameDegreePairHasCommonInterleaver_of_orientationAlternative_nonneg hsame) - hsucc - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3`, -using the repaired same-degree branch and the affine-family bridge for the -succ-degree branch. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_sameDegreePair_and_affineFamily_nonneg - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hsame - (posComboNoCommonSuccDegreePairHasCommonInterleaver_of_affineFamily haffBridge) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the all-combinations bridge. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_allComboBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hallBridge : PosComboNoCommonToAllComboBridgeStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonOrientation_of_allComboBridge hallBridge) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the affine-family bridge. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_affineFamilyBridge haffBridge) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from the boundary-right-pair orientation statement. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_boundaryRightPairOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonAffineFamily_of_boundaryRightPairOrientation hboundary) - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the no-common orientation core. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_noCommonOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hstep : PosComboNoCommonOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hstep).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the repaired degree-split package. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_pairDegreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hsame hsucc).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the honest degree-split package. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_degreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_degreeSplit_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hsame hsucc).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4`, -using the repaired same-degree branch and the affine-family bridge for the -succ-degree branch. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_sameDegreePair_and_affineFamily_nonneg - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_sameDegreePair_and_affineFamily_nonneg - (fs := fs) hrr hpos hnn hsame haffBridge).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the all-combinations bridge. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_allComboBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hallBridge : PosComboNoCommonToAllComboBridgeStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_allComboBridge_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hallBridge).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the affine-family bridge. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_affineFamilyBridge_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - (fs := fs) hrr hpos hnn haffBridge).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 4` -from the boundary-right-pair orientation statement. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_boundaryRightPairOrientation_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_boundaryRightPairOrientation_and_nonnegCoeffs - (fs := fs) hrr hpos hnn hboundary).1 - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade/LowDegree.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade/LowDegree.lean index c34134bdf..72c15d9ba 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade/LowDegree.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade/LowDegree.lean @@ -76,7 +76,7 @@ theorem hasCommonLeftInterleaver_of_natDegree_le_one HasCommonLeftInterleaver fs := by let hrr := family_ne_zero_and_splits_of_natDegree_le_one hpos hdeg exact - commonLeftInterleaverFamilyUpgrade + hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver (fun f hf => (hrr f hf).2) hpos (pairwiseHasCommonLeftInterleaver_of_natDegree_le_one hpos hdeg) diff --git a/RealRooted/CommonInterleaver/RightPencil.lean b/RealRooted/CommonInterleaver/RightPencil.lean index 6c2c90469..4d248bdf0 100644 --- a/RealRooted/CommonInterleaver/RightPencil.lean +++ b/RealRooted/CommonInterleaver/RightPencil.lean @@ -105,112 +105,6 @@ def CompatibleSuccDegreeClosedSegmentCountEqStatement : Prop := ¬ (C (1 - β) * f + C β * g).IsRoot x) → (f.roots.filter (x < ·)).card = (g.roots.filter (x < ·)).card -/-- Right-pencil form of the exact gap-two obstruction. The closed-segment -form reduces to this by the change of variables `β = μ / (μ + 1)`. -/ -def CompatibleSuccDegreeRightFamilyNoGapTwoStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - (∀ {μ : ℝ}, 0 ≤ μ → ¬ (f + C μ * g).IsRoot x) → - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≠ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≠ 2 - -/-- Endpoint-sign form of the exact gap-two obstruction. The right-pencil -no-root hypothesis is equivalent to this same-sign condition at a common -non-root threshold. -/ -def CompatibleSuccDegreeEndpointSignNoGapTwoStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - 0 < f.eval x * g.eval x → - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≠ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≠ 2 - -/-- Coefficient-free compatible succ-degree all-combinations shortcut. This -candidate direct Obreschkoff span statement is now known to be false; see -`CommonInterleaverExamples.not_compatibleSuccDegreeAllComboStatement`. -/ -def CompatibleSuccDegreeAllComboStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - AllComboRealRooted f g - -/-- Signed right-pencil form of the compatible succ-degree all-combinations -shortcut. By scaling, this one-parameter family is equivalent to the whole -real linear span, and it is likewise known to be false. -/ -def CompatibleSuccDegreeSignedRightFamilyStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ μ : ℝ, (f + C μ * g).Splits - -/-- Negative right-pencil form of the compatible succ-degree all-combinations -shortcut. Compatibility supplies the case `0 ≤ μ`, but the isolated negative -half-line is false in general. -/ -def CompatibleSuccDegreeNegativeRightFamilyStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ μ : ℝ, μ < 0 → (f + C μ * g).Splits - -/-- Nonnegative-coefficient version of the negative right-pencil shortcut. -This candidate strengthening is false even before translating endpoints. -/ -def CompatibleSuccDegreeNegativeRightFamilyNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ μ : ℝ, μ < 0 → (f + C μ * g).Splits - -/-- Exact lower-threshold endpoint-sign comparison expected from the -left-endpoint/count-stability picture. -/ -def CompatibleSuccDegreeEndpointSignLowerCountEqStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - 0 < f.eval x * g.eval x → - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card = 1 - -/-- Lower-threshold endpoint-sign form of the exact gap obstruction. This is -weaker than the exact lower-count comparison, but it is equivalent to the -upper-threshold endpoint-sign target by complement-count arithmetic. -/ -def CompatibleSuccDegreeEndpointSignLowerNoGapStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - 0 < f.eval x * g.eval x → - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≠ 3 ∧ - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≠ 1 - /-- Succ-degree right-pencil parity bridge for upper root counts. -/ theorem succDegree_odd_roots_gt_count_sub_iff_exists_pos_isRoot_add_right {f g : ℝ[X]} @@ -746,57 +640,6 @@ theorem closedSegment_forall_not_isRoot_iff_eval_mul_pos · intro hprod β hβ0 hβ1 exact closedSegment_not_isRoot_of_eval_mul_pos hβ0 hβ1 hprod -/-- The right-pencil no-gap-two theorem implies the closed-segment no-gap-two -theorem by the parameter change `β = μ / (μ + 1)`. -/ -theorem compatibleSuccDegreeClosedSegmentNoGapTwo_of_rightFamily - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - CompatibleSuccDegreeClosedSegmentNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - exact hright hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - (fun {_} hμ => closedSegment_not_isRoot_add_right_of_nonneg hμ hseg) - -/-- The endpoint-sign no-gap-two theorem implies the right-family no-gap-two -theorem because the right-family no-root hypothesis is exactly same-sign -endpoint evaluation at a common non-root threshold. -/ -theorem compatibleSuccDegreeRightFamilyNoGapTwo_of_endpointSign - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - CompatibleSuccDegreeRightFamilyNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hno - exact hsign hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - (eval_mul_pos_of_no_rightFamily_isRoot hxf hxg hno) - -/-- The right-family no-gap-two theorem implies the endpoint-sign no-gap-two -theorem because same-sign endpoint evaluations rule out nonnegative -right-family roots at the fixed threshold. -/ -theorem compatibleSuccDegreeEndpointSignNoGapTwo_of_rightFamily - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - exact hright hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - (fun {_} hμ => rightFamily_not_isRoot_of_eval_mul_pos hμ hprod) - -/-- The right-family and endpoint-sign no-gap-two targets are equivalent. -/ -theorem compatibleSuccDegreeRightFamilyNoGapTwo_iff_endpointSign : - CompatibleSuccDegreeRightFamilyNoGapTwoStatement ↔ - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := - ⟨compatibleSuccDegreeEndpointSignNoGapTwo_of_rightFamily, - compatibleSuccDegreeRightFamilyNoGapTwo_of_endpointSign⟩ - -/-- The all-combinations target contains the signed right-pencil family. -/ -theorem compatibleSuccDegreeSignedRightFamily_of_allCombo - (hallTarget : CompatibleSuccDegreeAllComboStatement) : - CompatibleSuccDegreeSignedRightFamilyStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split μ - simpa using hallTarget hcomp hf_pos hg_pos hdeg hf_split 1 μ - -/-- The all-combinations target implies the negative right-pencil target. -/ -theorem compatibleSuccDegreeNegativeRightFamily_of_allCombo - (hallTarget : CompatibleSuccDegreeAllComboStatement) : - CompatibleSuccDegreeNegativeRightFamilyStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split μ _ - exact compatibleSuccDegreeSignedRightFamily_of_allCombo hallTarget - hcomp hf_pos hg_pos hdeg hf_split μ - /-- Splitting descends through translation by `X + r`. -/ lemma splits_of_comp_X_add_C_splits {p : ℝ[X]} (r : ℝ) (hp : (p.comp (X + C r)).Splits) : @@ -808,69 +651,6 @@ lemma splits_of_comp_X_add_C_splits simpa [Polynomial.comp_assoc, add_assoc, add_left_comm, add_comm, sub_eq_add_neg] using hback.2 -/-- The exact lower-count endpoint comparison implies the lower-threshold -endpoint-sign exact gap obstruction. -/ -theorem compatibleSuccDegreeEndpointSignLowerNoGap_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeEndpointSignLowerNoGapStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - have hgf := - hcount hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - constructor <;> intro hbad <;> linarith - -/-- The lower-threshold endpoint-sign target implies the upper-threshold -endpoint-sign target by exact complement-count arithmetic. -/ -theorem compatibleSuccDegreeEndpointSignNoGapTwo_of_lower - (hlower : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - have hg_split : g.Splits := (hcomp.isRealRooted_right hg_pos).2 - obtain ⟨hgf_ne3, hfg_ne1⟩ := - hlower hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - constructor - · intro hcount - exact hgf_ne3 <| - (succDegree_roots_gt_count_sub_eq_two_iff_roots_le_rev_sub_eq_three - hf_split hg_split hdeg x).mp hcount - · intro hcount - exact hfg_ne1 <| - (succDegree_rev_roots_gt_count_sub_eq_two_iff_roots_le_sub_eq_one - hf_split hg_split hdeg x).mp hcount - -/-- The exact lower-count endpoint comparison implies the upper-threshold -endpoint-sign exact gap-two obstruction. -/ -theorem compatibleSuccDegreeEndpointSignNoGapTwo_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := - compatibleSuccDegreeEndpointSignNoGapTwo_of_lower - (compatibleSuccDegreeEndpointSignLowerNoGap_of_lowerCountEq hcount) - -/-- The endpoint-sign no-gap-two theorem implies the closed-segment -no-gap-two theorem. -/ -theorem compatibleSuccDegreeClosedSegmentNoGapTwo_of_endpointSign - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - CompatibleSuccDegreeClosedSegmentNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - exact hsign hcomp hf_pos hg_pos hdeg hf_split x hxf hxg <| - (closedSegment_forall_not_isRoot_iff_eval_mul_pos hxf hxg).mp hseg - -/-- The closed-segment no-gap-two theorem implies the endpoint-sign -no-gap-two theorem because same-sign endpoint evaluations rule out -closed-segment roots at the fixed threshold. -/ -theorem compatibleSuccDegreeEndpointSignNoGapTwo_of_closedSegment - (hclosed : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - exact hclosed hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - (fun {_} hβ0 hβ1 => closedSegment_not_isRoot_of_eval_mul_pos hβ0 hβ1 hprod) - -/-- The closed-segment and endpoint-sign no-gap-two targets are equivalent. -/ -theorem compatibleSuccDegreeClosedSegmentNoGapTwo_iff_endpointSign : - CompatibleSuccDegreeClosedSegmentNoGapTwoStatement ↔ - CompatibleSuccDegreeEndpointSignNoGapTwoStatement := - ⟨compatibleSuccDegreeEndpointSignNoGapTwo_of_closedSegment, - compatibleSuccDegreeClosedSegmentNoGapTwo_of_endpointSign⟩ - /-- Closed-segment endpoint count equality excludes both exact upper root-count gaps of two. -/ theorem compatibleSuccDegreeClosedSegmentNoGapTwo_of_countEq @@ -884,74 +664,6 @@ theorem compatibleSuccDegreeClosedSegmentNoGapTwo_of_countEq exact_mod_cast hcard constructor <;> intro hgap <;> linarith -/-- Closed-segment endpoint count equality implies the exact lower-threshold -endpoint-sign comparison. -/ -theorem compatibleSuccDegreeEndpointSignLowerCountEq_of_closedSegmentCountEq - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - CompatibleSuccDegreeEndpointSignLowerCountEqStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → - ¬ (C (1 - β) * f + C β * g).IsRoot x := by - intro β hβ0 hβ1 - exact closedSegment_not_isRoot_of_eval_mul_pos hβ0 hβ1 hprod - have hgt := hcount hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - have hg_split : g.Splits := (hcomp.isRealRooted_right hg_pos).2 - have hfpart := card_roots_filter_gt_add_le_of_splits hf_split x - have hgpart := card_roots_filter_gt_add_le_of_splits hg_split x - have hgtZ : - ((f.roots.filter (x < ·)).card : ℤ) = - (g.roots.filter (x < ·)).card := by - exact_mod_cast hgt - have hfpartZ : - ((f.roots.filter (x < ·)).card : ℤ) + - (f.roots.filter (· ≤ x)).card = - f.natDegree := by - exact_mod_cast hfpart - have hgpartZ : - ((g.roots.filter (x < ·)).card : ℤ) + - (g.roots.filter (· ≤ x)).card = - g.natDegree := by - exact_mod_cast hgpart - have hdegZ : (g.natDegree : ℤ) = (f.natDegree : ℤ) + 1 := by exact_mod_cast hdeg - linarith - -/-- The exact lower-threshold endpoint-sign comparison implies closed-segment -endpoint count equality. -/ -theorem compatibleSuccDegreeClosedSegmentCountEq_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeClosedSegmentCountEqStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - have hprod : 0 < f.eval x * g.eval x := - (closedSegment_forall_not_isRoot_iff_eval_mul_pos hxf hxg).mp hseg - have hle := hcount hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hprod - have hg_split : g.Splits := (hcomp.isRealRooted_right hg_pos).2 - have hfpart := card_roots_filter_gt_add_le_of_splits hf_split x - have hgpart := card_roots_filter_gt_add_le_of_splits hg_split x - have hfpartZ : - ((f.roots.filter (x < ·)).card : ℤ) + - (f.roots.filter (· ≤ x)).card = - f.natDegree := by - exact_mod_cast hfpart - have hgpartZ : - ((g.roots.filter (x < ·)).card : ℤ) + - (g.roots.filter (· ≤ x)).card = - g.natDegree := by - exact_mod_cast hgpart - have hdegZ : (g.natDegree : ℤ) = (f.natDegree : ℤ) + 1 := by exact_mod_cast hdeg - have hgtZ : - ((f.roots.filter (x < ·)).card : ℤ) = - (g.roots.filter (x < ·)).card := by - linarith - exact_mod_cast hgtZ - -/-- The closed-segment endpoint count-equality target is equivalent to the -exact lower-threshold endpoint-sign count target. -/ -theorem compatibleSuccDegreeClosedSegmentCountEq_iff_lowerCountEq : - CompatibleSuccDegreeClosedSegmentCountEqStatement ↔ - CompatibleSuccDegreeEndpointSignLowerCountEqStatement := - ⟨compatibleSuccDegreeEndpointSignLowerCountEq_of_closedSegmentCountEq, - compatibleSuccDegreeClosedSegmentCountEq_of_lowerCountEq⟩ - /-- The closed-segment no-gap-two theorem implies the compatible exact gap-two obstruction, since an assumed exact gap two supplies the required closed-segment nonvanishing by the endpoint sign lemma. -/ @@ -977,38 +689,6 @@ theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_closedSegment hcomp hf_pos hg_pos hdeg hf_split hβ0 hβ1 hxf hxg hcount exact (hclosed hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg).2 hcount -/-- The right-pencil no-gap-two theorem implies the compatible exact gap-two -obstruction. -/ -theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_rightFamily - (hright : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNoGapTwoStatement := - compatibleSuccDegreeRootCountAboveNoGapTwo_of_closedSegment - (compatibleSuccDegreeClosedSegmentNoGapTwo_of_rightFamily hright) - -/-- The endpoint-sign no-gap-two theorem implies the compatible exact gap-two -obstruction. -/ -theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSign - (hsign : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNoGapTwoStatement := - compatibleSuccDegreeRootCountAboveNoGapTwo_of_rightFamily - (compatibleSuccDegreeRightFamilyNoGapTwo_of_endpointSign hsign) - -/-- The lower-threshold endpoint-sign target implies the compatible exact -gap-two obstruction. -/ -theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSignLower - (hlower : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - CompatibleSuccDegreeRootCountAboveNoGapTwoStatement := - compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSign - (compatibleSuccDegreeEndpointSignNoGapTwo_of_lower hlower) - -/-- The exact lower-count endpoint comparison implies the compatible exact -gap-two obstruction. -/ -theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_lowerCountEq - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNoGapTwoStatement := - compatibleSuccDegreeRootCountAboveNoGapTwo_of_endpointSign - (compatibleSuccDegreeEndpointSignNoGapTwo_of_lowerCountEq hcount) - /-- If the threshold is never a root of a nonnegative right-pencil member, then the forward upper root-count difference has even parity. -/ theorem succDegree_even_roots_gt_count_sub_of_no_rightFamily_isRoot diff --git a/RealRooted/CommonInterleaver/RootCountCombinatorics.lean b/RealRooted/CommonInterleaver/RootCountCombinatorics.lean index d000e2a93..8aff22563 100644 --- a/RealRooted/CommonInterleaver/RootCountCombinatorics.lean +++ b/RealRooted/CommonInterleaver/RootCountCombinatorics.lean @@ -41,27 +41,6 @@ def PosComboNoCommonSuccDegreeRootCrossingNonnegStatement : Prop := (∀ j, 1 ≤ j → j < f.natDegree → (rootSeqDesc f).getD j 0 ≤ (rootSeqDesc g).getD (j - 1) 0) -/-- **Analytic root-count formulation of the succ-degree root-crossing target.** - -For a succ-degree positive-combination pair with no common roots, the lower -threshold root count for `f` should be at most the lower threshold root count -for `g`, and the count for `g` should exceed the count for `f` by at most two. -Equivalently, the numbers of roots strictly above a threshold differ by at most -one, with the extra `g` root accounted for. -/ -def PosComboNoCommonSuccDegreeRootCountNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - /-- **Upper-threshold version of the succ-degree root-count formulation.** This is the form naturally suggested by the root-continuity proof route: the @@ -110,19 +89,6 @@ def CompatibleSuccDegreeRootCountAboveNonRootStatement : Prop := ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 -/-- Compatible-pair gap-at-most-two version of the succ-degree -common-non-root upper root-count leaf. -/ -def CompatibleSuccDegreeRootCountAboveLeTwoStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 2 - /-- Exact gap-two obstruction for the compatible succ-degree common-non-root upper root-count leaf. -/ def CompatibleSuccDegreeRootCountAboveNoGapTwoStatement : Prop := @@ -142,20 +108,6 @@ theorem int_le_one_of_le_two_ne_two {z : ℤ} (hzle : z ≤ 2) (hzne : z ≠ 2) have hzlt : z < 2 := lt_of_le_of_ne hzle hzne exact Int.lt_add_one_iff.mp (by simpa using hzlt) -/-- A gap-at-most-two theorem plus exclusion of exact gap two gives the full -compatible succ-degree common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_leTwo_of_noGapTwo - (hle2 : CompatibleSuccDegreeRootCountAboveLeTwoStatement) - (hgap : CompatibleSuccDegreeRootCountAboveNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - obtain ⟨hfg_le2, hgf_le2⟩ := - hle2 hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - obtain ⟨hfg_ne2, hgf_ne2⟩ := - hgap hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - exact ⟨int_le_one_of_le_two_ne_two hfg_le2 hfg_ne2, - int_le_one_of_le_two_ne_two hgf_le2 hgf_ne2⟩ - /-- The compatible CS 3.4 root-count leaf implies the #42 positive-combo succ-degree root-count leaf. -/ theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible @@ -175,47 +127,6 @@ theorem succDegree_derivative_natDegree_eq rw [f.natDegree_derivative, g.natDegree_derivative, hdeg] lia -/-- Applying the compatible succ-degree root-count theorem to derivatives. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_derivative - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) - {f g : ℝ[X]} (hcomp : Compatible f g) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hdeg : g.natDegree = f.natDegree + 1) - (hf_split : f.Splits) (hfdeg : 2 ≤ f.natDegree) : - ∀ x : ℝ, ¬ f.derivative.IsRoot x → ¬ g.derivative.IsRoot x → - ((f.derivative.roots.filter (x < ·)).card : ℤ) - - (g.derivative.roots.filter (x < ·)).card ≤ 1 ∧ - ((g.derivative.roots.filter (x < ·)).card : ℤ) - - (f.derivative.roots.filter (x < ·)).card ≤ 1 := by - have hf'_pos : HasPosLeadingCoeff f.derivative := hf_pos.derivative (by lia) - have hg'_pos : HasPosLeadingCoeff g.derivative := - hg_pos.derivative (by rw [hdeg]; lia) - have hdeg' : g.derivative.natDegree = f.derivative.natDegree + 1 := - succDegree_derivative_natDegree_eq hdeg (by lia) - have hf'_split : f.derivative.Splits := - (derivative_interlaces hf_split hfdeg).2.1.2 - exact hcount hcomp.derivative hf'_pos hg'_pos hdeg' hf'_split - -/-- Derivative application of the compatible succ-degree root-count theorem, -promoted from common non-root thresholds to all thresholds. -/ -theorem compatibleSuccDegreeRootCountAbove_derivative - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) - {f g : ℝ[X]} (hcomp : Compatible f g) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hdeg : g.natDegree = f.natDegree + 1) - (hf_split : f.Splits) (hfdeg : 2 ≤ f.natDegree) : - ∀ x : ℝ, - ((f.derivative.roots.filter (x < ·)).card : ℤ) - - (g.derivative.roots.filter (x < ·)).card ≤ 1 ∧ - ((g.derivative.roots.filter (x < ·)).card : ℤ) - - (f.derivative.roots.filter (x < ·)).card ≤ 1 := by - have hf'_ne : f.derivative ≠ 0 := Polynomial.derivative_ne_zero.mpr (by lia) - have hg'_ne : g.derivative ≠ 0 := - Polynomial.derivative_ne_zero.mpr (by rw [hdeg]; lia) - exact rootCountAbove_diff_le_one_of_nonRoot_isRoot hf'_ne hg'_ne - (compatibleSuccDegreeRootCountAboveNonRoot_derivative - hcount hcomp hf_pos hg_pos hdeg hf_split hfdeg) - /-- Partition roots of a splitting polynomial by a threshold. -/ theorem card_roots_filter_gt_add_le_of_splits {p : ℝ[X]} (hp : p.Splits) (x : ℝ) : @@ -251,29 +162,6 @@ theorem sameDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise have hdegZ : (g.natDegree : ℤ) = f.natDegree := by exact_mod_cast hdeg constructor <;> · rintro ⟨h1, h2⟩; constructor <;> lia -/-- The same-degree upper common-non-root root-count target is equivalent to -the lower common-non-root root-count target. -/ -theorem posComboNoCommonSameDegreeRootCountAboveNonRoot_iff_rootCountNonRoot : - PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement ↔ - PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement := by - constructor - · intro hcount f g hf_pos hg_pos hfnn hgnn hfg hdeg hno x hxf hxg - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact (sameDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise - hf_split hg_split hdeg x).mp - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno x hxf hxg) - · intro hcount f g hf_pos hg_pos hfnn hgnn hfg hdeg hno x hxf hxg - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact (sameDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise - hf_split hg_split hdeg x).mpr - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno x hxf hxg) - /-- Oriented same-cardinality root counts: the lower-threshold comparison `f` against `g` is equivalent to the opposite upper-threshold comparison. @@ -919,29 +807,6 @@ theorem compatibleSuccDegreeRootCountAbove_le_two_of_derivative_bound have hder_le := (hder_full x).2 lia -/-- Derivative induction rules out all upper-count gaps of size at least -three for a succ-degree compatible pair. - -This is the CS 3.4 induction step up to the remaining exact gap-two case. -/ -theorem compatibleSuccDegreeRootCountAbove_le_two_of_derivative - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) - {f g : ℝ[X]} (hcomp : Compatible f g) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hdeg : g.natDegree = f.natDegree + 1) - (hf_split : f.Splits) (hfdeg : 2 ≤ f.natDegree) : - ∀ x : ℝ, - ((f.roots.filter (x < ·)).card : ℤ) - - (g.roots.filter (x < ·)).card ≤ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - - (f.roots.filter (x < ·)).card ≤ 2 := by - refine compatibleSuccDegreeRootCountAbove_le_two_of_derivative_bound - hcomp hf_pos hg_pos hdeg hf_split hfdeg ?_ - intro x _hxf _hxg - exact - compatibleSuccDegreeRootCountAbove_derivative - hcount hcomp hf_pos hg_pos hdeg hf_split hfdeg - x - /-- Oriented same-degree `StrictInterl`-to-root-count bridge in lower-threshold form. For splitting real polynomials `p, q` of equal degree, the same-degree @@ -980,13 +845,4 @@ theorem posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot exact rootCountAbove_diff_le_one_of_nonRoot_isRoot hf_pos.ne_zero hg_ne (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) -/-- The succ-degree lower common-non-root root-count target implies the full -upper-threshold succ-degree root-count target. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_of_rootCountNonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := - posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_iff_rootCountNonRoot.mpr - hcount) - end RealRooted diff --git a/RealRooted/CommonInterleaver/SameDegreeRootCount.lean b/RealRooted/CommonInterleaver/SameDegreeRootCount.lean index fbce6c714..1a4c9bbaa 100644 --- a/RealRooted/CommonInterleaver/SameDegreeRootCount.lean +++ b/RealRooted/CommonInterleaver/SameDegreeRootCount.lean @@ -63,31 +63,6 @@ theorem sameDegreePairHasCommonInterleaver_nonneg_of_slotData hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hdeg <| fun j hj => hstmt hf_pos hg_pos hfnn hgnn hfg hdeg hno j hj _ _ -/-- **Converse of the same-degree slot-data reduction for #41.** - -A common right interleaver for the same-degree pair `(f, g)` recovers the -matching root-slot intersections through -`rootSlotInterval_inter_nonempty_of_commonInterleaver`. -/ -theorem posComboNoCommonSameDegreeSlotData_of_pairHasCommonInterleaver - (hstmt : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) : - PosComboNoCommonSameDegreeSlotDataNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - obtain ⟨h, hfh, hgh⟩ := hstmt hf_pos hg_pos hfnn hgnn hfg hdeg hno - intro j hj _ _ - have hjg' : j < g.natDegree + 1 := by lia - exact rootSlotInterval_inter_nonempty_of_commonInterleaver hfh hgh j hj hjg' - -/-- **The #41 same-degree slot-data reformulation is equivalent to the target.** - -The matching root-slot statement holds if and only if the repaired -same-degree common-right-interleaver statement holds, so the #41 reduction to -slot data loses no information. -/ -theorem posComboNoCommonSameDegreeSlotData_iff_pairHasCommonInterleaver : - PosComboNoCommonSameDegreeSlotDataNonnegStatement ↔ - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - ⟨sameDegreePairHasCommonInterleaver_nonneg_of_slotData, - posComboNoCommonSameDegreeSlotData_of_pairHasCommonInterleaver⟩ - /-- **Combinatorial core of the same-degree slot bound.** For descending real lists `rf` and `rg` of the same length, if their interior @@ -168,25 +143,6 @@ def PosComboNoCommonSameDegreeRootCrossingNonnegStatement : Prop := (∀ j, 1 ≤ j → j < f.natDegree → (rootSeqDesc f).getD j 0 ≤ (rootSeqDesc g).getD (j - 1) 0) -/-- **Analytic root-count formulation of milestone B1.** - -For a nonnegative positive-combination same-degree pair with no common roots, -the two threshold root-count functions should differ by at most one. The -pure order bridge `rootCrossing_of_rootCount_diff_le_one` turns this into the -descending-root crossing inequalities. -/ -def PosComboNoCommonSameDegreeRootCountNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 1 - /-- **Upper-threshold version of the same-degree root-count formulation.** This is the form naturally paired with sign-count lemmas, since the sign of a @@ -205,23 +161,6 @@ def PosComboNoCommonSameDegreeRootCountAboveNonnegStatement : Prop := ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 -/-- Non-root-threshold version of the same-degree lower root-count target. - -The `RootCountJump` local-constancy bridge reduces the full lower-threshold -target to this common-non-root form. -/ -def PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 1 - /-- Non-root-threshold version of the same-degree upper root-count target. -/ def PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, @@ -517,19 +456,6 @@ theorem sameDegreeRootCountAbove_of_rootCount have hNcard : g.roots.card = f.natDegree := by rw [card_roots_of_splits hg, hdeg] exact count_gt_diff_le_one_of_count_le_diff_le_one hMcard hNcard hcount -/-- The same-degree root-count formulation implies the descending-root -crossing formulation. -/ -theorem posComboNoCommonSameDegreeRootCrossing_of_rootCount - (hcount : PosComboNoCommonSameDegreeRootCountNonnegStatement) : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact rootCrossing_of_rootCount_diff_le_one hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - /-- The upper-threshold same-degree root-count formulation implies the descending-root crossing formulation. -/ theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove @@ -543,80 +469,6 @@ theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove exact rootCrossing_of_rootCountAbove_diff_le_one hf_split hg_split hdeg (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) -/-- The same-degree descending-root crossing formulation implies the -same-degree root-count formulation. -/ -theorem posComboNoCommonSameDegreeRootCount_of_rootCrossing - (hcross : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSameDegreeRootCountNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact sameDegreeRootCount_of_rootCrossing hf_split hg_split hdeg - (hcross hf_pos hg_pos hfnn hgnn hfg hdeg hno) - -/-- The upper-threshold same-degree root-count target implies the -lower-threshold root-count target. -/ -theorem posComboNoCommonSameDegreeRootCount_of_rootCountAbove - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSameDegreeRootCountNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact sameDegreeRootCount_of_rootCountAbove hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - -/-- The lower-threshold same-degree root-count target implies the -upper-threshold root-count target. -/ -theorem posComboNoCommonSameDegreeRootCountAbove_of_rootCount - (hcount : PosComboNoCommonSameDegreeRootCountNonnegStatement) : - PosComboNoCommonSameDegreeRootCountAboveNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact sameDegreeRootCountAbove_of_rootCount hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - -/-- The lower-threshold and upper-threshold same-degree root-count targets are -equivalent. -/ -theorem posComboNoCommonSameDegreeRootCountAbove_iff_rootCount : - PosComboNoCommonSameDegreeRootCountAboveNonnegStatement ↔ - PosComboNoCommonSameDegreeRootCountNonnegStatement := - ⟨posComboNoCommonSameDegreeRootCount_of_rootCountAbove, - posComboNoCommonSameDegreeRootCountAbove_of_rootCount⟩ - -/-- The same-degree root-crossing target is equivalent to the lower-threshold -root-count target. -/ -theorem posComboNoCommonSameDegreeRootCrossing_iff_rootCount : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement ↔ - PosComboNoCommonSameDegreeRootCountNonnegStatement := - ⟨posComboNoCommonSameDegreeRootCount_of_rootCrossing, - posComboNoCommonSameDegreeRootCrossing_of_rootCount⟩ - -/-- The same-degree root-crossing target is equivalent to the upper-threshold -root-count target. -/ -theorem posComboNoCommonSameDegreeRootCrossing_iff_rootCountAbove : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement ↔ - PosComboNoCommonSameDegreeRootCountAboveNonnegStatement := - ⟨fun hcross => - posComboNoCommonSameDegreeRootCountAbove_of_rootCount - (posComboNoCommonSameDegreeRootCount_of_rootCrossing hcross), - posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove⟩ - -/-- The same-degree lower root-count target follows from its common-non-root -variant. -/ -theorem posComboNoCommonSameDegreeRootCount_of_nonRoot - (hcount : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSameDegreeRootCountNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - exact rootCount_diff_le_one_of_nonRoot_isRoot hf_pos.ne_zero hg_pos.ne_zero - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - /-- The same-degree upper root-count target follows from its common-non-root variant. -/ theorem posComboNoCommonSameDegreeRootCountAbove_of_nonRoot @@ -902,67 +754,6 @@ theorem sameDegreeRootCrossing_of_posCombo_natDegree_le_three_of_cubicInterior rootCountAbove_diff_le_one_of_posCombo_sameDegree_natDegree_le_three_of_cubicInterior hbelow habove hf_pos hg_pos hfnn hgnn hfg hdeg hno hfdeg x) -/-- Degree-`≤ 3` same-degree slot-data route, assuming the two cubic interior -partial-separation leaves. -/ -theorem sameDegreeSlotData_of_posCombo_natDegree_le_three_of_cubicInterior - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg : g.natDegree = f.natDegree) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hfdeg : f.natDegree ≤ 3) : - ∀ j, j < f.natDegree + 1 → - ∀ (hjf : j < (rootSeqDesc f).length + 1) - (hjg : j < (rootSeqDesc g).length + 1), - (rootSlotInterval (rootSeqDesc f) ⟨j, hjf⟩ ∩ - rootSlotInterval (rootSeqDesc g) ⟨j, hjg⟩).Nonempty := by - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - obtain ⟨hc1, hc2⟩ := - sameDegreeRootCrossing_of_posCombo_natDegree_le_three_of_cubicInterior - hbelow habove hf_pos hg_pos hfnn hgnn hfg hdeg hno hfdeg - have hlenf : (rootSeqDesc f).length = f.natDegree := - rootSeqDesc_length hf_split - have hleng : (rootSeqDesc g).length = g.natDegree := - rootSeqDesc_length hg_split - intro j _ hjf hjg - exact - rootSlotInterval_inter_nonempty_of_sameDegree_crossing - (rootSeqDesc f) (rootSeqDesc g) rootSeqDesc_pairwise rootSeqDesc_pairwise - (by rw [hleng, hlenf, hdeg]) - (fun k hk1 hk2 => hc1 k hk1 (by rw [hlenf] at hk2; exact hk2)) - (fun k hk1 hk2 => hc2 k hk1 (by rw [hlenf] at hk2; exact hk2)) - j hjf hjg - -/-- Degree-`≤ 3` same-degree common-interleaver endpoint, assuming the two -cubic interior partial-separation leaves. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_natDegree_le_three_of_cubicInterior - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg : g.natDegree = f.natDegree) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hfdeg : f.natDegree ≤ 3) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by - have hf_rr : f ≠ 0 ∧ f.Splits := - hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg - have hg_rr : g ≠ 0 ∧ g.Splits := - hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg - exact - pairHasCommonInterleaver_of_sameDegree_slotIntersections - hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hdeg <| - fun j hj => - sameDegreeSlotData_of_posCombo_natDegree_le_three_of_cubicInterior - hbelow habove hf_pos hg_pos hfnn hgnn hfg hdeg hno hfdeg j hj _ _ - /-- **Reduction of milestone B1 to its root-crossing content.** The same-degree slot-data statement follows from the descending-root crossing @@ -996,14 +787,6 @@ theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing sameDegreePairHasCommonInterleaver_nonneg_of_slotData (posComboNoCommonSameDegreeSlotData_of_rootCrossing hcross) -/-- The repaired same-degree pair-interleaver endpoint follows directly from -the analytic root-count formulation. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCount - (hcount : PosComboNoCommonSameDegreeRootCountNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCount hcount) - /-- The repaired same-degree pair-interleaver endpoint follows directly from the upper-threshold analytic root-count formulation. -/ theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove @@ -1012,14 +795,6 @@ theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing (posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove hcount) -/-- Same-degree root crossing from the common-non-root lower-threshold -root-count formulation. -/ -theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountNonRoot - (hcount : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement := - posComboNoCommonSameDegreeRootCrossing_of_rootCount - (posComboNoCommonSameDegreeRootCount_of_nonRoot hcount) - /-- Same-degree root crossing from the common-non-root upper-threshold root-count formulation. -/ theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot @@ -1028,14 +803,6 @@ theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove (posComboNoCommonSameDegreeRootCountAbove_of_nonRoot hcount) -/-- The repaired same-degree pair-interleaver endpoint follows from the -common-non-root lower-threshold root-count formulation. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountNonRoot - (hcount : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_rootCount - (posComboNoCommonSameDegreeRootCount_of_nonRoot hcount) - /-- The repaired same-degree pair-interleaver endpoint follows from the common-non-root upper-threshold root-count formulation. -/ theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAboveNonRoot diff --git a/RealRooted/CommonInterleaver/Sequence.lean b/RealRooted/CommonInterleaver/Sequence.lean index 916c8e622..51a31c094 100644 --- a/RealRooted/CommonInterleaver/Sequence.lean +++ b/RealRooted/CommonInterleaver/Sequence.lean @@ -137,48 +137,14 @@ theorem hasCommonLeftInterleaverSeq_of_pairwise_shiftedSlotIntersections have hj : j < (rootSeqDesc f).length := Nat.lt_of_succ_lt_succ hjf simpa [leftSlotSetAt, hj] using hmem_slot -/-- Atomic shifted-slot membership input for a left `StrictInterl` relation. - -This is the direct left-oriented analogue of -`CommonInterleaver.RootSlots.mem_rootSlotInterval_of_strictInterl`: -if `StrictInterl h f`, then each descending root of the inner polynomial `h` lies in -the shifted slot of the outer polynomial `f`. -/ -def StrictInterlLeftShiftedSlotStatement : Prop := - ∀ {h f : ℝ[X]} (hhf : StrictInterl h f) (j : Fin h.natDegree), - (rootSeqDesc h).get ⟨j.1, by - simp [rootSeqDesc_length hhf.1.2, j.2]⟩ ∈ - rootSlotInterval (rootSeqDesc f) - ⟨j.1 + 1, by - have hdeg := hhf.natDegree_le - have hjf : j.1 < f.natDegree := lt_of_lt_of_le j.2 hdeg - simpa [rootSeqDesc_length hhf.2.1.2] using Nat.succ_lt_succ hjf⟩ - -/-- Atomic left `StrictInterl` shifted-slot membership. -/ -theorem strictInterlLeftShiftedSlot : StrictInterlLeftShiftedSlotStatement := by - intro h f hhf j - exact CommonInterleaver.RootSlots.mem_shifted_rootSlotInterval_of_strictInterl hhf j - -/-- Geometric shifted-slot consequence of a common left interleaver. - -This is the remaining local geometric input in the left-oriented finite-family -upgrade: if `h` is a common left interleaver of `f` and `g`, then the shifted -root slots of `f` and `g` meet. -/ -def CommonLeftInterleaverShiftedSlotStatement : Prop := - ∀ {h f g : ℝ[X]}, - StrictInterl h f → - StrictInterl h g → - ∀ j : ℕ, - ∀ (hjf : j + 1 < (rootSeqDesc f).length + 1) - (hjg : j + 1 < (rootSeqDesc g).length + 1), - (rootSlotInterval (rootSeqDesc f) ⟨j + 1, hjf⟩ ∩ - rootSlotInterval (rootSeqDesc g) ⟨j + 1, hjg⟩).Nonempty - -/-- The common-left-interleaver shifted-slot statement follows from the atomic -left `StrictInterl` shifted-slot membership input. -/ -theorem commonLeftInterleaverShiftedSlot_of_strictInterlLeft - (hleft : StrictInterlLeftShiftedSlotStatement) : - CommonLeftInterleaverShiftedSlotStatement := by - intro h f g hhf hhg j hjf hjg +/-- If `h` is a common left interleaver of `f` and `g`, then the shifted root +slots of `f` and `g` meet. -/ +theorem rootSlotInterval_succ_inter_nonempty_of_commonLeftInterleaver + {h f g : ℝ[X]} (hhf : StrictInterl h f) (hhg : StrictInterl h g) (j : ℕ) + (hjf : j + 1 < (rootSeqDesc f).length + 1) + (hjg : j + 1 < (rootSeqDesc g).length + 1) : + (rootSlotInterval (rootSeqDesc f) ⟨j + 1, hjf⟩ ∩ + rootSlotInterval (rootSeqDesc g) ⟨j + 1, hjg⟩).Nonempty := by let jf : Fin ((rootSeqDesc f).length + 1) := ⟨j + 1, hjf⟩ let jg : Fin ((rootSeqDesc g).length + 1) := ⟨j + 1, hjg⟩ change (rootSlotInterval (rootSeqDesc f) jf ∩ @@ -192,9 +158,11 @@ theorem commonLeftInterleaverShiftedSlot_of_strictInterlLeft let x : ℝ := (rootSeqDesc h).get ⟨j, by simpa [rootSeqDesc_length hhf.1.2] using hjh⟩ have hmem_f : x ∈ rootSlotInterval (rootSeqDesc f) jf := by - simpa [x, jf, jh] using hleft hhf jh + simpa [x, jf, jh] using + CommonInterleaver.RootSlots.mem_shifted_rootSlotInterval_of_strictInterl hhf jh have hmem_g : x ∈ rootSlotInterval (rootSeqDesc g) jg := by - simpa [x, jg, jh] using hleft hhg jh + simpa [x, jg, jh] using + CommonInterleaver.RootSlots.mem_shifted_rootSlotInterval_of_strictInterl hhg jh exact ⟨x, ⟨hmem_f, hmem_g⟩⟩ · have hjf_nat : j < f.natDegree := by have hjf' : j < (rootSeqDesc f).length := Nat.lt_of_succ_lt_succ hjf @@ -223,16 +191,10 @@ theorem commonLeftInterleaverShiftedSlot_of_strictInterlLeft (rs := rootSeqDesc g) (List.reverse_ne_nil_iff.mp hrevg_ne) simp_all -/-- Common-left-interleaver shifted-slot intersections. -/ -theorem commonLeftInterleaverShiftedSlot : - CommonLeftInterleaverShiftedSlotStatement := - commonLeftInterleaverShiftedSlot_of_strictInterlLeft strictInterlLeftShiftedSlot - /-- A pairwise common-left-interleaver hypothesis gives the pairwise shifted -root-slot intersections, assuming the geometric shifted-slot input. -/ +root-slot intersections. -/ theorem pairwise_shiftedSlotIntersections_of_pairwiseHasCommonLeftInterleaver {fs : List ℝ[X]} - (hslot : CommonLeftInterleaverShiftedSlotStatement) (hpair : PairwiseHasCommonLeftInterleaver fs) : ∀ (i k : Fin fs.length), i < k → ∀ j : ℕ, @@ -242,25 +204,15 @@ theorem pairwise_shiftedSlotIntersections_of_pairwiseHasCommonLeftInterleaver rootSlotInterval (rootSeqDesc (fs.get k)) ⟨j + 1, hjk⟩).Nonempty := by intro i k hik j hji hjk obtain ⟨h, hhi, hhk⟩ := hpair i k hik - exact hslot hhi hhk j hji hjk - -/-- Finite-family shifted-slot sequence from pairwise common left interleavers, -modulo the local geometric shifted-slot input. -/ -theorem hasCommonLeftInterleaverSeq_of_pairwiseHasCommonLeftInterleaver_of_shiftedSlot - {fs : List ℝ[X]} - (hslot : CommonLeftInterleaverShiftedSlotStatement) - (hpair : PairwiseHasCommonLeftInterleaver fs) : - HasCommonLeftInterleaverSeq fs := - hasCommonLeftInterleaverSeq_of_pairwise_shiftedSlotIntersections - (pairwise_shiftedSlotIntersections_of_pairwiseHasCommonLeftInterleaver hslot hpair) + exact rootSlotInterval_succ_inter_nonempty_of_commonLeftInterleaver hhi hhk j hji hjk /-- Finite-family shifted-slot sequence from pairwise common left interleavers. -/ theorem hasCommonLeftInterleaverSeq_of_pairwiseHasCommonLeftInterleaver {fs : List ℝ[X]} (hpair : PairwiseHasCommonLeftInterleaver fs) : HasCommonLeftInterleaverSeq fs := - hasCommonLeftInterleaverSeq_of_pairwiseHasCommonLeftInterleaver_of_shiftedSlot - commonLeftInterleaverShiftedSlot hpair + hasCommonLeftInterleaverSeq_of_pairwise_shiftedSlotIntersections + (pairwise_shiftedSlotIntersections_of_pairwiseHasCommonLeftInterleaver hpair) /-- Chudnovsky--Seymour `3.6.2 → 3.6.3`, in the formulation needed for the product-sum theorem: pairwise common interleavers imply a global common diff --git a/RealRooted/CommonInterleaver/Statements.lean b/RealRooted/CommonInterleaver/Statements.lean index 46a9af763..20347d284 100644 --- a/RealRooted/CommonInterleaver/Statements.lean +++ b/RealRooted/CommonInterleaver/Statements.lean @@ -12,97 +12,6 @@ noncomputable section namespace RealRooted -/-- Core two-polynomial target in positive-combination language: a -positive-leading `PosComboRealRooted` pair admits a common right interleaver. -/ -def PosComboPairHasCommonInterleaverStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - PosComboRealRooted f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -/-- Degree-closeness bridge for positive-combination pairs. This is the -remaining degree-only ingredient needed to pass from the no-common-roots -orientation core to a full two-polynomial common-right-interleaver theorem. -/ -def PosComboNatDegreeCloseStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - PosComboRealRooted f g → - f.natDegree ≤ g.natDegree + 1 ∧ - g.natDegree ≤ f.natDegree + 1 - -/-- No-common-roots orientation core for the positive-combination converse. -This matches the local step parameter in -`PosComboRealRooted.strictInterl_or_reverse_of_posComboRealRooted_of_no_common`. -/ -def PosComboNoCommonOrientationStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - PosComboRealRooted f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - f.natDegree ≤ g.natDegree → - g.natDegree ≤ f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - StrictInterl f g ∨ StrictInterl g f - -/-- Bridge statement: in the no-common, close-degree setup, positive-combination -real-rootedness upgrades to full all-combinations real-rootedness. -/ -def PosComboNoCommonToAllComboBridgeStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - PosComboRealRooted f g → - f.natDegree ≤ g.natDegree → - g.natDegree ≤ f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - AllComboRealRooted f g - -/-- Stronger no-common bridge hypothesis in the nonnegative regime: instead of -directly asking for `AllComboRealRooted f g`, assume the pair satisfies the -full positive affine family needed by Brändén's converse. This isolates the -remaining missing step as an affine-family packaging problem. -/ -def PosComboNoCommonAffineFamilyStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - f.natDegree ≤ g.natDegree → - g.natDegree ≤ f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ ⦃s t : ℝ⦄, 0 < s → 0 < t → - ((((C s * X + C t) * f) + g) ≠ 0 ∧ (((C s * X + C t) * f) + g).Splits) - -/-- Stronger boundary-right-pair hypothesis in the nonnegative no-common -regime: for each boundary member `C t * f + g`, orient the right-hand pair -against `X * f`. This is a useful conditional route to the affine family, not -the current endpoint for the packet proof. -/ -def PosComboNoCommonBoundaryRightPairOrientationStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - f.natDegree ≤ g.natDegree → - g.natDegree ≤ f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ ⦃t : ℝ⦄, 0 < t → - StrictInterl (C t * f + g) (X * f) ∨ StrictInterl (X * f) (C t * f + g) - -/-- Strong same-degree no-common alternative in the nonnegative regime. This -weakens the fixed orientation, but it is still stronger than the repaired -common-right-interleaver endpoint below. -/ -def PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - StrictInterl f g ∨ StrictInterl g f - /-- Repaired same-degree no-common target in the nonnegative regime. The orientation alternative is too strong in degree `2`; for the Chudnovsky--Seymour bridge the needed conclusion is only a common right @@ -118,20 +27,6 @@ def PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement : Prop := (∀ r, f.IsRoot r → ¬ g.IsRoot r) → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h -/-- Fixed-orientation succ-degree target in the nonnegative no-common regime. -This is stronger than what the Chudnovsky--Seymour bridge needs; the repaired -succ-degree endpoint below only asks for a common right interleaver. -/ -def PosComboNoCommonSuccDegreeOrientationNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - StrictInterl f g - /-- Repaired succ-degree no-common target for the Chudnovsky--Seymour bridge in the nonnegative regime: when the right degree is exactly one larger, the needed conclusion is the existence of a common interleaver, not a fixed diff --git a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean index 0e233d2c7..fae96d592 100644 --- a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean +++ b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean @@ -71,42 +71,6 @@ theorem succDegreePairHasCommonInterleaver_nonneg_of_slotData hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hsucc <| fun j hj => hslot j hj _ _ -/-- **Converse of the slot-data reduction for #42.** - -A common right interleaver `h` for the succ-degree pair `(f, g)` recovers both -pieces bundled by `PosComboNoCommonSuccDegreeSlotDataNonnegStatement`: -real-rootedness of `f` is the left component of `StrictInterl f h`, and each root-slot -intersection is witnessed by the corresponding root of `h` through -`rootSlotInterval_inter_nonempty_of_commonInterleaver`. - -Together with `succDegreePairHasCommonInterleaver_nonneg_of_slotData` this shows -the slot-data hypothesis is equivalent to the actual common-interleaver goal, -so the reduction to root slots loses nothing. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_pairHasCommonInterleaver - (hstmt : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc hno - obtain ⟨h, hfh, hgh⟩ := hstmt hf_pos hg_pos hfnn hgnn hfg hsucc hno - refine ⟨hfh.1, ?_⟩ - intro j hj _ _ - have hjg' : j < g.natDegree + 1 := by lia - exact rootSlotInterval_inter_nonempty_of_commonInterleaver hfh hgh j hj hjg' - -/-- **The #42 slot-data reformulation is equivalent to the target.** - -Combining `succDegreePairHasCommonInterleaver_nonneg_of_slotData` with its -converse `posComboNoCommonSuccDegreeSlotData_of_pairHasCommonInterleaver`, the -root-slot statement `PosComboNoCommonSuccDegreeSlotDataNonnegStatement` holds if -and only if the common-right-interleaver statement -`PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement` does. This -pins down the exact remaining content of milestone B2: proving the slot data is -neither stronger nor weaker than proving the interleaver goal directly. -/ -theorem posComboNoCommonSuccDegreeSlotData_iff_pairHasCommonInterleaver : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement ↔ - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - ⟨succDegreePairHasCommonInterleaver_nonneg_of_slotData, - posComboNoCommonSuccDegreeSlotData_of_pairHasCommonInterleaver⟩ - /-- **Combinatorial core of the succ-degree slot bound.** For descending real lists `rf` (length `n`) and `rg` (length `n + 1`), if the @@ -171,21 +135,6 @@ def PosComboSuccDegreeLeftSplitsNonnegStatement : Prop := g.natDegree = f.natDegree + 1 → f.Splits -/-- Residual form of the succ-degree left-endpoint problem after the algebraic -branches have been removed: the lower-degree polynomial has zero constant -coefficient, while the higher-degree polynomial does not. -/ -def PosComboSuccDegreeResidualLeftSplitsNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - f.coeff 0 = 0 → - g.coeff 0 ≠ 0 → - f.Splits - /-- The succ-degree left endpoint follows directly from the escaping-root continuity argument for the family `f + C μ * g`; no ASW input is needed. -/ theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity : @@ -195,29 +144,6 @@ theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity : splits_of_add_C_mul_family_of_succDegree (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc -/-- Residual succ-degree left endpoint from the same root-continuity argument. -/ -theorem PosComboSuccDegreeResidualLeftSplitsNonnegStatement_of_rootContinuity : - PosComboSuccDegreeResidualLeftSplitsNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc _ _ - exact - PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity - hf_pos hg_pos hfnn hgnn hfg hsucc - -/-- The succ-degree left endpoint follows from the forward -Aissen--Schoenberg--Whitney theorem. This gives an alternate classical route: -positive perturbations `f + μ g` are PF, and the PF Toeplitz minors are closed -under the coefficient limit `μ → 0⁺`. -/ -theorem PosComboRealRooted.left_splits_of_forward_asw - (hASW : aissenSchoenbergWhitneyForwardOrZeroStatement) - {f g : ℝ[X]} - (hfg : PosComboRealRooted f g) - (hf_pos : HasPosLeadingCoeff f) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) : - f.Splits := - IsPFPolynomial.splits_of_forall_pos_add_C_mul_of_forward - hASW hf_pos.ne_zero hfnn hgnn - fun {_} hμ => (hfg.isRealRooted_add_right hμ).2 - /-- The succ-degree left endpoint from the proved forward ASW theorem, with no backend argument required from the caller. -/ theorem PosComboRealRooted.left_splits_of_asw @@ -230,31 +156,6 @@ theorem PosComboRealRooted.left_splits_of_asw hf_pos.ne_zero hfnn hgnn fun {_} hμ => (hfg.isRealRooted_add_right hμ).2 -/-- Unconditional package form of `PosComboRealRooted.left_splits_of_asw` for -the milestone-B2 endpoint statement. -/ -theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_asw : - PosComboSuccDegreeLeftSplitsNonnegStatement := by - intro f g hf_pos _ hfnn hgnn hfg _ - exact hfg.left_splits_of_asw hf_pos hfnn hgnn - -/-- Conditional package form of `PosComboRealRooted.left_splits_of_forward_asw` -for the milestone-B2 endpoint statement. -/ -theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_forward_asw - (hASW : aissenSchoenbergWhitneyForwardOrZeroStatement) : - PosComboSuccDegreeLeftSplitsNonnegStatement := by - intro f g hf_pos _ hfnn hgnn hfg _ - exact hfg.left_splits_of_forward_asw hASW hf_pos hfnn hgnn - -/-- Residual package form of the forward-ASW route. This keeps the remaining -#42 branch available as a smaller challenge target, while making clear that the -PF-limit route already covers it under the forward ASW interface. -/ -theorem PosComboSuccDegreeResidualLeftSplitsNonnegStatement_of_forward_asw - (hASW : aissenSchoenbergWhitneyForwardOrZeroStatement) : - PosComboSuccDegreeResidualLeftSplitsNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc _ _ - exact (PosComboSuccDegreeLeftSplitsNonnegStatement_of_forward_asw hASW) - hf_pos hg_pos hfnn hgnn hfg hsucc - private theorem left_splits_of_succDegree_of_left_coeff_zero_ne_core {f g : ℝ[X]} (hfg : PosComboRealRooted f g) @@ -464,296 +365,4 @@ theorem succDegreeRootCountAbove_of_divX_coeff_zero {f g : ℝ[X]} ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 := rootCountAbove_diff_le_one_of_divX_coeff_zero hf hg hf0 hg0 hcount -/-- The full succ-degree left-endpoint statement is reduced to the residual -branch `f.coeff 0 = 0`, `g.coeff 0 ≠ 0`. - -The proof is a strong induction on `f.natDegree`. If `f.coeff 0 ≠ 0`, the -reflection route applies. If both constant coefficients vanish, divide both -polynomials by the common factor `X` and invoke the induction hypothesis. -/ -theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_residual - (hres : PosComboSuccDegreeResidualLeftSplitsNonnegStatement) : - PosComboSuccDegreeLeftSplitsNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc - refine - Nat.strong_induction_on - (p := fun n => - ∀ {f g : ℝ[X]}, - f.natDegree = n → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - f.Splits) - f.natDegree ?_ rfl hf_pos hg_pos hfnn hgnn hfg hsucc - intro n ih f g hfdeg hf_pos hg_pos hfnn hgnn hfg hsucc - by_cases hf0_ne : f.coeff 0 ≠ 0 - · exact - hfg.left_splits_of_succDegree_of_left_coeff_zero_ne - hf_pos hg_pos hfnn hgnn hsucc hf0_ne - · have hf0 : f.coeff 0 = 0 := by - by_contra hf0 - exact hf0_ne hf0 - by_cases hg0 : g.coeff 0 = 0 - · obtain ⟨hfdiv_pos, hgdiv_pos, hfdiv_nn, hgdiv_nn, hdiv_fg, hdiv_succ⟩ := - hfg.divX_succDegree_data hf_pos hg_pos hfnn hgnn hsucc hf0 hg0 - have hf_nat_pos := natDegree_pos_of_posLeadingCoeff_of_coeff_zero hf_pos hf0 - have hdiv_deg_lt : f.divX.natDegree < n := by - rw [← hfdeg, Polynomial.natDegree_divX_eq_natDegree_tsub_one] - lia - have hdiv_splits : f.divX.Splits := - ih f.divX.natDegree hdiv_deg_lt rfl - hfdiv_pos hgdiv_pos hfdiv_nn hgdiv_nn hdiv_fg hdiv_succ - exact DegreeDropReversal.splits_of_divX_splits_of_coeff_zero hf0 hdiv_splits - · exact hres hf_pos hg_pos hfnn hgnn hfg hsucc hf0 hg0 - -/-- The residual constant-term branch is exactly equivalent to the full -succ-degree left-endpoint statement: the reverse implication is just -specialization, while the forward implication is the strong-induction -constant-term reduction. -/ -theorem PosComboSuccDegreeLeftSplitsNonnegStatement_iff_residual : - PosComboSuccDegreeLeftSplitsNonnegStatement ↔ - PosComboSuccDegreeResidualLeftSplitsNonnegStatement := by - constructor - · intro h f g hf_pos hg_pos hfnn hgnn hfg hsucc _ _ - exact h hf_pos hg_pos hfnn hgnn hfg hsucc - · exact PosComboSuccDegreeLeftSplitsNonnegStatement_of_residual - -/-- Residual constant-term branch of the lower-threshold succ-degree no-common -root-count statement: the case `f.coeff 0 = 0` and hence `g.coeff 0 ≠ 0` by -the no-common hypothesis. -/ -def PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 = 0 → - g.coeff 0 ≠ 0 → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - -/-- Exact residual orientation target for the succ-degree branch: in the case -where the lower-degree polynomial has zero constant term but the higher-degree -polynomial does not, orient the original pair as `f ≺ g`. -/ -def PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 = 0 → - g.coeff 0 ≠ 0 → - StrictInterl f g - -/-- Nonzero constant-term branch of the lower-threshold succ-degree no-common -root-count statement. This is the root-count analogue of the reflection route -used for the succ-degree left endpoint. -/ -def PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - -/-- Nonzero constant-term succ-degree root-count branch, further restricted to -the subcase where the higher-degree member also has nonzero constant term. -/ -def PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 ≠ 0 → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - -/-- Nonzero constant-term succ-degree root-count branch, further restricted to -the subcase where the higher-degree member has zero constant term. -/ -def PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - -/-- Exact residual orientation target for the right-zero lead branch: after -removing the zero root from the higher-degree polynomial, orient the resulting -same-degree pair as `g.divX ≺ f`. -/ -def PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - StrictInterl (g.divX) f - -/-- The right-zero `divX` orientation target follows from proving the original -succ-degree orientation `StrictInterl f g` on this branch. The degree-drop step is -isolated in `strictInterl_divX_left_of_strictInterl_of_hasNonnegCoeffs_coeff_zero`. -/ -theorem posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG - (hstrictInterlFG : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - StrictInterl f g) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - exact strictInterl_divX_left_of_strictInterl_of_hasNonnegCoeffs_coeff_zero - (hstrictInterlFG hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0) hgnn hg0 hdeg - -/-- Converse of -`posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG`: -the sharper succ-degree orientation `StrictInterl f g` on the right-zero lead branch -follows from the `divX` orientation target `StrictInterl (g.divX) f`. The degree-drop -reconstruction is isolated in -`strictInterl_of_strictInterl_divX_left_of_hasNonnegCoeffs_coeff_zero`. - -Together with -`posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG` -this shows that on the right-zero lead branch the sharper orientation target and -the `divX` orientation target are equivalent. -/ -theorem posComboNoCommonSuccDegreeRootCountLeadRightZeroStrictInterlFG_of_divX - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - StrictInterl f g := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - exact strictInterl_of_strictInterl_divX_left_of_hasNonnegCoeffs_coeff_zero - (hdivX hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0) hfnn hgnn hg0 hdeg - -/-- On the right-zero lead branch, the sharper succ-degree orientation -`StrictInterl f g` is equivalent to the `divX` orientation target `StrictInterl (g.divX) f`. -/ -theorem posComboNoCommonSuccDegreeRootCountLeadRightZeroStrictInterlFG_iff_divXStrictInterl : - (∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - StrictInterl f g) ↔ - PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement := by - exact - ⟨posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG, - posComboNoCommonSuccDegreeRootCountLeadRightZeroStrictInterlFG_of_divX⟩ - -/-- The lead root-count branch splits into the two possible constant-term -cases for the higher-degree member. -/ -theorem posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_rightZero - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hright : PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 - by_cases hg0 : g.coeff 0 = 0 - · exact hright hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - · exact hboth hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 - -/-- `divX` reduction of the right-zero lead branch. - -When `g.coeff 0 = 0`, the roots of `g` are the roots of `g.divX` together with -one extra root at `0`. Thus the right-zero succ-degree lower root-count bounds -follow from the oriented same-degree lower count comparison of `g.divX` and -`f`. -/ -theorem posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_sameDegreeCount - (hcount : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) ≤ - (g.divX.roots.filter (· ≤ x)).card ∧ - ((g.divX.roots.filter (· ≤ x)).card : ℤ) ≤ - (f.roots.filter (· ≤ x)).card + 1) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 x - have hg_ne : g ≠ 0 := hg_pos.ne_zero - obtain ⟨hFH, hHF⟩ := - hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split hf0 hg0 x - by_cases h0 : (0 : ℝ) ≤ x - · have hc : ((g.roots.filter (· ≤ x)).card : ℤ) = - (g.divX.roots.filter (· ≤ x)).card + 1 := by - have h := card_roots_filter_divX_of_coeff_zero hg_ne hg0 (· ≤ x) - have h' : (g.roots.filter (· ≤ x)).card = - (g.divX.roots.filter (· ≤ x)).card + 1 := by - simpa [h0] using h - exact_mod_cast h' - exact ⟨by lia, by lia⟩ - · have hc : ((g.roots.filter (· ≤ x)).card : ℤ) = - (g.divX.roots.filter (· ≤ x)).card := by - have h := card_roots_filter_divX_of_coeff_zero hg_ne hg0 (· ≤ x) - have h' : (g.roots.filter (· ≤ x)).card = - (g.divX.roots.filter (· ≤ x)).card := by - simpa [h0] using h - exact_mod_cast h' - exact ⟨by lia, by lia⟩ - end RealRooted diff --git a/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean b/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean index 79ec29580..e450e1dda 100644 --- a/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean +++ b/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean @@ -209,42 +209,6 @@ theorem compatiblePairHasCommonInterleaver_of_natDegree_le_one pairHasCommonInterleaver_of_natDegree_le_one hf_pos hg_pos hf_deg_le_one hg_deg_le_one -/-- The old same-degree orientation alternative, when available, still feeds -the repaired same-degree common-interleaver target. -/ -theorem posComboNoCommonSameDegreePairHasCommonInterleaver_of_orientationAlternative_nonneg - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_rr : (f ≠ 0 ∧ f.Splits) := - hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg - have hg_rr : (g ≠ 0 ∧ g.Splits) := - hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg - have hslot : - ∀ j (hj : j < f.natDegree + 1), - (rootSlotInterval (rootSeqDesc f) - ⟨j, by simpa [rootSeqDesc_length hf_rr.2] using hj⟩ ∩ - rootSlotInterval (rootSeqDesc g) - ⟨j, by - have : j < g.natDegree + 1 := by lia - simpa [rootSeqDesc_length hg_rr.2] using this⟩).Nonempty := by - rcases hsame hf_pos hg_pos hfnn hgnn hfg hdeg hno with hstrictInterl | hstrictInterl - · intro j hj - exact - rootSlotInterval_inter_nonempty_of_commonInterleaver hstrictInterl - (StrictInterl.refl hstrictInterl.2.1.1 hstrictInterl.2.1.2) j - (by lia) - (by lia) - · intro j hj - exact - rootSlotInterval_inter_nonempty_of_commonInterleaver - (StrictInterl.refl hstrictInterl.2.1.1 hstrictInterl.2.1.2) hstrictInterl - j - (by lia) - (by lia) - exact - pairHasCommonInterleaver_of_sameDegree_slotIntersections - hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hdeg hslot - /-- Succ-degree branch of the honest no-common target is already unconditional in the constant-vs-linear endpoint case. -/ theorem posComboNoCommonSuccDegreeOrientation_of_degree_zero @@ -275,26 +239,6 @@ theorem posComboNoCommonSuccDegreeCommonLeftInterleaver_of_degree_zero posComboNoCommonSuccDegreeOrientation_of_degree_zero hf_pos hg_pos hf_deg0 hsucc -/-- The affine-family bridge proves the full corrected succ-degree -common-right-interleaver branch. The affine-family right-pair theorem gives -`g ≪ X * f`, so `X * f` is a common right interleaver. -/ -theorem posComboNoCommonSuccDegreePairHasCommonInterleaver_of_affineFamily - (haffBridge : PosComboNoCommonAffineFamilyStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc hno - have hf0 : f ≠ 0 := hf_pos.ne_zero - have hg0 : g ≠ 0 := hg_pos.ne_zero - have haff : - ∀ {s t : ℝ}, 0 < s → 0 < t → - ((((C s * X + C t) * f) + g) ≠ 0 ∧ - (((C s * X + C t) * f) + g).Splits) := - fun {s t} hs ht => - haffBridge hf_pos hg_pos hfnn hgnn hfg (by lia) (by lia) hno hs ht - have hright : StrictInterl g (X * f) := - strictInterl_right_pair_of_affine_family_nonneg - hf0 hg0 hfnn hgnn haff - exact pairHasCommonInterleaver_of_strictInterl_right_pair_nonneg hright hfnn - /-- Degree-zero base case for the succ-degree root-count formulation. If `f` has degree zero and `g` has degree one, then the lower-threshold count @@ -843,45 +787,4 @@ theorem posComboNoCommonPairHasCommonInterleaver_of_natDegree_le_two posComboNoCommonSameDegreePairHasCommonInterleaver_of_natDegree_le_two hf_pos hg_pos hfnn hgnn hfg hsame hno hfdeg -/-- Degree-`≤ 3` no-common endpoint from cubic same-degree and succ-degree -endpoints. -/ -theorem posComboNoCommonPairHasCommonInterleaver_of_natDegree_le_three_of_cubicInterior - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg_lo : f.natDegree ≤ g.natDegree) - (hdeg_hi : g.natDegree ≤ f.natDegree + 1) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hgdeg : g.natDegree ≤ 3) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by - rcases Nat.lt_or_ge f.natDegree g.natDegree with hlt | hge - · have hsucc_deg : g.natDegree = f.natDegree + 1 := by lia - exact hsucc hf_pos hg_pos hfnn hgnn hfg hsucc_deg hno - · have hsame : g.natDegree = f.natDegree := by lia - have hfdeg : f.natDegree ≤ 3 := by lia - exact - sameDegreePairHasCommonInterleaver_nonneg_of_natDegree_le_three_of_cubicInterior - hbelow habove hf_pos hg_pos hfnn hgnn hfg hsame hno hfdeg - -/-- Degree-`≤ 3` no-common endpoint naming both the cubic same-degree and -succ-degree branches. -/ -theorem posComboNoCommonPairHasCommonInterleaver_of_natDegree_le_three_and_succDegree - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg_lo : f.natDegree ≤ g.natDegree) - (hdeg_hi : g.natDegree ≤ f.natDegree + 1) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hgdeg : g.natDegree ≤ 3) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - posComboNoCommonPairHasCommonInterleaver_of_natDegree_le_three_of_cubicInterior - hbelow habove hsucc hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno hgdeg end RealRooted diff --git a/RealRooted/CommonInterleaverExamples.lean b/RealRooted/CommonInterleaverExamples.lean index e69c59c98..3a4645e9a 100644 --- a/RealRooted/CommonInterleaverExamples.lean +++ b/RealRooted/CommonInterleaverExamples.lean @@ -424,12 +424,21 @@ private lemma xAddOne_xAddTwo_not_strictInterl : | cons s₂ ss'' => simp at hss_len -/-- The honest succ-degree orientation target is false as well: the pair -`X + 1, (X + 2)(X + 3)` satisfies the positive-combo/no-common hypotheses and -even has a concrete common interleaver `X + 5/2`, but both quadratic roots lie -strictly to the left of `-1`, so `StrictInterl (X + 1) ((X + 2)(X + 3))` fails. -/ -lemma not_posComboNoCommonSuccDegreeOrientationNonnegStatement : - ¬ PosComboNoCommonSuccDegreeOrientationNonnegStatement := +/-- Fixed orientation fails for successor-degree pairs: the pair +`X + 1, (X + 2)(X + 3)` satisfies the positive-combination/no-common hypotheses +and even has a concrete common interleaver `X + 5/2`, but both quadratic roots +lie strictly to the left of `-1`, so `StrictInterl (X + 1) ((X + 2)(X + 3))` +fails. -/ +lemma not_forall_posCombo_succDegree_noCommon_strictInterl : + ¬ ∀ ⦃f g : ℝ[X]⦄, + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + HasNonnegCoeffs f → + HasNonnegCoeffs g → + PosComboRealRooted f g → + g.natDegree = f.natDegree + 1 → + (∀ r, f.IsRoot r → ¬ g.IsRoot r) → + StrictInterl f g := fun hsucc => xAddOne_xSq_add_fiveX_add_six_not_strictInterl (hsucc @@ -441,12 +450,20 @@ lemma not_posComboNoCommonSuccDegreeOrientationNonnegStatement : (by simp [xSq_add_fiveX_add_six_natDegree]) xAddOne_xSq_add_fiveX_add_six_noCommon) -/-- The nonnegative-coefficient negative right-pencil target is false. The -same pair `X + 1, (X + 2)(X + 3)` is compatible and has nonnegative -coefficients, but the negative pencil member at `μ = -1` is a quadratic with +/-- The negative half of the right pencil of a compatible successor-degree pair +need not be real-rooted. The pair `X + 1, (X + 2)(X + 3)` is compatible and has +nonnegative coefficients, but the pencil member at `μ = -1` is a quadratic with negative discriminant. -/ -lemma not_compatibleSuccDegreeNegativeRightFamilyNonnegStatement : - ¬ CompatibleSuccDegreeNegativeRightFamilyNonnegStatement := by +lemma not_forall_compatible_succDegree_negativeRightFamily_splits : + ¬ ∀ ⦃f g : ℝ[X]⦄, + Compatible f g → + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + HasNonnegCoeffs f → + HasNonnegCoeffs g → + g.natDegree = f.natDegree + 1 → + f.Splits → + ∀ μ : ℝ, μ < 0 → (f + C μ * g).Splits := by intro hneg have hcomp : Compatible (X + 1 : ℝ[X]) (((X + 2) * (X + 3)) : ℝ[X]) := Compatible.of_posComboRealRooted @@ -491,37 +508,25 @@ lemma not_compatibleSuccDegreeNegativeRightFamilyNonnegStatement : rw [hp_eq] at hdisc norm_num [coeff_X, pow_two] at hdisc -/-- The coefficient-free negative right-pencil shortcut is false, already for -the nonnegative-coefficient counterexample above. -/ -lemma not_compatibleSuccDegreeNegativeRightFamilyStatement : - ¬ CompatibleSuccDegreeNegativeRightFamilyStatement := - fun hneg => - not_compatibleSuccDegreeNegativeRightFamilyNonnegStatement - (fun {f g} hcomp hf_pos hg_pos _ _ hdeg hf_split μ hμ => - hneg (f := f) (g := g) hcomp hf_pos hg_pos hdeg hf_split μ hμ) - -/-- The signed right-pencil shortcut is false, because it contains the negative -right-pencil half-line. -/ -lemma not_compatibleSuccDegreeSignedRightFamilyStatement : - ¬ CompatibleSuccDegreeSignedRightFamilyStatement := - fun hsigned => - not_compatibleSuccDegreeNegativeRightFamilyStatement - (fun {f g} hcomp hf_pos hg_pos hdeg hf_split μ _ => - hsigned (f := f) (g := g) hcomp hf_pos hg_pos hdeg hf_split μ) - -/-- The coefficient-free all-combinations shortcut is false, because it would -imply the negative right-pencil shortcut. -/ -lemma not_compatibleSuccDegreeAllComboStatement : - ¬ CompatibleSuccDegreeAllComboStatement := +/-- Compatible successor-degree pairs need not have all real combinations +real-rooted: this would contain the negative right pencil. -/ +lemma not_forall_compatible_succDegree_allComboRealRooted : + ¬ ∀ ⦃f g : ℝ[X]⦄, + Compatible f g → + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + g.natDegree = f.natDegree + 1 → + f.Splits → + AllComboRealRooted f g := fun hall => - not_compatibleSuccDegreeNegativeRightFamilyStatement - (compatibleSuccDegreeNegativeRightFamily_of_allCombo hall) + not_forall_compatible_succDegree_negativeRightFamily_splits + (fun {f g} hcomp hf_pos hg_pos _ _ hdeg hf_split μ _ => by + simpa using hall (f := f) (g := g) hcomp hf_pos hg_pos hdeg hf_split 1 μ) -/-! ### The general no-common orientation statement is false +/-! ### No-common positive combinations need not be oriented -The named `PosComboNoCommonOrientationStatement` (with the weaker conclusion -`StrictInterl f g ∨ StrictInterl g f`, and no nonnegative-coefficient hypothesis) is also -false. Witnesses: `f = (X - 1)(X + 1) = X^2 - 1` and +Even the weaker conclusion `StrictInterl f g ∨ StrictInterl g f`, without a +nonnegative-coefficient hypothesis, fails. Witnesses: `f = (X - 1)(X + 1) = X^2 - 1` and `g = (X - 2)(X + 2) = X^2 - 4`. Every positive combination `lambda * f + mu * g = (lambda + mu) * X^2 - (lambda + 4 * mu)` is real-rooted; the pair has no common roots; but `g`'s roots strictly nest @@ -652,11 +657,29 @@ private lemma orientCex_not_strictInterl : · simp only [ListAlternates, ListInterlaces] at halt simp_all -/-! ### The residual succ-degree orientation target is false - -The residual branch of the succ-degree no-common orientation problem -(`PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement`) additionally -assumes `f.coeff 0 = 0` and `g.coeff 0 ≠ 0`. It is false: take `f = X` and +/-- Positive-combination real-rootedness without common roots does not force +either interlacing orientation, even in equal degree. -/ +lemma not_forall_posCombo_noCommon_strictInterl_or : + ¬ ∀ ⦃f g : ℝ[X]⦄, + PosComboRealRooted f g → + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + f.natDegree ≤ g.natDegree → + g.natDegree ≤ f.natDegree + 1 → + (∀ r, f.IsRoot r → ¬ g.IsRoot r) → + StrictInterl f g ∨ StrictInterl g f := + fun horient => + orientCex_not_strictInterl + (horient orientCex_posComboRealRooted + orientCexF_hasPosLeadingCoeff orientCexG_hasPosLeadingCoeff + (by simp [orientCexF_natDegree, orientCexG_natDegree]) + (by simp [orientCexF_natDegree, orientCexG_natDegree]) + orientCex_noCommon) + +/-! ### Successor-degree orientation fails even with `f.coeff 0 = 0` + +Adding the hypotheses `f.coeff 0 = 0` and `g.coeff 0 ≠ 0` to the +successor-degree orientation problem does not help: take `f = X` and `g = (X + 1)(X + 2)`. A common left interleaver `X + 3/2` witnesses the positive-combination condition, but `0`, the only root of `X`, lies strictly to the right of both roots of `g`, so `StrictInterl X g` fails. -/ @@ -748,6 +771,30 @@ private lemma X_not_strictInterl_xAddOne_xAddTwo : have h0 : (0 : ℝ) ∈ (X : ℝ[X]).roots := by simp grind +/-- Fixed orientation fails for successor-degree pairs even when the +lower-degree polynomial vanishes at `0` and the higher-degree one does not. -/ +lemma not_forall_posCombo_succDegree_noCommon_coeff_zero_strictInterl : + ¬ ∀ ⦃f g : ℝ[X]⦄, + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + HasNonnegCoeffs f → + HasNonnegCoeffs g → + PosComboRealRooted f g → + g.natDegree = f.natDegree + 1 → + (∀ r, f.IsRoot r → ¬ g.IsRoot r) → + f.Splits → + f.coeff 0 = 0 → + g.coeff 0 ≠ 0 → + StrictInterl f g := + fun hresid => + X_not_strictInterl_xAddOne_xAddTwo + (hresid X_hasPosLeadingCoeff xAddOne_xAddTwo_hasPosLeadingCoeff + X_hasNonnegCoeffs xAddOne_xAddTwo_hasNonnegCoeffs + X_xAddOne_xAddTwo_posComboRealRooted + (by simp [xAddOne_xAddTwo_natDegree]) + X_xAddOne_xAddTwo_noCommon X_isRealRooted.2 X_coeff_zero + xAddOne_xAddTwo_coeff_zero_ne) + end CommonInterleaverExamples end RealRooted diff --git a/RealRooted/Compatibility/InterleaverBridge.lean b/RealRooted/Compatibility/InterleaverBridge.lean index a72863aa4..0ff8cdf35 100644 --- a/RealRooted/Compatibility/InterleaverBridge.lean +++ b/RealRooted/Compatibility/InterleaverBridge.lean @@ -76,32 +76,6 @@ def CompatiblePairHasCommonInterleaverStatement : Prop := Compatible f g → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h -private theorem compatiblePairHasCommonInterleaver_core - (hbridge : CompatiblePairHasCommonInterleaverStatement) - {f g : ℝ[X]} - (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (h : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - hbridge hf hg h - -/-- Two-polynomial common-left bridge, parameterized by the corresponding -positive-leading common-right bridge to avoid an import cycle with the analytic -Chudnovsky--Seymour endpoints. -/ -theorem compatiblePairHasCommonLeftInterleaver - (hbridge : CompatiblePairHasCommonInterleaverStatement) - {f g : ℝ[X]} - (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (h : Compatible f g) : - ∃ h : ℝ[X], StrictInterl h f ∧ StrictInterl h g := by - have hclose := h.natDegree_close hf hg - by_cases hdeg : f.natDegree ≤ g.natDegree - · obtain ⟨k, hfk, hgk⟩ := compatiblePairHasCommonInterleaver_core hbridge hf hg h - exact pairHasCommonLeftInterleaver_of_commonInterleaver hfk hgk hdeg hclose.2 - · have hdeg' : g.natDegree ≤ f.natDegree := le_of_not_ge hdeg - obtain ⟨k, hgk, hfk⟩ := - compatiblePairHasCommonInterleaver_core hbridge hg hf h.comm - obtain ⟨l, hlg, hlf⟩ := - pairHasCommonLeftInterleaver_of_commonInterleaver hgk hfk hdeg' hclose.1 - exact ⟨l, hlf, hlg⟩ - /-- Positive-leading two-polynomial common-left bridge. This is the usable pair-local form for the roadmap theorem, whose finite-family statement already assumes memberwise positive leading coefficients. -/ @@ -127,21 +101,6 @@ theorem pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible (hpos (fs.get j) (fs.get_mem j)) (hpair i j hij) -/-- Positive-leading version of -`pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible`, using the memberwise -positive-leading hypotheses already present in the finite-family theorem. -/ -theorem pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible_pos - {fs : List ℝ[X]} - (htwo : CompatiblePairHasCommonLeftInterleaverPosStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonLeftInterleaver fs := - fun i j hij => - htwo - (hpos (fs.get i) (fs.get_mem i)) - (hpos (fs.get j) (fs.get_mem j)) - (hpair i j hij) - /-- Reduction for the left-oriented Chudnovsky--Seymour target: the full `PairwiseCompatible ↔ HasCommonLeftInterleaver` statement follows from the two-polynomial common-left bridge and the finite-family left Helly upgrade. -/ @@ -166,95 +125,6 @@ theorem pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge_direc pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge htwo hpos <| hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver hrr hpos -/-- Direct left-oriented finite-family reduction from the positive-leading -two-polynomial common-left bridge. -/ -theorem pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridgePos_direct - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, f.Splits) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (htwo : CompatiblePairHasCommonLeftInterleaverPosStatement) : - PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := - ⟨fun hpair => - hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver hrr hpos <| - pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible_pos htwo hpos hpair, - fun hcommon => pairwiseCompatible_of_commonLeftInterleaver hcommon hpos⟩ - -/-- Positive-leading two-polynomial common-right bridge: compatibility implies -a common right interleaver. -/ -def CompatiblePairHasCommonRightInterleaverStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -/-- Natural two-polynomial bridge: compatibility plus positive leading -coefficients implies a common right interleaver. -/ -theorem compatiblePairHasCommonInterleaver - (hbridge : CompatiblePairHasCommonInterleaverStatement) - {f g : ℝ[X]} - (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (h : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - compatiblePairHasCommonInterleaver_core hbridge hf hg h - -/-- Once the two-polynomial common-right-interleaver converse is available, the -pairwise Chudnovsky--Seymour hypothesis upgrades to pairwise common right -interleavers. -/ -theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible - {fs : List ℝ[X]} - (htwo : CompatiblePairHasCommonRightInterleaverStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - fun i j hij => - htwo - (hpos (fs.get i) (fs.get_mem i)) - (hpos (fs.get j) (fs.get_mem j)) - (hpair i j hij) - -/-- Same-degree branch of the positive-leading compatibility bridge. This is -the honest `Compatible`-level version of article 3.6.1 → 3.6.2 in the equal- -degree case. -/ -def CompatibleSameDegreePairHasCommonInterleaverStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - Compatible f g → - g.natDegree = f.natDegree → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -/-- Succ-degree branch of the positive-leading compatibility bridge. Since -`Compatible.natDegree_close` already rules out larger degree gaps, this and -the same-degree branch are the only genuinely remaining cases. -/ -def CompatibleSuccDegreePairHasCommonInterleaverStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - Compatible f g → - g.natDegree = f.natDegree + 1 → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -/-- Since `Compatible.natDegree_close` limits the degree gap to at most one, -the full positive-leading compatibility bridge reduces to the same-degree and -succ-degree cases, together with symmetry. -/ -theorem compatiblePairHasCommonInterleaver_of_degreeSplit - (hsame : CompatibleSameDegreePairHasCommonInterleaverStatement) - (hsucc : CompatibleSuccDegreePairHasCommonInterleaverStatement) : - CompatiblePairHasCommonInterleaverStatement := by - intro f g hf hg hfg - have : f.natDegree ≤ g.natDegree + 1 ∧ g.natDegree ≤ f.natDegree + 1 := - hfg.natDegree_close hf hg - by_cases hdeg : f.natDegree ≤ g.natDegree - · rcases (by lia : g.natDegree = f.natDegree ∨ - g.natDegree = f.natDegree + 1) with hsame_deg | hsucc_deg - · exact hsame hf hg hfg hsame_deg - · exact hsucc hf hg hfg hsucc_deg - · have : g.natDegree ≤ f.natDegree := le_of_not_ge hdeg - rcases (by lia : f.natDegree = g.natDegree ∨ - f.natDegree = g.natDegree + 1) with hsame_deg | hsucc_deg - · lia - · exact (hsucc hg hf hfg.comm hsucc_deg).imp fun _ h => h.symm - /-- A positive-leading common-right bridge implies the corresponding common-left bridge: first get a common right interleaver, then convert it to a common left interleaver using degree closeness. -/ diff --git a/RealRooted/ProductFamily.lean b/RealRooted/ProductFamily.lean index 835b16d37..d092a2dda 100644 --- a/RealRooted/ProductFamily.lean +++ b/RealRooted/ProductFamily.lean @@ -246,7 +246,7 @@ theorem hasCommonInterleaver_zipWith_mul_reverse_of_interlacingSeqNonneg (row := fs) (fs := gs.reverse) hfs.posLeadingCoeff (posLeadingCoeff_reverse_of_interlacingSeqNonneg hgs) - exact commonInterleaverFamilyUpgrade hrr hpos hpair + exact hasCommonInterleaver_of_pairwiseHasCommonInterleaver hrr hpos hpair /-- Brändén's Lemma 7.8.3: the reversed product-sum of two interlacing nonnegative families is real-rooted. diff --git a/RealRooted/SameDegreeCubicRootCount.lean b/RealRooted/SameDegreeCubicRootCount.lean index a7eaabf9d..3f4024173 100644 --- a/RealRooted/SameDegreeCubicRootCount.lean +++ b/RealRooted/SameDegreeCubicRootCount.lean @@ -207,99 +207,6 @@ theorem cubicDiscr_monicCubicPencil_neg_of_deriv_disc_neg rw [monicCubicPencil_eq] exact cubicDiscr_neg_of_deriv_disc_neg _ _ _ _ hlead hderiv -/-- Pure algebraic negative-discriminant leaf for the `2`-below cubic -configuration. Together with `cubicDiscr_monicPencil_nonneg_of_posCombo`, this -rules out the corresponding positive-combination real-rooted configuration. -/ -def CubicDiscrMonicPencilNegTwoBelowStatement : Prop := - ∀ a b c p q r : ℝ, - a ≤ b → - b ≤ c → - p ≤ q → - q ≤ r → - q < a → - a ≤ r → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))) < 0 - -/-- Affine normalization of the two-below negative-discriminant leaf. - -It suffices to prove the normalized case with `a = 1` and `q = 0`; the -orientation-preserving affine map `x ↦ (x - q) / (a - q)` transports a -normalized negative-discriminant witness back to the original configuration. -/ -theorem cubicDiscrMonicPencilNegTwoBelow_of_normalized - (H : ∀ b c p r : ℝ, 1 ≤ b → b ≤ c → p ≤ 0 → 1 ≤ r → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C (1 : ℝ)) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C (0 : ℝ)) * (X - C r))) < 0) : - CubicDiscrMonicPencilNegTwoBelowStatement := by - intro a b c p q r hab hbc hpq hqr hqa har - have haqpos : 0 < a - q := by linarith - have haqne : a - q ≠ 0 := ne_of_gt haqpos - obtain ⟨s, hs, hneg⟩ := - H ((b - q) / (a - q)) ((c - q) / (a - q)) - ((p - q) / (a - q)) ((r - q) / (a - q)) - (by rw [le_div_iff₀ haqpos]; linarith) - (by gcongr) - (by rw [div_nonpos_iff]; grind) - (by rw [le_div_iff₀ haqpos]; linarith) - refine ⟨s, hs, ?_⟩ - have key : cubicDiscr ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))) - = (a - q) ^ 6 * cubicDiscr ((X - C (1 : ℝ)) - * (X - C ((b - q) / (a - q))) - * (X - C ((c - q) / (a - q))) - + C s * ((X - C ((p - q) / (a - q))) * (X - C (0 : ℝ)) - * (X - C ((r - q) / (a - q))))) := by - rw [cubicDiscr_monicCubicPencil_eq, cubicDiscr_monicCubicPencil_eq] - field_simp - ring - rw [key] - exact mul_neg_of_pos_of_neg (by positivity) hneg - -/-- Pure algebraic negative-discriminant leaf for the `2`-above cubic -configuration. -/ -def CubicDiscrMonicPencilNegTwoAboveStatement : Prop := - ∀ a b c p q r : ℝ, - a ≤ b → - b ≤ c → - p ≤ q → - q ≤ r → - a ≤ r → - r < b → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))) < 0 - -/-- Affine normalization of the two-above negative-discriminant leaf. -/ -theorem cubicDiscrMonicPencilNegTwoAbove_of_normalized - (H : ∀ a c p q : ℝ, a ≤ 0 → 1 ≤ c → p ≤ q → q ≤ 0 → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C (1 : ℝ)) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C (0 : ℝ)))) < 0) : - CubicDiscrMonicPencilNegTwoAboveStatement := by - intro a b c p q r hab hbc hpq hqr har hrb - have hbrpos : 0 < b - r := by linarith - have hbrne : b - r ≠ 0 := ne_of_gt hbrpos - obtain ⟨s, hs, hneg⟩ := H ((a - r) / (b - r)) ((c - r) / (b - r)) - ((p - r) / (b - r)) ((q - r) / (b - r)) - (by rw [div_nonpos_iff]; grind) - (by rw [le_div_iff₀ hbrpos]; linarith) - (by gcongr) - (by rw [div_nonpos_iff]; grind) - refine ⟨s, hs, ?_⟩ - have key : cubicDiscr ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))) - = (b - r) ^ 6 * cubicDiscr ((X - C ((a - r) / (b - r))) * (X - C (1 : ℝ)) - * (X - C ((c - r) / (b - r))) - + C s * ((X - C ((p - r) / (b - r))) * (X - C ((q - r) / (b - r))) - * (X - C (0 : ℝ)))) := by - rw [cubicDiscr_monicCubicPencil_eq, cubicDiscr_monicCubicPencil_eq] - field_simp - ring - rw [key] - exact mul_neg_of_pos_of_neg (by positivity) hneg - /- The following derivative-discriminant helpers are #41-only cubic support, not the direct #42 route. -/ @@ -331,36 +238,6 @@ theorem exists_deriv_disc_neg_of_coeffs (a b c p q r : ℝ) obtain ⟨s, hs, hlt⟩ := exists_pos_of_quadratic_neg _ _ _ hA hB hdisc grind -/-- #41-only sufficient condition feeding -`CubicDiscrMonicPencilNegTwoBelowStatement`: it is enough to find a positive -parameter where the monic cubic pencil's derivative has negative discriminant. -/ -theorem cubicDiscrMonicPencilNegTwoBelow_of_deriv_disc - (H : ∀ a b c p q r : ℝ, a ≤ b → b ≤ c → p ≤ q → q ≤ r → q < a → a ≤ r → - ∃ s : ℝ, 0 < s ∧ - (-((a + b + c) + s * (p + q + r))) ^ 2 < - 3 * (1 + s) * ((a * b + b * c + c * a) + s * (p * q + q * r + r * p))) : - CubicDiscrMonicPencilNegTwoBelowStatement := by - intro a b c p q r hab hbc hpq hqr hqa har - obtain ⟨s, hs, hderiv⟩ := H a b c p q r hab hbc hpq hqr hqa har - exact ⟨s, hs, - cubicDiscr_monicCubicPencil_neg_of_deriv_disc_neg a b c p q r s (by linarith) - hderiv⟩ - -/-- #41-only sufficient condition feeding -`CubicDiscrMonicPencilNegTwoAboveStatement`: it is enough to find a positive -parameter where the monic cubic pencil's derivative has negative discriminant. -/ -theorem cubicDiscrMonicPencilNegTwoAbove_of_deriv_disc - (H : ∀ a b c p q r : ℝ, a ≤ b → b ≤ c → p ≤ q → q ≤ r → a ≤ r → r < b → - ∃ s : ℝ, 0 < s ∧ - (-((a + b + c) + s * (p + q + r))) ^ 2 < - 3 * (1 + s) * ((a * b + b * c + c * a) + s * (p * q + q * r + r * p))) : - CubicDiscrMonicPencilNegTwoAboveStatement := by - intro a b c p q r hab hbc hpq hqr har hrb - obtain ⟨s, hs, hderiv⟩ := H a b c p q r hab hbc hpq hqr har hrb - exact ⟨s, hs, - cubicDiscr_monicCubicPencil_neg_of_deriv_disc_neg a b c p q r s (by linarith) - hderiv⟩ - /-- #41-only: in the two-below cubic configuration the leading coefficient of the derivative-discriminant quadratic in the pencil parameter is strictly positive. -/ @@ -369,119 +246,6 @@ theorem derivDiscA_pos_of_lt {p q r : ℝ} (hqr : q < r) : linarith [mul_pos (sub_pos.mpr hqr) (sub_pos.mpr hqr), sq_nonneg (p - q), sq_nonneg (p - r)] -/-- #41-only wrapper reducing `CubicDiscrMonicPencilNegTwoBelowStatement` to -compact ordered-root coefficient inequalities. -/ -theorem cubicDiscrMonicPencilNegTwoBelow_of_coeff_ineqs - (H : ∀ a b c p q r : ℝ, a ≤ b → b ≤ c → p ≤ q → q ≤ r → - q < a → a ≤ r → - 0 < (p + q + r) ^ 2 - 3 * (p * q + q * r + r * p) ∧ - 2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p) < 0 ∧ - 4 * ((p + q + r) ^ 2 - 3 * (p * q + q * r + r * p)) * - ((a + b + c) ^ 2 - 3 * (a * b + b * c + c * a)) < - (2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p)) ^ 2) : - CubicDiscrMonicPencilNegTwoBelowStatement := - cubicDiscrMonicPencilNegTwoBelow_of_deriv_disc - (fun a b c p q r hab hbc hpq hqr hqa har => - let ⟨hA, hB, hdisc⟩ := H a b c p q r hab hbc hpq hqr hqa har - exists_deriv_disc_neg_of_coeffs a b c p q r hA hB hdisc) - -/-- #41-only refined two-below wrapper. Since `q < a ≤ r` forces `q < r`, -`derivDiscA_pos_of_lt` supplies the leading-coefficient inequality. -/ -theorem cubicDiscrMonicPencilNegTwoBelow_of_coeff_ineqs' - (H : ∀ a b c p q r : ℝ, a ≤ b → b ≤ c → p ≤ q → q ≤ r → - q < a → a ≤ r → - 2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p) < 0 ∧ - 4 * ((p + q + r) ^ 2 - 3 * (p * q + q * r + r * p)) * - ((a + b + c) ^ 2 - 3 * (a * b + b * c + c * a)) < - (2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p)) ^ 2) : - CubicDiscrMonicPencilNegTwoBelowStatement := - cubicDiscrMonicPencilNegTwoBelow_of_coeff_ineqs - (fun a b c p q r hab hbc hpq hqr hqa har => - let ⟨hB, hdisc⟩ := H a b c p q r hab hbc hpq hqr hqa har - ⟨derivDiscA_pos_of_lt (lt_of_lt_of_le hqa har), hB, hdisc⟩) - -/-- #41-only wrapper reducing `CubicDiscrMonicPencilNegTwoAboveStatement` to -compact ordered-root coefficient inequalities. -/ -theorem cubicDiscrMonicPencilNegTwoAbove_of_coeff_ineqs - (H : ∀ a b c p q r : ℝ, a ≤ b → b ≤ c → p ≤ q → q ≤ r → - a ≤ r → r < b → - 0 < (p + q + r) ^ 2 - 3 * (p * q + q * r + r * p) ∧ - 2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p) < 0 ∧ - 4 * ((p + q + r) ^ 2 - 3 * (p * q + q * r + r * p)) * - ((a + b + c) ^ 2 - 3 * (a * b + b * c + c * a)) < - (2 * (a + b + c) * (p + q + r) - - 3 * (a * b + b * c + c * a) - - 3 * (p * q + q * r + r * p)) ^ 2) : - CubicDiscrMonicPencilNegTwoAboveStatement := - cubicDiscrMonicPencilNegTwoAbove_of_deriv_disc - (fun a b c p q r hab hbc hpq hqr har hrb => - let ⟨hA, hB, hdisc⟩ := H a b c p q r hab hbc hpq hqr har hrb - exists_deriv_disc_neg_of_coeffs a b c p q r hA hB hdisc) - -/-- Non-splitting reformulation of the `2`-below negative-discriminant leaf. -/ -def CubicMonicPencilNotSplitsTwoBelowStatement : Prop := - ∀ a b c p q r : ℝ, - a ≤ b → - b ≤ c → - p ≤ q → - q ≤ r → - q < a → - a ≤ r → - ∃ s : ℝ, 0 < s ∧ - ¬ ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))).Splits - -/-- Non-splitting reformulation of the `2`-above negative-discriminant leaf. -/ -def CubicMonicPencilNotSplitsTwoAboveStatement : Prop := - ∀ a b c p q r : ℝ, - a ≤ b → - b ≤ c → - p ≤ q → - q ≤ r → - a ≤ r → - r < b → - ∃ s : ℝ, 0 < s ∧ - ¬ ((X - C a) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C r))).Splits - -/-- The `2`-below negative-discriminant leaf is equivalent to non-splitting. -/ -theorem cubicDiscrMonicPencilNegTwoBelow_iff_notSplits : - CubicDiscrMonicPencilNegTwoBelowStatement ↔ - CubicMonicPencilNotSplitsTwoBelowStatement := by - constructor - · intro h a b c p q r hab hbc hpq hqr hqa har - obtain ⟨s, hs, hd⟩ := h a b c p q r hab hbc hpq hqr hqa har - exact ⟨s, hs, - (cubicDiscr_monicCubicPencil_neg_iff_not_splits a b c p q r s).mp hd⟩ - · intro h a b c p q r hab hbc hpq hqr hqa har - obtain ⟨s, hs, hd⟩ := h a b c p q r hab hbc hpq hqr hqa har - exact ⟨s, hs, - (cubicDiscr_monicCubicPencil_neg_iff_not_splits a b c p q r s).mpr hd⟩ - -/-- The `2`-above negative-discriminant leaf is equivalent to non-splitting. -/ -theorem cubicDiscrMonicPencilNegTwoAbove_iff_notSplits : - CubicDiscrMonicPencilNegTwoAboveStatement ↔ - CubicMonicPencilNotSplitsTwoAboveStatement := by - constructor - · intro h a b c p q r hab hbc hpq hqr har hrb - obtain ⟨s, hs, hd⟩ := h a b c p q r hab hbc hpq hqr har hrb - exact ⟨s, hs, - (cubicDiscr_monicCubicPencil_neg_iff_not_splits a b c p q r s).mp hd⟩ - · intro h a b c p q r hab hbc hpq hqr har hrb - obtain ⟨s, hs, hd⟩ := h a b c p q r hab hbc hpq hqr har hrb - exact ⟨s, hs, - (cubicDiscr_monicCubicPencil_neg_iff_not_splits a b c p q r s).mpr hd⟩ - /-- Root count of a three-element multiset below a threshold, as a sum of indicators. -/ theorem card_filter_le_triple (a b c x : ℝ) : @@ -684,30 +448,6 @@ def CubicInteriorTwoAboveStatement : Prop := r < b → False -/-- The negative-discriminant monic-pencil leaf implies the interior `2`-below -obstruction. -/ -theorem cubicInteriorTwoBelow_of_discr_monicPencil_neg - (hneg : CubicDiscrMonicPencilNegTwoBelowStatement) : - CubicInteriorTwoBelowStatement := by - intro f g hf hg hfs hgs hfd hgd hpc a b c p q r hab hbc hpq hqr hfr hgr hqa har - have hnonneg := - cubicDiscr_monicPencil_nonneg_of_posCombo - hf hg hfs hgs hfd hgd hpc a b c p q r hfr hgr - obtain ⟨s, hs, hlt⟩ := hneg a b c p q r hab hbc hpq hqr hqa har - grind - -/-- The negative-discriminant monic-pencil leaf implies the interior `2`-above -obstruction. -/ -theorem cubicInteriorTwoAbove_of_discr_monicPencil_neg - (hneg : CubicDiscrMonicPencilNegTwoAboveStatement) : - CubicInteriorTwoAboveStatement := by - intro f g hf hg hfs hgs hfd hgd hpc a b c p q r hab hbc hpq hqr hfr hgr har hrb - have hnonneg := - cubicDiscr_monicPencil_nonneg_of_posCombo - hf hg hfs hgs hfd hgd hpc a b c p q r hfr hgr - obtain ⟨s, hs, hlt⟩ := hneg a b c p q r hab hbc hpq hqr har hrb - grind - /-- The two interior cubic obstructions imply the second-root bound leaf. -/ theorem cubicSecondRootBound_of_interior (hbelow : CubicInteriorTwoBelowStatement) @@ -734,45 +474,6 @@ theorem cubicSecondRootBound_of_interior · exact habove hf hg hfs hgs hfd hgd hpc a b c p q r hab hbc hpq hqr hfr hgr har hcon -/-- The two negative-discriminant monic-pencil leaves imply the cubic -second-root bound. -/ -theorem cubicSecondRootBound_of_discr_monicPencil_neg - (hbelow : CubicDiscrMonicPencilNegTwoBelowStatement) - (habove : CubicDiscrMonicPencilNegTwoAboveStatement) : - CubicSecondRootBoundStatement := - cubicSecondRootBound_of_interior - (cubicInteriorTwoBelow_of_discr_monicPencil_neg hbelow) - (cubicInteriorTwoAbove_of_discr_monicPencil_neg habove) - -/-- Normalized negative-discriminant leaves imply the cubic second-root bound. -/ -theorem cubicSecondRootBound_of_normalized - (hbelow : ∀ b c p r : ℝ, 1 ≤ b → b ≤ c → p ≤ 0 → 1 ≤ r → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C (1 : ℝ)) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C (0 : ℝ)) * (X - C r))) < 0) - (habove : ∀ a c p q : ℝ, a ≤ 0 → 1 ≤ c → p ≤ q → q ≤ 0 → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C (1 : ℝ)) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C (0 : ℝ)))) < 0) : - CubicSecondRootBoundStatement := - cubicSecondRootBound_of_discr_monicPencil_neg - (cubicDiscrMonicPencilNegTwoBelow_of_normalized hbelow) - (cubicDiscrMonicPencilNegTwoAbove_of_normalized habove) - -/-- Non-splitting formulation implies the `2`-below interior obstruction. -/ -theorem cubicInteriorTwoBelow_of_notSplits - (h : CubicMonicPencilNotSplitsTwoBelowStatement) : - CubicInteriorTwoBelowStatement := - cubicInteriorTwoBelow_of_discr_monicPencil_neg - (cubicDiscrMonicPencilNegTwoBelow_iff_notSplits.mpr h) - -/-- Non-splitting formulation implies the `2`-above interior obstruction. -/ -theorem cubicInteriorTwoAbove_of_notSplits - (h : CubicMonicPencilNotSplitsTwoAboveStatement) : - CubicInteriorTwoAboveStatement := - cubicInteriorTwoAbove_of_discr_monicPencil_neg - (cubicDiscrMonicPencilNegTwoAbove_iff_notSplits.mpr h) - /-- Checked reduction of the cubic same-degree root-count target to the partial-separation leaf. @@ -827,137 +528,4 @@ theorem sameDegree_cubic_rootCount_le_one_of_interior (cubicSecondRootBound_of_interior hbelow habove) hfdeg hgdeg hf hg hf_pos hg_pos hpc -/-- End-to-end reduction of the cubic root-count bound to the -negative-discriminant monic-pencil leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_discr_monicPencil_neg - (hbelow : CubicDiscrMonicPencilNegTwoBelowStatement) - (habove : CubicDiscrMonicPencilNegTwoAboveStatement) - {f g : ℝ[X]} - (hfdeg : f.natDegree = 3) (hgdeg : g.natDegree = 3) - (hf : f.Splits) (hg : g.Splits) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) : - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := - sameDegree_cubic_rootCount_le_one_of_secondRootBound - (cubicSecondRootBound_of_discr_monicPencil_neg hbelow habove) - hfdeg hgdeg hf hg hf_pos hg_pos hpc - -/-- End-to-end reduction of the cubic root-count bound to the normalized -negative-discriminant monic-pencil leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_normalized - (hbelow : ∀ b c p r : ℝ, 1 ≤ b → b ≤ c → p ≤ 0 → 1 ≤ r → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C (1 : ℝ)) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C (0 : ℝ)) * (X - C r))) < 0) - (habove : ∀ a c p q : ℝ, a ≤ 0 → 1 ≤ c → p ≤ q → q ≤ 0 → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C (1 : ℝ)) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C (0 : ℝ)))) < 0) - {f g : ℝ[X]} - (hfdeg : f.natDegree = 3) (hgdeg : g.natDegree = 3) - (hf : f.Splits) (hg : g.Splits) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) : - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := - sameDegree_cubic_rootCount_le_one_of_discr_monicPencil_neg - (cubicDiscrMonicPencilNegTwoBelow_of_normalized hbelow) - (cubicDiscrMonicPencilNegTwoAbove_of_normalized habove) - hfdeg hgdeg hf hg hf_pos hg_pos hpc - -/-- Same-degree positive-combination cubic root-count wrapper from the -normalized negative-discriminant leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_normalized_posCombo - (hbelow : ∀ b c p r : ℝ, 1 ≤ b → b ≤ c → p ≤ 0 → 1 ≤ r → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C (1 : ℝ)) * (X - C b) * (X - C c) - + C s * ((X - C p) * (X - C (0 : ℝ)) * (X - C r))) < 0) - (habove : ∀ a c p q : ℝ, a ≤ 0 → 1 ≤ c → p ≤ q → q ≤ 0 → - ∃ s : ℝ, 0 < s ∧ - cubicDiscr ((X - C a) * (X - C (1 : ℝ)) * (X - C c) - + C s * ((X - C p) * (X - C q) * (X - C (0 : ℝ)))) < 0) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) - (hdeg : g.natDegree = f.natDegree) - (hfdeg : f.natDegree = 3) : - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := by - have hf : f.Splits := (hpc.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg : g.Splits := (hpc.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - have hgdeg : g.natDegree = 3 := by simp_all - exact sameDegree_cubic_rootCount_le_one_of_normalized - hbelow habove hfdeg hgdeg hf hg hf_pos hg_pos hpc - -/-- Same-degree positive-combination cubic root-count wrapper from the -negative-discriminant monic-pencil leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_discr_monicPencil_neg_posCombo - (hbelow : CubicDiscrMonicPencilNegTwoBelowStatement) - (habove : CubicDiscrMonicPencilNegTwoAboveStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) - (hdeg : f.natDegree = 3 ∧ g.natDegree = 3) (x : ℝ) : - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := by - have hsame : g.natDegree = f.natDegree := by simp_all - have hf : f.Splits := (hpc.isRealRooted_left_of_sameDegree hf_pos hg_pos hsame).2 - have hg : g.Splits := (hpc.isRealRooted_right_of_sameDegree hf_pos hg_pos hsame).2 - exact - sameDegree_cubic_rootCount_le_one_of_discr_monicPencil_neg - hbelow habove hdeg.1 hdeg.2 hf hg hf_pos hg_pos hpc x - -/-- End-to-end reduction of the cubic root-count bound to the non-splitting -monic-pencil leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_notSplits - (hbelow : CubicMonicPencilNotSplitsTwoBelowStatement) - (habove : CubicMonicPencilNotSplitsTwoAboveStatement) - {f g : ℝ[X]} - (hfdeg : f.natDegree = 3) (hgdeg : g.natDegree = 3) - (hf : f.Splits) (hg : g.Splits) - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) : - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := - sameDegree_cubic_rootCount_le_one_of_interior - (cubicInteriorTwoBelow_of_notSplits hbelow) - (cubicInteriorTwoAbove_of_notSplits habove) - hfdeg hgdeg hf hg hf_pos hg_pos hpc - -/-- Same-degree positive-combination cubic root-count wrapper from the -non-splitting monic-pencil leaves. -/ -theorem sameDegree_cubic_rootCount_le_one_of_notSplits_posCombo - (hbelow : CubicMonicPencilNotSplitsTwoBelowStatement) - (habove : CubicMonicPencilNotSplitsTwoAboveStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hpc : PosComboRealRooted f g) - (hdeg : g.natDegree = f.natDegree) - (hfdeg : f.natDegree = 3) : - ∀ x : ℝ, - ((f.roots.filter (· ≤ x)).card : ℤ) - - (g.roots.filter (· ≤ x)).card ≤ 1 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - - (f.roots.filter (· ≤ x)).card ≤ 1 := by - have hf : f.Splits := (hpc.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg : g.Splits := (hpc.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - have hgdeg : g.natDegree = 3 := by simp_all - exact sameDegree_cubic_rootCount_le_one_of_notSplits - hbelow habove hfdeg hgdeg hf hg hf_pos hg_pos hpc - end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean b/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean index e2c7c95a2..430867f5c 100644 --- a/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean @@ -26,31 +26,12 @@ macro_rules `(tactic| exact RealRooted.PosComboNoCommonSuccDegreePairHasCommonInterleaverNonneg) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_leTwo_noGapTwo using - le_two := $hle2:term, - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_leTwo_of_noGapTwo - $hle2 $hgap) | `(tactic| rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible using root_count := $hcount:term) => `(tactic| exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible $hcount) - | `(tactic| - rr_compatibleSuccDegree_closedSegmentCountEq_of_nonRoot using - root_count := $hcount:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeClosedSegmentCountEq_of_nonRoot - $hcount) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_leTwo_of_nonRoot using - root_count := $hcount:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveLeTwo_of_nonRoot - $hcount) | `(tactic| rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo using no_gap_two := $hgap:term) => @@ -70,93 +51,24 @@ macro_rules exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq $hcount) - | `(tactic| rr_compatibleSuccDegree_closedSegmentCountEq_iff_nonRoot) => - `(tactic| - exact RealRooted.compatibleSuccDegreeClosedSegmentCountEq_iff_nonRoot) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_rightFamily using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_rightFamily - $hgap) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSign using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSign - $hgap) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower using - no_gap := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_endpointSignLower - $hgap) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq using - count_eq := $hcount:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_lowerCountEq - $hcount) | `(tactic| rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq using count_eq := $hcount:term) => `(tactic| exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq $hcount) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_closedSegment using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentNoGapTwo - $hgap) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_rightFamily using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_rightFamilyNoGapTwo - $hgap) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSign using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignNoGapTwo - $hgap) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower using - no_gap := $hgap:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_endpointSignLower - $hgap) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq using - count_eq := $hcount:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_lowerCountEq - $hcount) | `(tactic| rr_succDegree_pair_common_interleaver_rootCrossing using root_crossing := $hcross:term) => `(tactic| exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing $hcross) - | `(tactic| - rr_succDegree_pair_common_interleaver_rootCount using - root_count := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCount - $hcount) | `(tactic| rr_succDegree_pair_common_interleaver_rootCountAbove using root_count_above := $hcount:term) => `(tactic| exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove $hcount) - | `(tactic| - rr_succDegree_pair_common_interleaver_rootCountNonRoot using - root_count := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCountNonRoot - $hcount) | `(tactic| rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot using root_count_above := $hcount:term) => @@ -169,117 +81,6 @@ macro_rules `(tactic| exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentCountEq $hcount) - | `(tactic| - rr_succDegree_pair_common_interleaver_closedSegmentNoGapTwo using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentNoGapTwo - $hgap) - | `(tactic| - rr_succDegree_pair_common_interleaver_rightFamilyNoGapTwo using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rightFamilyNoGapTwo - $hgap) - | `(tactic| - rr_succDegree_pair_common_interleaver_endpointSignNoGapTwo using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_endpointSignNoGapTwo - $hgap) - | `(tactic| - rr_succDegree_pair_common_interleaver_endpointSignLowerNoGap using - no_gap := $hgap:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_endpointSignLower - $hgap) - | `(tactic| - rr_succDegree_pair_common_interleaver_endpointSignLowerCountEq using - count_eq := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_lowerCountEq - $hcount) - | `(tactic| - rr_succDegree_rootCountLeadRightZero_divXStrictInterl_of_strict_interl using - orientation := $horient:term) => - `(tactic| - exact - posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG - $horient) - | `(tactic| - rr_succDegree_rootCountLeadRightZero_of_divXStrictInterl using - divX_strictInterl := $hdivX:term) => - `(tactic| - exact - RealRooted.posComboNoCommonSuccDegreeRootCountLeadRightZero_of_divX_strictInterl - $hdivX) - | `(tactic| - rr_succDegree_rootCountLead_of_bothNonzero_and_rightZero using - both_nonzero := $hboth:term, - right_zero := $hright:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_rightZero - $hboth $hright) - | `(tactic| - rr_succDegree_rootCountLead_of_bothNonzero_and_divXStrictInterl using - both_nonzero := $hboth:term, - divX_strictInterl := $hdivX:term) => - `(tactic| - exact - RealRooted.posComboNoCommonSuccDegreeRootCountLead_of_bothNonzero_and_divX_strictInterl - $hboth $hdivX) - | `(tactic| - rr_succDegree_rootCountResidual_of_strict_interl using - orientation := $horient:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountResidual_of_strictInterl - $horient) - | `(tactic| - rr_succDegree_rootCount_of_residual_and_lead using - lead := $hlead:term, - residual := $hres:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCount_of_residual_and_lead - $hlead $hres) - | `(tactic| - rr_succDegree_rootCountAbove_of_residual_and_lead using - lead := $hlead:term, - residual := $hres:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAbove_of_residual_and_lead - $hlead $hres) - | `(tactic| - rr_succDegree_rootCrossing_of_residual_and_lead using - lead := $hlead:term, - residual := $hres:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_residual_and_lead - $hlead $hres) - | `(tactic| - rr_succDegree_pair_common_interleaver_residual_and_lead using - lead := $hlead:term, - residual := $hres:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_residual_and_lead - $hlead $hres) - | `(tactic| - rr_succDegree_pair_common_interleaver_residual_bothNonzero_divXStrictInterl using - both_nonzero := $hboth:term, - divX_strictInterl := $hdivX:term, - residual := $hres:term) => - `(tactic| - exact - succDegreePairHasCommonInterleaver_nonneg_of_residual_bothNonzero_divX_strictInterl - $hboth $hdivX $hres) - | `(tactic| - rr_succDegree_pair_common_interleaver_residualStrictInterl_bothNonzero_divXStrictInterl using - residual_strictInterl := $hres:term, - both_nonzero := $hboth:term, - divX_strictInterl := $hdivX:term) => - `(tactic| - exact ( - succDegreePairHasCommonInterleaver_nonneg_of_residualStrictInterl_bothNonzero_divX_strictInterl - $hres $hboth $hdivX)) | `(tactic| rr_compatible_pair_common_interleaver_degree_split_nonnegShift using same_degree := $hsame:term, @@ -294,27 +95,6 @@ macro_rules `(tactic| exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCrossing $hsame $hsucc) - | `(tactic| - rr_compatible_pair_common_interleaver_rootCount using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCount - $hsame $hsucc) - | `(tactic| - rr_compatible_pair_common_interleaver_rootCountAbove using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCountAboveBoth - $hsame $hsucc) - | `(tactic| - rr_compatible_pair_common_interleaver_rootCountNonRoot using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCountNonRoot - $hsame $hsucc) | `(tactic| rr_compatible_pair_common_interleaver_rootCountAboveNonRoot using same_degree := $hsame:term, @@ -347,24 +127,3 @@ macro_rules end Tactic end RealRooted -/- Parser compatibility for the pre-#984 Prec/Prec0 tactic surface. - Canonical syntax is preferred; these declarations retain old scripts - and dispatch through the deprecated theorem aliases above. -/ -namespace RealRooted -namespace Tactic -macro_rules - | `(tactic| - rr_succDegree_rootCountLeadRightZero_divXPrec_of_prec using - orientation := $horient:term) => - `(tactic| - exact - posComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterl_of_strictInterlFG - $horient) - | `(tactic| - rr_succDegree_rootCountResidual_of_prec using - orientation := $horient:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountResidual_of_strictInterl - $horient) -end Tactic -end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean b/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean index 3b3c6c56e..b6f637c96 100644 --- a/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean @@ -22,27 +22,11 @@ syntax (name := rr_succDegree_pair_common_interleaver_local_lower_named) "rr_succDegree_pair_common_interleaver_local_lower" : tactic -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_leTwo_noGapTwo_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_leTwo_noGapTwo" " using " - "le_two" ":=" term "," - "no_gap_two" ":=" term : - tactic - syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible_named) "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible" " using " "root_count" ":=" term : tactic -syntax (name := rr_compatibleSuccDegree_closedSegmentCountEq_of_nonRoot_named) - "rr_compatibleSuccDegree_closedSegmentCountEq_of_nonRoot" " using " - "root_count" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_leTwo_of_nonRoot_named) - "rr_compatibleSuccDegree_rootCountAbove_leTwo_of_nonRoot" " using " - "root_count" ":=" term : - tactic - syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo_named) "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo" " using " "no_gap_two" ":=" term : @@ -58,80 +42,21 @@ syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq_named) "count_eq" ":=" term : tactic -syntax (name := rr_compatibleSuccDegree_closedSegmentCountEq_iff_nonRoot_named) - "rr_compatibleSuccDegree_closedSegmentCountEq_iff_nonRoot" : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_rightFamily_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_rightFamily" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSign_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSign" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower" " using " - "no_gap" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq" " using " - "count_eq" ":=" term : - tactic - syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq_named) "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq" " using " "count_eq" ":=" term : tactic -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_closedSegment_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_closedSegment" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_rightFamily_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_rightFamily" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSign_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSign" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower" " using " - "no_gap" ":=" term : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq" " using " - "count_eq" ":=" term : - tactic - syntax (name := rr_succDegree_pair_common_interleaver_rootCrossing_named) "rr_succDegree_pair_common_interleaver_rootCrossing" " using " "root_crossing" ":=" term : tactic -syntax (name := rr_succDegree_pair_common_interleaver_rootCount_named) - "rr_succDegree_pair_common_interleaver_rootCount" " using " - "root_count" ":=" term : - tactic - syntax (name := rr_succDegree_pair_common_interleaver_rootCountAbove_named) "rr_succDegree_pair_common_interleaver_rootCountAbove" " using " "root_count_above" ":=" term : tactic -syntax (name := rr_succDegree_pair_common_interleaver_rootCountNonRoot_named) - "rr_succDegree_pair_common_interleaver_rootCountNonRoot" " using " - "root_count" ":=" term : - tactic - syntax (name := rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot_named) "rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot" " using " "root_count_above" ":=" term : @@ -142,90 +67,6 @@ syntax (name := rr_succDegree_pair_common_interleaver_closedSegmentCountEq_named "count_eq" ":=" term : tactic -syntax (name := rr_succDegree_pair_common_interleaver_closedSegmentNoGapTwo_named) - "rr_succDegree_pair_common_interleaver_closedSegmentNoGapTwo" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_rightFamilyNoGapTwo_named) - "rr_succDegree_pair_common_interleaver_rightFamilyNoGapTwo" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_endpointSignNoGapTwo_named) - "rr_succDegree_pair_common_interleaver_endpointSignNoGapTwo" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_endpointSignLowerNoGap_named) - "rr_succDegree_pair_common_interleaver_endpointSignLowerNoGap" " using " - "no_gap" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_endpointSignLowerCountEq_named) - "rr_succDegree_pair_common_interleaver_endpointSignLowerCountEq" " using " - "count_eq" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountLeadRightZero_divXStrictInterl_of_strict_interl_named) - "rr_succDegree_rootCountLeadRightZero_divXStrictInterl_of_strict_interl" " using " - "orientation" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountLeadRightZero_of_divXStrictInterl_named) - "rr_succDegree_rootCountLeadRightZero_of_divXStrictInterl" " using " - "divX_strictInterl" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountLead_of_bothNonzero_and_rightZero_named) - "rr_succDegree_rootCountLead_of_bothNonzero_and_rightZero" " using " - "both_nonzero" ":=" term "," - "right_zero" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountLead_of_bothNonzero_and_divXStrictInterl_named) - "rr_succDegree_rootCountLead_of_bothNonzero_and_divXStrictInterl" " using " - "both_nonzero" ":=" term "," - "divX_strictInterl" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountResidual_of_strict_interl_named) - "rr_succDegree_rootCountResidual_of_strict_interl" " using " - "orientation" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCount_of_residual_and_lead_named) - "rr_succDegree_rootCount_of_residual_and_lead" " using " - "lead" ":=" term "," - "residual" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountAbove_of_residual_and_lead_named) - "rr_succDegree_rootCountAbove_of_residual_and_lead" " using " - "lead" ":=" term "," - "residual" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCrossing_of_residual_and_lead_named) - "rr_succDegree_rootCrossing_of_residual_and_lead" " using " - "lead" ":=" term "," - "residual" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_residual_and_lead_named) - "rr_succDegree_pair_common_interleaver_residual_and_lead" " using " - "lead" ":=" term "," - "residual" ":=" term : - tactic - -syntax - (name := rr_succDegree_pair_common_interleaver_residual_bothNonzero_divXStrictInterl_named) - "rr_succDegree_pair_common_interleaver_residual_bothNonzero_divXStrictInterl" " using " - "both_nonzero" ":=" term "," - "divX_strictInterl" ":=" term "," - "residual" ":=" term : - tactic - syntax (name := rr_succDegree_pair_common_interleaver_residualStrictInterl_bothNonzero_divXStrictInterl_named) @@ -248,24 +89,6 @@ syntax (name := rr_compatible_pair_common_interleaver_rootCrossing_named) "succ_degree" ":=" term : tactic -syntax (name := rr_compatible_pair_common_interleaver_rootCount_named) - "rr_compatible_pair_common_interleaver_rootCount" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_compatible_pair_common_interleaver_rootCountAbove_named) - "rr_compatible_pair_common_interleaver_rootCountAbove" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_compatible_pair_common_interleaver_rootCountNonRoot_named) - "rr_compatible_pair_common_interleaver_rootCountNonRoot" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - syntax (name := rr_compatible_pair_common_interleaver_rootCountAboveNonRoot_named) "rr_compatible_pair_common_interleaver_rootCountAboveNonRoot" " using " "same_degree" ":=" term "," @@ -298,20 +121,3 @@ syntax (name := rr_chudnovskySeymour_compatible_pair_common_left_interleaver_nam end Tactic end RealRooted -/- Parser compatibility for the pre-#984 Prec/Prec0 tactic surface. - Canonical syntax is preferred; these declarations retain old scripts - and dispatch through the deprecated theorem aliases above. -/ -namespace RealRooted -namespace Tactic -syntax (name := rr_succDegree_rootCountLeadRightZero_divXPrec_of_prec_named_legacy) - "rr_succDegree_rootCountLeadRightZero_divXPrec_of_prec" " using " - "orientation" ":=" term : - tactic - -syntax (name := rr_succDegree_rootCountResidual_of_prec_named_legacy) - "rr_succDegree_rootCountResidual_of_prec" " using " - "orientation" ":=" term : - tactic - -end Tactic -end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/BasicRules.lean b/RealRooted/Tactic/CommonInterleaver/BasicRules.lean index 5acf3931e..13a5fc5ef 100644 --- a/RealRooted/Tactic/CommonInterleaver/BasicRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/BasicRules.lean @@ -252,10 +252,6 @@ macro_rules exact RealRooted.hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver $hrr $hpos $hpair) - | `(tactic| rr_common_interleaver_family_upgrade) => - `(tactic| exact RealRooted.commonInterleaverFamilyUpgrade) - | `(tactic| rr_common_left_interleaver_family_upgrade) => - `(tactic| exact RealRooted.commonLeftInterleaverFamilyUpgrade) | `(tactic| rr_common_interleaver_sum_realrooted using common_right := $hcommon:term, diff --git a/RealRooted/Tactic/CommonInterleaver/BasicSyntax.lean b/RealRooted/Tactic/CommonInterleaver/BasicSyntax.lean index db3f51aeb..cc25bc146 100644 --- a/RealRooted/Tactic/CommonInterleaver/BasicSyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/BasicSyntax.lean @@ -260,14 +260,6 @@ syntax (name := rr_common_left_interleaver_of_pairwise_named) "pairwise_common_left" ":=" term : tactic -syntax (name := rr_common_interleaver_family_upgrade_named) - "rr_common_interleaver_family_upgrade" : - tactic - -syntax (name := rr_common_left_interleaver_family_upgrade_named) - "rr_common_left_interleaver_family_upgrade" : - tactic - syntax (name := rr_common_interleaver_sum_realrooted_named) "rr_common_interleaver_sum_realrooted" " using " "common_right" ":=" term "," diff --git a/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean b/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean index 65959ee92..f9aa040d5 100644 --- a/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean @@ -13,282 +13,7 @@ open Polynomial namespace RealRooted namespace Tactic -private theorem pairwiseCommonInterleaver_boundaryRight_nonnegShift - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_via_nonnegShift - (fs := fs) hrr hpos hboundary - -private theorem pairwiseCommonInterleaver_boundaryRight_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - (fs := fs) hrr hpos hnn - (posComboNoCommonAffineFamily_of_boundaryRightPairOrientation hboundary) - -private theorem pairwiseCommonInterleaver_posComboBridge - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hbridge : PosComboPairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_posComboBridge - (fs := fs) hrr hpos hbridge - -private theorem pairwiseCommonInterleaver_noCommonOrientation_degreeClose - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (horient : PosComboNoCommonOrientationStatement) - (hdegClose : PosComboNatDegreeCloseStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_noCommonOrientation_and_degreeClose - (fs := fs) hrr hpos horient hdegClose - -private theorem pairwiseFamilyCompatible_posComboBridge - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hbridge : PosComboPairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCommonInterleaver_posComboBridge - (fs := fs) hrr hpos hbridge).1 - -private theorem pairwiseFamilyCompatible_noCommonOrientation_degreeClose - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (horient : PosComboNoCommonOrientationStatement) - (hdegClose : PosComboNatDegreeCloseStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCommonInterleaver_noCommonOrientation_degreeClose - (fs := fs) hrr hpos horient hdegClose).1 - macro_rules - | `(tactic| - rr_pairwise_common_interleaver_degree_split_nonnegShift using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairDegreeSplit_via_nonnegShift - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_pairwise_common_interleaver_rootCrossing using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCrossing - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_pairwise_common_interleaver_rootCount using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCount - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_pairwise_common_interleaver_rootCountAbove using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountAboveBoth - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_pairwise_common_interleaver_rootCountNonRoot using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountNonRoot - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_pairwise_common_interleaver_rootCountAboveNonRoot using - same_degree := $hsame:term, - succ_degree := $hsucc:term, - member_pos_lc := $hpos:term, - pairwise_compatible := $hpair:term) => - `(tactic| - exact pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_rootCountAboveBothNonRoot - $hsame $hsucc $hpos $hpair) - | `(tactic| - rr_chudnovskySeymour_fourWay_rootCrossing using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_rootCrossing - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_chudnovskySeymour_fourWay_rootCount using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCount $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCount $hsucc)) - | `(tactic| - rr_chudnovskySeymour_fourWay_rootCountAbove using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove $hsucc)) - | `(tactic| - rr_chudnovskySeymour_fourWay_rootCountNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountNonRoot - $hsucc)) - | `(tactic| - rr_chudnovskySeymour_fourWay_rootCountAboveNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot - $hsucc)) - | `(tactic| - rr_chudnovskySeymour_fourWay_degreeSplit_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_pairDegreeSplit_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_chudnovskySeymour_fourWay_slotData_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_slotData_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_chudnovskySeymour_fourWay_affineFamily_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact - chudnovskySeymour_fourWay_of_sameDegreeAlternative_and_affineFamily_via_nonnegShift - $hrr $hpos $hsame $haff) - | `(tactic| - rr_chudnovskySeymour_fourWay_boundaryRight_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - boundary_right := $hboundary:term) => - `(tactic| - exact - chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_via_nonnegShift - $hrr $hpos $hboundary) - | `(tactic| - rr_chudnovskySeymour_fourWay_sameDegreePair_affineFamily_nonneg using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_sameDegreePair_and_affineFamily_nonneg - $hrr $hpos $hnn $hsame $haff) - | `(tactic| - rr_chudnovskySeymour_fourWay_allCombo_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - all_combo := $hall:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_allComboBridge_and_nonnegCoeffs - $hrr $hpos $hnn $hall) - | `(tactic| - rr_chudnovskySeymour_fourWay_affineFamily_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - affine_family := $haff:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_affineFamilyBridge_and_nonnegCoeffs - $hrr $hpos $hnn $haff) - | `(tactic| - rr_chudnovskySeymour_fourWay_boundaryRight_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - boundary_right := $hboundary:term) => - `(tactic| - exact - chudnovskySeymour_fourWay_of_boundaryRightPairOrientation_and_nonnegCoeffs - $hrr $hpos $hnn $hboundary) - | `(tactic| - rr_chudnovskySeymour_fourWay_posComboBridge using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - pos_combo_bridge := $hbridge:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_posComboBridge - $hrr $hpos $hbridge) - | `(tactic| - rr_chudnovskySeymour_fourWay_noCommonOrientation_degreeClose using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - orientation := $horient:term, - degree_close := $hdegClose:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_noCommonOrientation_and_degreeClose - $hrr $hpos $horient $hdegClose) - | `(tactic| - rr_chudnovskySeymour_fourWay_noCommonOrientation_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - orientation := $horient:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_noCommonOrientation_and_nonnegCoeffs - $hrr $hpos $hnn $horient) | `(tactic| rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs using member_realrooted := $hrr:term, @@ -299,16 +24,6 @@ macro_rules `(tactic| exact chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs $hrr $hpos $hnn $hsame $hsucc) - | `(tactic| - rr_chudnovskySeymour_fourWay_degreeSplit_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_degreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) | `(tactic| rr_chudnovskySeymour_fourWay_degree_le_one using member_pos_lc := $hpos:term, @@ -324,191 +39,6 @@ macro_rules `(tactic| exact chudnovskySeymour_fourWay_of_natDegree_le_two $hrr $hpos $hdeg) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_rootCrossing using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_rootCount using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCount $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCount $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_rootCountAbove using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_rootCountNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountNonRoot - $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_rootCountAboveNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot - $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_slotData_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_of_slotData_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact pairwiseCompatible_iff_hasCommonInterleaver_via_nonnegShift - $hrr $hpos $hsame $haff) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - boundary_right := $hboundary:term) => - `(tactic| - exact pairwiseCommonInterleaver_boundaryRight_nonnegShift - $hrr $hpos $hboundary) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_sameDegreePair_affineFamily_nonneg - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_sameDegreePair_and_affineFamily_nonneg - $hrr $hpos $hnn $hsame $haff) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_allCombo_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - all_combo := $hall:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_allComboBridge_and_nonnegCoeffs - $hrr $hpos $hnn $hall) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - affine_family := $haff:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_affineFamilyBridge_and_nonnegCoeffs - $hrr $hpos $hnn $haff) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - boundary_right := $hboundary:term) => - `(tactic| - exact pairwiseCommonInterleaver_boundaryRight_nonnegCoeffs - $hrr $hpos $hnn $hboundary) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_posComboBridge using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - pos_combo_bridge := $hbridge:term) => - `(tactic| - exact pairwiseCommonInterleaver_posComboBridge - $hrr $hpos $hbridge) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_degreeClose - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - orientation := $horient:term, - degree_close := $hdegClose:term) => - `(tactic| - exact pairwiseCommonInterleaver_noCommonOrientation_degreeClose - $hrr $hpos $horient $hdegClose) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_nonnegCoeffs - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - orientation := $horient:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_noCommonOrientation_and_nonnegCoeffs - $hrr $hpos $hnn $horient) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_pairDegreeSplit_nonnegCoeffs - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact - pairwiseCompatible_iff_hasCommonInterleaver_of_degreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) | `(tactic| rr_chudnovskySeymour_pairwiseCompatible_iff_familyCompatible using member_realrooted := $hrr:term, @@ -532,193 +62,6 @@ macro_rules exact RealRooted.chudnovskySeymour_pairwiseCompatible_iff_commonInterleaver $hrr $hpos) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_rootCrossing using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_rootCrossing - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_rootCount using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCount $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCount $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_rootCountAbove using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_rootCountNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountNonRoot - $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_rootCountAboveNonRoot using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_rootCrossing - $hrr $hpos - (RealRooted.posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot - $hsame) - (RealRooted.posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot - $hsucc)) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_pairDegreeSplit_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_slotData_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_of_slotData_via_nonnegShift - $hrr $hpos $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact pairwiseCompatible_iff_familyCompatible_via_nonnegShift - $hrr $hpos $hsame $haff) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegShift using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - boundary_right := $hboundary:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_boundaryRightPairOrientation_via_nonnegShift - $hrr $hpos $hboundary) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_sameDegreePair_affineFamily_nonneg - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - affine_family := $haff:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_sameDegreePair_and_affineFamily_nonneg - $hrr $hpos $hnn $hsame $haff) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_allCombo_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - all_combo := $hall:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_allComboBridge_and_nonnegCoeffs - $hrr $hpos $hnn $hall) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - affine_family := $haff:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_affineFamilyBridge_and_nonnegCoeffs - $hrr $hpos $hnn $haff) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - boundary_right := $hboundary:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_boundaryRightPairOrientation_and_nonnegCoeffs - $hrr $hpos $hnn $hboundary) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_posComboBridge using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - pos_combo_bridge := $hbridge:term) => - `(tactic| - exact pairwiseFamilyCompatible_posComboBridge - $hrr $hpos $hbridge) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_degreeClose - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - orientation := $horient:term, - degree_close := $hdegClose:term) => - `(tactic| - exact pairwiseFamilyCompatible_noCommonOrientation_degreeClose - $hrr $hpos $horient $hdegClose) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_nonnegCoeffs - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - orientation := $horient:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_noCommonOrientation_and_nonnegCoeffs - $hrr $hpos $hnn $horient) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_pairDegreeSplit_nonnegCoeffs - using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_pairDegreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) - | `(tactic| - rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact - pairwiseCompatible_iff_familyCompatible_of_degreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) end Tactic end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean b/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean index 358951811..0bdd10adc 100644 --- a/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean @@ -10,181 +10,6 @@ pairwise-to-family compatibility upgrades. namespace RealRooted namespace Tactic -syntax (name := rr_pairwise_common_interleaver_degree_split_nonnegShift_named) - "rr_pairwise_common_interleaver_degree_split_nonnegShift" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_pairwise_common_interleaver_rootCrossing_named) - "rr_pairwise_common_interleaver_rootCrossing" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_pairwise_common_interleaver_rootCount_named) - "rr_pairwise_common_interleaver_rootCount" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_pairwise_common_interleaver_rootCountAbove_named) - "rr_pairwise_common_interleaver_rootCountAbove" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_pairwise_common_interleaver_rootCountNonRoot_named) - "rr_pairwise_common_interleaver_rootCountNonRoot" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_pairwise_common_interleaver_rootCountAboveNonRoot_named) - "rr_pairwise_common_interleaver_rootCountAboveNonRoot" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term "," - "member_pos_lc" ":=" term "," - "pairwise_compatible" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_rootCrossing_named) - "rr_chudnovskySeymour_fourWay_rootCrossing" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_rootCount_named) - "rr_chudnovskySeymour_fourWay_rootCount" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_rootCountAbove_named) - "rr_chudnovskySeymour_fourWay_rootCountAbove" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_rootCountNonRoot_named) - "rr_chudnovskySeymour_fourWay_rootCountNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_rootCountAboveNonRoot_named) - "rr_chudnovskySeymour_fourWay_rootCountAboveNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_degreeSplit_nonnegShift_named) - "rr_chudnovskySeymour_fourWay_degreeSplit_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_slotData_nonnegShift_named) - "rr_chudnovskySeymour_fourWay_slotData_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_affineFamily_nonnegShift_named) - "rr_chudnovskySeymour_fourWay_affineFamily_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_boundaryRight_nonnegShift_named) - "rr_chudnovskySeymour_fourWay_boundaryRight_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_sameDegreePair_affineFamily_nonneg_named) - "rr_chudnovskySeymour_fourWay_sameDegreePair_affineFamily_nonneg" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_allCombo_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_allCombo_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "all_combo" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_affineFamily_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_affineFamily_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_boundaryRight_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_boundaryRight_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_posComboBridge_named) - "rr_chudnovskySeymour_fourWay_posComboBridge" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "pos_combo_bridge" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_noCommonOrientation_degreeClose_named) - "rr_chudnovskySeymour_fourWay_noCommonOrientation_degreeClose" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "orientation" ":=" term "," - "degree_close" ":=" term : - tactic - -syntax (name := rr_chudnovskySeymour_fourWay_noCommonOrientation_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_noCommonOrientation_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "orientation" ":=" term : - tactic - syntax (name := rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs_named) "rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs" " using " "member_realrooted" ":=" term "," @@ -194,15 +19,6 @@ syntax (name := rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs_named) "succ_degree" ":=" term : tactic -syntax (name := rr_chudnovskySeymour_fourWay_degreeSplit_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_degreeSplit_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - syntax (name := rr_chudnovskySeymour_fourWay_degree_le_one_named) "rr_chudnovskySeymour_fourWay_degree_le_one" " using " "member_pos_lc" ":=" term "," @@ -216,160 +32,6 @@ syntax (name := rr_chudnovskySeymour_fourWay_degree_le_two_named) "member_degree_le_two" ":=" term : tactic -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_rootCrossing_named) - "rr_pairwiseCompatible_iff_commonInterleaver_rootCrossing" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_rootCount_named) - "rr_pairwiseCompatible_iff_commonInterleaver_rootCount" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_rootCountAbove_named) - "rr_pairwiseCompatible_iff_commonInterleaver_rootCountAbove" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_rootCountNonRoot_named) - "rr_pairwiseCompatible_iff_commonInterleaver_rootCountNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_commonInterleaver_rootCountAboveNonRoot_named) - "rr_pairwiseCompatible_iff_commonInterleaver_rootCountAboveNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegShift_named) - "rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_slotData_nonnegShift_named) - "rr_pairwiseCompatible_iff_commonInterleaver_slotData_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegShift_named) - "rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegShift_named) - "rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_commonInterleaver_sameDegreePair_affineFamily_nonneg_named) - "rr_pairwiseCompatible_iff_commonInterleaver_sameDegreePair_affineFamily_nonneg" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_allCombo_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_allCombo_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "all_combo" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_posComboBridge_named) - "rr_pairwiseCompatible_iff_commonInterleaver_posComboBridge" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "pos_combo_bridge" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_degreeClose_named) - "rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_degreeClose" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "orientation" ":=" term "," - "degree_close" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_nonnegCoeffs" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "orientation" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_commonInterleaver_pairDegreeSplit_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_pairDegreeSplit_nonnegCoeffs" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - syntax (name := rr_chudnovskySeymour_pairwiseCompatible_iff_commonLeftInterleaver_named) "rr_chudnovskySeymour_pairwiseCompatible_iff_commonLeftInterleaver" " using " "member_realrooted" ":=" term "," @@ -388,159 +50,5 @@ syntax (name := rr_chudnovskySeymour_pairwiseCompatible_iff_familyCompatible_nam "member_pos_lc" ":=" term : tactic -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_rootCrossing_named) - "rr_pairwiseCompatible_iff_familyCompatible_rootCrossing" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_rootCount_named) - "rr_pairwiseCompatible_iff_familyCompatible_rootCount" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_rootCountAbove_named) - "rr_pairwiseCompatible_iff_familyCompatible_rootCountAbove" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_rootCountNonRoot_named) - "rr_pairwiseCompatible_iff_familyCompatible_rootCountNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_familyCompatible_rootCountAboveNonRoot_named) - "rr_pairwiseCompatible_iff_familyCompatible_rootCountAboveNonRoot" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegShift_named) - "rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_slotData_nonnegShift_named) - "rr_pairwiseCompatible_iff_familyCompatible_slotData_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegShift_named) - "rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegShift_named) - "rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegShift" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_familyCompatible_sameDegreePair_affineFamily_nonneg_named) - "rr_pairwiseCompatible_iff_familyCompatible_sameDegreePair_affineFamily_nonneg" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_allCombo_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_allCombo_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "all_combo" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "affine_family" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "boundary_right" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_posComboBridge_named) - "rr_pairwiseCompatible_iff_familyCompatible_posComboBridge" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "pos_combo_bridge" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_degreeClose_named) - "rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_degreeClose" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "orientation" ":=" term "," - "degree_close" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_nonnegCoeffs" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "orientation" ":=" term : - tactic - -syntax - (name := rr_pairwiseCompatible_iff_familyCompatible_pairDegreeSplit_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_pairDegreeSplit_nonnegCoeffs" - " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegCoeffs_named) - "rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - end Tactic end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/LowDegreeRules.lean b/RealRooted/Tactic/CommonInterleaver/LowDegreeRules.lean index 1dfcf5b5b..4fe99a93c 100644 --- a/RealRooted/Tactic/CommonInterleaver/LowDegreeRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/LowDegreeRules.lean @@ -189,39 +189,6 @@ macro_rules `(tactic| exact pairwiseCompatible_iff_familyCompatible_of_natDegree_le_two $hrr $hpos $hdeg) - | `(tactic| - rr_sameDegree_pair_common_interleaver_cubicInterior using - below_certificate := $hbelow:term, - above_certificate := $habove:term, - left_pos_lc := $hfpos:term, - right_pos_lc := $hgpos:term, - left_nonneg_coeffs := $hfnn:term, - right_nonneg_coeffs := $hgnn:term, - pos_combo := $hfg:term, - same_degree := $hdeg:term, - no_common_roots := $hno:term, - left_degree_le_three := $hfdeg:term) => - `(tactic| - exact sameDegreePairHasCommonInterleaver_nonneg_of_natDegree_le_three_of_cubicInterior - $hbelow $habove $hfpos $hgpos $hfnn $hgnn $hfg $hdeg $hno $hfdeg) - | `(tactic| - rr_noCommon_pair_common_interleaver_degree_le_three using - below_certificate := $hbelow:term, - above_certificate := $habove:term, - succ_degree_endpoint := $hsucc:term, - left_pos_lc := $hfpos:term, - right_pos_lc := $hgpos:term, - left_nonneg_coeffs := $hfnn:term, - right_nonneg_coeffs := $hgnn:term, - pos_combo := $hfg:term, - left_degree_le_right := $hdeg_lo:term, - right_degree_le_succ_left := $hdeg_hi:term, - no_common_roots := $hno:term, - right_degree_le_three := $hgdeg:term) => - `(tactic| - exact posComboNoCommonPairHasCommonInterleaver_of_natDegree_le_three_and_succDegree - $hbelow $habove $hsucc $hfpos $hgpos $hfnn $hgnn $hfg - $hdeg_lo $hdeg_hi $hno $hgdeg) end Tactic end RealRooted diff --git a/RealRooted/Tactic/CommonInterleaver/LowDegreeSyntax.lean b/RealRooted/Tactic/CommonInterleaver/LowDegreeSyntax.lean index fdf0f2b05..87d463d1e 100644 --- a/RealRooted/Tactic/CommonInterleaver/LowDegreeSyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/LowDegreeSyntax.lean @@ -162,35 +162,5 @@ syntax (name := rr_pairwiseCompatible_iff_familyCompatible_degree_le_two_named) "member_degree_le_two" ":=" term : tactic -syntax (name := rr_sameDegree_pair_common_interleaver_cubicInterior_named) - "rr_sameDegree_pair_common_interleaver_cubicInterior" " using " - "below_certificate" ":=" term "," - "above_certificate" ":=" term "," - "left_pos_lc" ":=" term "," - "right_pos_lc" ":=" term "," - "left_nonneg_coeffs" ":=" term "," - "right_nonneg_coeffs" ":=" term "," - "pos_combo" ":=" term "," - "same_degree" ":=" term "," - "no_common_roots" ":=" term "," - "left_degree_le_three" ":=" term : - tactic - -syntax (name := rr_noCommon_pair_common_interleaver_degree_le_three_named) - "rr_noCommon_pair_common_interleaver_degree_le_three" " using " - "below_certificate" ":=" term "," - "above_certificate" ":=" term "," - "succ_degree_endpoint" ":=" term "," - "left_pos_lc" ":=" term "," - "right_pos_lc" ":=" term "," - "left_nonneg_coeffs" ":=" term "," - "right_nonneg_coeffs" ":=" term "," - "pos_combo" ":=" term "," - "left_degree_le_right" ":=" term "," - "right_degree_le_succ_left" ":=" term "," - "no_common_roots" ":=" term "," - "right_degree_le_three" ":=" term : - tactic - end Tactic end RealRooted diff --git a/RealRooted/Tactic/Examples/CommonInterleaver.lean b/RealRooted/Tactic/Examples/CommonInterleaver.lean index 2fb7ebfe3..327bea869 100644 --- a/RealRooted/Tactic/Examples/CommonInterleaver.lean +++ b/RealRooted/Tactic/Examples/CommonInterleaver.lean @@ -316,14 +316,6 @@ example {fs : List ℝ[X]} member_pos_lc := hpos, pairwise_common_left := hpair -example : - CommonInterleaverFamilyUpgradeStatement := by - rr_common_interleaver_family_upgrade - -example : - CommonLeftInterleaverFamilyUpgradeStatement := by - rr_common_left_interleaver_family_upgrade - example {fs : List ℝ[X]} (hcommon : HasCommonInterleaver fs) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) @@ -461,1128 +453,165 @@ example : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by rr_succDegree_pair_common_interleaver_local_lower -example - (hle2 : CompatibleSuccDegreeRootCountAboveLeTwoStatement) - (hgap : CompatibleSuccDegreeRootCountAboveNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_leTwo_noGapTwo using - le_two := hle2, - no_gap_two := hgap - example (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible using root_count := hcount -example - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - CompatibleSuccDegreeClosedSegmentCountEqStatement := by - rr_compatibleSuccDegree_closedSegmentCountEq_of_nonRoot using - root_count := hcount - -example - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - CompatibleSuccDegreeRootCountAboveLeTwoStatement := by - rr_compatibleSuccDegree_rootCountAbove_leTwo_of_nonRoot using - root_count := hcount - example (hgap : CompatibleSuccDegreeRootCountAboveNoGapTwoStatement) : CompatibleSuccDegreeRootCountAboveNonRootStatement := by rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo using no_gap_two := hgap -example - (hgap : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment using - no_gap_two := hgap - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := hcount - -example : - CompatibleSuccDegreeClosedSegmentCountEqStatement ↔ - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_closedSegmentCountEq_iff_nonRoot - -example - (hgap : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_rightFamily using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSign using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower using - no_gap := hgap - -example - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq using - count_eq := hcount - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := hcount - -example - (hgap : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_closedSegment using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_rightFamily using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSign using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_endpointSignLower using - no_gap := hgap - -example - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_lowerCountEq using - count_eq := hcount - -example - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCrossing using - root_crossing := hcross - -example - (hcount : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCount using - root_count := hcount - -example - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCountAbove using - root_count_above := hcount - -example - (hcount : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCountNonRoot using - root_count := hcount - -example - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot using - root_count_above := hcount - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_closedSegmentCountEq using - count_eq := hcount - -example - (hgap : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_closedSegmentNoGapTwo using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeRightFamilyNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rightFamilyNoGapTwo using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignNoGapTwoStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_endpointSignNoGapTwo using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeEndpointSignLowerNoGapStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_endpointSignLowerNoGap using - no_gap := hgap - -example - (hcount : CompatibleSuccDegreeEndpointSignLowerCountEqStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_endpointSignLowerCountEq using - count_eq := hcount - -example - (horient : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - f.coeff 0 ≠ 0 → - g.coeff 0 = 0 → - StrictInterl f g) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement := by - rr_succDegree_rootCountLeadRightZero_divXStrictInterl_of_strict_interl using - orientation := horient - -example - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement := by - rr_succDegree_rootCountLeadRightZero_of_divXStrictInterl using - divX_strictInterl := hdivX - -example - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hright : PosComboNoCommonSuccDegreeRootCountLeadRightZeroNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement := by - rr_succDegree_rootCountLead_of_bothNonzero_and_rightZero using - both_nonzero := hboth, - right_zero := hright - -example - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement := by - rr_succDegree_rootCountLead_of_bothNonzero_and_divXStrictInterl using - both_nonzero := hboth, - divX_strictInterl := hdivX - -example - (horient : PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement) : - PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement := by - rr_succDegree_rootCountResidual_of_strict_interl using - orientation := horient - -example - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonnegStatement := by - rr_succDegree_rootCount_of_residual_and_lead using - lead := hlead, - residual := hres - -example - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := by - rr_succDegree_rootCountAbove_of_residual_and_lead using - lead := hlead, - residual := hres - -example - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := by - rr_succDegree_rootCrossing_of_residual_and_lead using - lead := hlead, - residual := hres - -example - (hlead : PosComboNoCommonSuccDegreeRootCountLeadNonnegStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_residual_and_lead using - lead := hlead, - residual := hres - -example - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) - (hres : PosComboNoCommonSuccDegreeRootCountResidualNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_residual_bothNonzero_divXStrictInterl using - both_nonzero := hboth, - divX_strictInterl := hdivX, - residual := hres - -example - (hres : PosComboNoCommonSuccDegreeRootCountResidualStrictInterlStatement) - (hboth : PosComboNoCommonSuccDegreeRootCountLeadBothNonzeroNonnegStatement) - (hdivX : PosComboNoCommonSuccDegreeRootCountLeadRightZeroDivXStrictInterlStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_residualStrictInterl_bothNonzero_divXStrictInterl using - residual_strictInterl := hres, - both_nonzero := hboth, - divX_strictInterl := hdivX - -example - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_degree_split_nonnegShift using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCrossing using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCount using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCountAbove using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCountNonRoot using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCountAboveNonRoot using - same_degree := hsame, - succ_degree := hsucc - -example : - CompatiblePairHasCommonInterleaverStatement := by - rr_chudnovskySeymour_compatible_pair_common_interleaver_statement - -example : - CompatiblePairHasCommonLeftInterleaverPosStatement := by - rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement - -example {f g : ℝ[X]} - (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) - (hcomp : Compatible f g) : - ∃ k : ℝ[X], StrictInterl f k ∧ StrictInterl g k := by - rr_chudnovskySeymour_compatible_pair_common_interleaver using - left_pos_lc := hf, - right_pos_lc := hg, - compatible := hcomp - -example {f g : ℝ[X]} - (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) - (hcomp : Compatible f g) : - ∃ k : ℝ[X], StrictInterl k f ∧ StrictInterl k g := by - rr_chudnovskySeymour_compatible_pair_common_left_interleaver using - left_pos_lc := hf, - right_pos_lc := hg, - compatible := hcomp - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_degree_split_nonnegShift using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_rootCrossing using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_rootCount using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_rootCountAbove using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_rootCountNonRoot using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := by - rr_pairwise_common_interleaver_rootCountAboveNonRoot using - same_degree := hsame, - succ_degree := hsucc, - member_pos_lc := hpos, - pairwise_compatible := hpair - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_rootCrossing using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_rootCount using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_rootCountAbove using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_rootCountNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_rootCountAboveNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_degreeSplit_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_slotData_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_affineFamily_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_boundaryRight_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - boundary_right := hboundary - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_sameDegreePair_affineFamily_nonneg using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hall : PosComboNoCommonToAllComboBridgeStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_allCombo_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - all_combo := hall - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haff : PosComboNoCommonAffineFamilyStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_affineFamily_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_boundaryRight_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - boundary_right := hboundary - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hbridge : PosComboPairHasCommonInterleaverStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_posComboBridge using - member_realrooted := hrr, - member_pos_lc := hpos, - pos_combo_bridge := hbridge - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (horient : PosComboNoCommonOrientationStatement) - (hdeg : PosComboNatDegreeCloseStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_noCommonOrientation_degreeClose using - member_realrooted := hrr, - member_pos_lc := hpos, - orientation := horient, - degree_close := hdeg - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (horient : PosComboNoCommonOrientationStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_noCommonOrientation_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - orientation := horient - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_degreeSplit_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hdeg : ∀ f ∈ fs, f.natDegree ≤ 1) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_degree_le_one using - member_pos_lc := hpos, - member_degree_le_one := hdeg - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hdeg : ∀ f ∈ fs, f.natDegree ≤ 2) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_degree_le_two using - member_realrooted := hrr, - member_pos_lc := hpos, - member_degree_le_two := hdeg - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_rootCrossing using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_rootCount using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_rootCountAbove using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_rootCountNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_rootCountAboveNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_slotData_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - boundary_right := hboundary - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_sameDegreePair_affineFamily_nonneg - using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hall : PosComboNoCommonToAllComboBridgeStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_allCombo_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - all_combo := hall - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_affineFamily_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_boundaryRight_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - boundary_right := hboundary - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hbridge : PosComboPairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_posComboBridge using - member_realrooted := hrr, - member_pos_lc := hpos, - pos_combo_bridge := hbridge - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (horient : PosComboNoCommonOrientationStatement) - (hdeg : PosComboNatDegreeCloseStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_degreeClose - using - member_realrooted := hrr, - member_pos_lc := hpos, - orientation := horient, - degree_close := hdeg - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (horient : PosComboNoCommonOrientationStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_noCommonOrientation_nonnegCoeffs - using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - orientation := horient - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_pairDegreeSplit_nonnegCoeffs - using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_pairwiseCompatible_iff_commonInterleaver_degreeSplit_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : - PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := by - rr_chudnovskySeymour_pairwiseCompatible_iff_commonLeftInterleaver using - member_realrooted := hrr, - member_pos_lc := hpos +example + (hgap : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : + CompatibleSuccDegreeRootCountAboveNonRootStatement := by + rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment using + no_gap_two := hgap -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := by - rr_chudnovskySeymour_pairwiseCompatible_iff_commonInterleaver using - member_realrooted := hrr, - member_pos_lc := hpos +example + (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : + CompatibleSuccDegreeRootCountAboveNonRootStatement := by + rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq using + count_eq := hcount -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_chudnovskySeymour_pairwiseCompatible_iff_familyCompatible using - member_realrooted := hrr, - member_pos_lc := hpos +example + (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : + PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by + rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq using + count_eq := hcount -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_rootCrossing using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc +example + (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : + PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by + rr_succDegree_pair_common_interleaver_rootCrossing using + root_crossing := hcross -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_rootCount using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc +example + (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : + PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by + rr_succDegree_pair_common_interleaver_rootCountAbove using + root_count_above := hcount -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_rootCountAbove using - member_realrooted := hrr, - member_pos_lc := hpos, +example + (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : + PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by + rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot using + root_count_above := hcount + +example + (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : + PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by + rr_succDegree_pair_common_interleaver_closedSegmentCountEq using + count_eq := hcount + +example + (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) + (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : + CompatiblePairHasCommonInterleaverStatement := by + rr_compatible_pair_common_interleaver_degree_split_nonnegShift using same_degree := hsame, succ_degree := hsucc -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeRootCountNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_rootCountNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, +example + (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) + (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : + CompatiblePairHasCommonInterleaverStatement := by + rr_compatible_pair_common_interleaver_rootCrossing using same_degree := hsame, succ_degree := hsucc -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) +example (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_rootCountAboveNonRoot using - member_realrooted := hrr, - member_pos_lc := hpos, + CompatiblePairHasCommonInterleaverStatement := by + rr_compatible_pair_common_interleaver_rootCountAboveNonRoot using same_degree := hsame, succ_degree := hsucc -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc +example : + CompatiblePairHasCommonInterleaverStatement := by + rr_chudnovskySeymour_compatible_pair_common_interleaver_statement -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeSlotDataNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_slotData_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - succ_degree := hsucc +example : + CompatiblePairHasCommonLeftInterleaverPosStatement := by + rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - same_degree := hsame, - affine_family := haff +example {f g : ℝ[X]} + (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) + (hcomp : Compatible f g) : + ∃ k : ℝ[X], StrictInterl f k ∧ StrictInterl g k := by + rr_chudnovskySeymour_compatible_pair_common_interleaver using + left_pos_lc := hf, + right_pos_lc := hg, + compatible := hcomp -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegShift using - member_realrooted := hrr, - member_pos_lc := hpos, - boundary_right := hboundary +example {f g : ℝ[X]} + (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) + (hcomp : Compatible f g) : + ∃ k : ℝ[X], StrictInterl k f ∧ StrictInterl k g := by + rr_chudnovskySeymour_compatible_pair_common_left_interleaver using + left_pos_lc := hf, + right_pos_lc := hg, + compatible := hcomp example {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_sameDegreePair_affineFamily_nonneg - using + (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : + ChudnovskySeymourFourWayPackage fs := by + rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs using member_realrooted := hrr, member_pos_lc := hpos, member_nonneg_coeffs := hnn, same_degree := hsame, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hall : PosComboNoCommonToAllComboBridgeStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_allCombo_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - all_combo := hall - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (haff : PosComboNoCommonAffineFamilyStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_affineFamily_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - affine_family := haff - -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hboundary : PosComboNoCommonBoundaryRightPairOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_boundaryRight_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - boundary_right := hboundary + succ_degree := hsucc example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hbridge : PosComboPairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_posComboBridge using - member_realrooted := hrr, + (hdeg : ∀ f ∈ fs, f.natDegree ≤ 1) : + ChudnovskySeymourFourWayPackage fs := by + rr_chudnovskySeymour_fourWay_degree_le_one using member_pos_lc := hpos, - pos_combo_bridge := hbridge + member_degree_le_one := hdeg example {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (horient : PosComboNoCommonOrientationStatement) - (hdeg : PosComboNatDegreeCloseStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_degreeClose - using + (hdeg : ∀ f ∈ fs, f.natDegree ≤ 2) : + ChudnovskySeymourFourWayPackage fs := by + rr_chudnovskySeymour_fourWay_degree_le_two using member_realrooted := hrr, member_pos_lc := hpos, - orientation := horient, - degree_close := hdeg + member_degree_le_two := hdeg example {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (horient : PosComboNoCommonOrientationStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_noCommonOrientation_nonnegCoeffs - using + (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : + PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := by + rr_chudnovskySeymour_pairwiseCompatible_iff_commonLeftInterleaver using member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - orientation := horient + member_pos_lc := hpos example {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_pairDegreeSplit_nonnegCoeffs - using + (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : + PairwiseCompatible fs ↔ HasCommonInterleaver fs := by + rr_chudnovskySeymour_pairwiseCompatible_iff_commonInterleaver using member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc + member_pos_lc := hpos example {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreeOrientationAlternativeNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : + (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : PairwiseCompatible fs ↔ FamilyCompatible fs := by - rr_pairwiseCompatible_iff_familyCompatible_degreeSplit_nonnegCoeffs using + rr_chudnovskySeymour_pairwiseCompatible_iff_familyCompatible using member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc + member_pos_lc := hpos example {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) @@ -1806,57 +835,5 @@ example {fs : List ℝ[X]} member_pos_lc := hpos, member_degree_le_two := hdeg -example {f g : ℝ[X]} - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg : g.natDegree = f.natDegree) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hfdeg : f.natDegree ≤ 3) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by - rr_sameDegree_pair_common_interleaver_cubicInterior using - below_certificate := hbelow, - above_certificate := habove, - left_pos_lc := hf_pos, - right_pos_lc := hg_pos, - left_nonneg_coeffs := hfnn, - right_nonneg_coeffs := hgnn, - pos_combo := hfg, - same_degree := hdeg, - no_common_roots := hno, - left_degree_le_three := hfdeg - -example {f g : ℝ[X]} - (hbelow : CubicInteriorTwoBelowStatement) - (habove : CubicInteriorTwoAboveStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) - (hfg : PosComboRealRooted f g) - (hdeg_lo : f.natDegree ≤ g.natDegree) - (hdeg_hi : g.natDegree ≤ f.natDegree + 1) - (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) - (hgdeg : g.natDegree ≤ 3) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by - rr_noCommon_pair_common_interleaver_degree_le_three using - below_certificate := hbelow, - above_certificate := habove, - succ_degree_endpoint := hsucc, - left_pos_lc := hf_pos, - right_pos_lc := hg_pos, - left_nonneg_coeffs := hfnn, - right_nonneg_coeffs := hgnn, - pos_combo := hfg, - left_degree_le_right := hdeg_lo, - right_degree_le_succ_left := hdeg_hi, - no_common_roots := hno, - right_degree_le_three := hgdeg - end Tactic end RealRooted From 8b3edd0d7a5462870b49a6d9a4d996857d9a996c Mon Sep 17 00:00:00 2001 From: Per Alexandersson Date: Fri, 2 Oct 2026 15:04:51 +0000 Subject: [PATCH 2/4] =?UTF-8?q?CommonInterleaver:=20state=20the=20Chudnovs?= =?UTF-8?q?ky=E2=80=93Seymour=20pair=20chain=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restate the live same-degree and successor-degree chain behind the two-polynomial Chudnovsky–Seymour theorem as explicit per-pair theorems and delete the statement scaffolding it used: - same degree: pairHasCommonInterleaver_of_sameDegree_rootCrossing, pairHasCommonInterleaver_of_sameDegree_rootCountAbove_nonRoot and pairHasCommonInterleaver_of_posCombo_sameDegree; - successor degree: Compatible.succDegree_card_roots_gt_eq_of_closedSegment, Compatible.succDegree_rootCountAbove_sub_ne_two, compatibleSuccDegree_rootCountAbove_diff_le_one_of_nonRoot and pairHasCommonInterleaver_of_posCombo_succDegree; - the degree-split, nonnegative-coefficient and translation reductions are now unconditional, ending in chudnovskySeymour_compatiblePairHasCommonInterleaver; - Core states the common-left pair theorem, the family theorems and the four-way package (chudnovskySeymour_fourWay) directly. Deletes 14 statement defs, the ClosedSegmentCountEqFromAnalytic and CommonInterleaver.Statements modules, and the tactics and examples that only fed statement goals. Co-Authored-By: Claude Opus 5.5 --- RealRooted.lean | 2 - RealRooted/ChudnovskySeymour/Core.lean | 83 ++++---- .../ClosedSegmentCountEqFromAnalytic.lean | 65 ------ .../CommonInterleaver/AffineBoundary.lean | 2 +- RealRooted/CommonInterleaver/PairBridge.lean | 6 +- .../PairBridge/Compatibility.lean | 65 +----- .../Compatibility/NonnegativeShift.lean | 121 +++++------ .../CommonInterleaver/PairBridge/Forward.lean | 2 +- .../Reduction/CommonInterleaver.lean | 32 ++- .../PairBridge/SuccDegree.lean | 8 +- .../PairBridge/SuccDegree/ClosedSegment.lean | 136 +++++++++---- .../PairBridge/SuccDegree/RootCount.lean | 47 +---- .../PairBridge/SuccDegree/SlotData.lean | 107 +++------- .../CommonInterleaver/PairwiseUpgrade.lean | 45 +--- .../PairwiseUpgrade/FourWay.lean | 37 +--- .../PairwiseUpgrade/FourWay/Equivalences.lean | 44 ---- RealRooted/CommonInterleaver/RightPencil.lean | 71 ------- .../RootCountCombinatorics.lean | 120 +---------- .../SameDegreeRootCount.lean | 192 ++++-------------- RealRooted/CommonInterleaver/Statements.lean | 45 ---- .../CommonInterleaver/SuccDegreeEndpoint.lean | 95 ++------- .../SuccDegreeLowDegree.lean | 12 +- RealRooted/Compatibility/Basic.lean | 2 +- .../Compatibility/InterleaverBridge.lean | 81 +------- RealRooted/Production.lean | 2 - RealRooted/SameDegreeCountFromAnalytic.lean | 46 +++-- RealRooted/SameDegreeCubicRootCount.lean | 17 +- .../CommonInterleaver/AnalyticRules.lean | 96 +-------- .../CommonInterleaver/AnalyticSyntax.lean | 95 --------- .../Tactic/CommonInterleaver/FamilyRules.lean | 10 - .../CommonInterleaver/FamilySyntax.lean | 9 - .../Tactic/Examples/CommonInterleaver.lean | 112 ---------- scripts/import_architecture.json | 18 +- 33 files changed, 389 insertions(+), 1436 deletions(-) delete mode 100644 RealRooted/ClosedSegmentCountEqFromAnalytic.lean delete mode 100644 RealRooted/CommonInterleaver/Statements.lean diff --git a/RealRooted.lean b/RealRooted.lean index 8d14f8ff7..ff47ac266 100644 --- a/RealRooted.lean +++ b/RealRooted.lean @@ -228,7 +228,6 @@ import RealRooted.Challenges.OperatorPreservers import RealRooted.Challenges.VeroneseSections import RealRooted.Challenges.Wagner import RealRooted.ChudnovskySeymour.Core -import RealRooted.ClosedSegmentCountEqFromAnalytic import RealRooted.CoefficientDominance import RealRooted.CoefficientDominance.LogConcavity import RealRooted.CoefficientDominance.RootGap @@ -303,7 +302,6 @@ import RealRooted.CommonInterleaver.RootSlots import RealRooted.CommonInterleaver.RootSlots.Basic import RealRooted.CommonInterleaver.Sequence import RealRooted.CommonInterleaver.SameDegreeRootCount -import RealRooted.CommonInterleaver.Statements import RealRooted.CommonInterleaver.SuccDegreeEndpoint import RealRooted.CommonInterleaver.SuccDegreeLowDegree import RealRooted.CommonInterleaver.FamilySum diff --git a/RealRooted/ChudnovskySeymour/Core.lean b/RealRooted/ChudnovskySeymour/Core.lean index 4821f0dd0..fc7e1cd68 100644 --- a/RealRooted/ChudnovskySeymour/Core.lean +++ b/RealRooted/ChudnovskySeymour/Core.lean @@ -1,4 +1,3 @@ -import RealRooted.ClosedSegmentCountEqFromAnalytic import RealRooted.CommonInterleaverTwo import RealRooted.InterlacingSequenceBasic import RealRooted.SameDegreeCountFromAnalytic @@ -9,37 +8,42 @@ namespace RealRooted open Polynomial -/-- Chudnovsky--Seymour for two polynomials: compatible polynomials with positive -leading coefficients have a common (right) interleaver. The proof splits into -the same-degree and successor-degree cases. -/ -theorem chudnovskySeymour_compatiblePairHasCommonInterleaver : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - PosComboNoCommonSameDegreePairHasCommonInterleaverNonneg - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonneg - -/-- Chudnovsky--Seymour for two polynomials, common-left form: compatible -polynomials with positive leading coefficients have a common left interleaver. -/ -theorem chudnovskySeymour_compatiblePairHasCommonLeftInterleaver : - CompatiblePairHasCommonLeftInterleaverPosStatement := - compatiblePairHasCommonLeftInterleaverPos_of_pairBridge - chudnovskySeymour_compatiblePairHasCommonInterleaver - -/-- Two compatible polynomials with positive leading coefficients have a common -interleaver. -/ +/-- Implicit-binder form of `chudnovskySeymour_compatiblePairHasCommonInterleaver`, +kept for existing callers. -/ theorem compatiblePairHasCommonInterleaver_chudnovskySeymour {f g : ℝ[X]} (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (h : Compatible f g) : ∃ k : ℝ[X], StrictInterl f k ∧ StrictInterl g k := chudnovskySeymour_compatiblePairHasCommonInterleaver hf hg h -/-- Two compatible polynomials with positive leading coefficients have a common -left interleaver. -/ -theorem compatiblePairHasCommonLeftInterleaver_chudnovskySeymour - {f g : ℝ[X]} (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) +/-- **Chudnovsky--Seymour for two polynomials**, common-left form: compatible +polynomials with positive leading coefficients have a common left interleaver. +A common right interleaver is converted using degree closeness. -/ +theorem chudnovskySeymour_compatiblePairHasCommonLeftInterleaver + ⦃f g : ℝ[X]⦄ (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (h : Compatible f g) : - ∃ k : ℝ[X], StrictInterl k f ∧ StrictInterl k g := - chudnovskySeymour_compatiblePairHasCommonLeftInterleaver hf hg h + ∃ k : ℝ[X], StrictInterl k f ∧ StrictInterl k g := by + have hclose : f.natDegree ≤ g.natDegree + 1 ∧ g.natDegree ≤ f.natDegree + 1 := + h.natDegree_close hf hg + by_cases hdeg : f.natDegree ≤ g.natDegree + · obtain ⟨k, hfk, hgk⟩ := chudnovskySeymour_compatiblePairHasCommonInterleaver hf hg h + exact pairHasCommonLeftInterleaver_of_commonInterleaver hfk hgk hdeg hclose.2 + · obtain ⟨k, hgk, hfk⟩ := + chudnovskySeymour_compatiblePairHasCommonInterleaver hg hf h.comm + exact (pairHasCommonLeftInterleaver_of_commonInterleaver + hgk hfk (le_of_not_ge hdeg) hclose.1).imp fun _ hk => hk.symm + +/-- **Chudnovsky--Seymour**, four-way form: for a finite family of real-rooted +polynomials with positive leading coefficients, pairwise compatibility, +pairwise common interleavers, a common interleaver, and family compatibility +are equivalent. -/ +theorem chudnovskySeymour_fourWay + {fs : List ℝ[X]} + (hrr : ∀ f ∈ fs, f ≠ 0 ∧ f.Splits) + (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : + ChudnovskySeymourFourWayPackage fs := + chudnovskySeymour_fourWay_of_pairBridgePos hrr hpos + chudnovskySeymour_compatiblePairHasCommonInterleaver /-- **Chudnovsky--Seymour.** A finite family of real-rooted polynomials with positive leading coefficients is pairwise compatible if and only if it has a @@ -49,8 +53,7 @@ theorem chudnovskySeymour_pairwiseCompatible_iff_commonInterleaver (hrr : ∀ f ∈ fs, f ≠ 0 ∧ f.Splits) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_pairBridgePos hrr hpos - (fun _ _ hf hg h => compatiblePairHasCommonInterleaver_chudnovskySeymour hf hg h) + pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay (chudnovskySeymour_fourWay hrr hpos) /-- **Chudnovsky--Seymour**, common-left form: a finite family of real-rooted polynomials with positive leading coefficients is pairwise compatible if and @@ -60,9 +63,13 @@ theorem chudnovskySeymour_pairwiseCompatible_iff_commonLeftInterleaver (hrr : ∀ f ∈ fs, f ≠ 0 ∧ f.Splits) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := - pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge_direct - chudnovskySeymour_compatiblePairHasCommonLeftInterleaver - (fun f hf => (hrr f hf).2) hpos + ⟨fun hpair => + hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver + (fun f hf => (hrr f hf).2) hpos fun i j hij => + chudnovskySeymour_compatiblePairHasCommonLeftInterleaver + (hpos (fs.get i) (fs.get_mem i)) (hpos (fs.get j) (fs.get_mem j)) + (hpair i j hij), + fun hcommon => pairwiseCompatible_of_commonLeftInterleaver hcommon hpos⟩ /-- **Chudnovsky--Seymour.** A finite family of real-rooted polynomials with positive leading coefficients is pairwise compatible if and only if every @@ -72,8 +79,7 @@ theorem chudnovskySeymour_pairwiseCompatible_iff_familyCompatible (hrr : ∀ f ∈ fs, f ≠ 0 ∧ f.Splits) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_pairBridgePos hrr hpos - chudnovskySeymour_compatiblePairHasCommonInterleaver + pairwiseCompatible_iff_familyCompatible_of_fourWay (chudnovskySeymour_fourWay hrr hpos) /-- An interlacing sequence with nonnegative coefficients is compatible under all nonnegative weighted sums. -/ @@ -103,19 +109,6 @@ theorem IsInterlacingSeqNonneg.weightedSum_isPFPolynomial exact IsPFPolynomial.of_nonnegCoeffs_eq_zero_or_splits hnonneg <| (hfs.familyCompatible ws hmem hweights).imp_right And.right -/-- The four equivalent Chudnovsky--Seymour conditions for a family with -nonnegative coefficients: pairwise compatibility, pairwise and common -interleavers, and family compatibility. -/ -theorem chudnovskySeymour_fourWay_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, f ≠ 0 ∧ f.Splits) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) : - ChudnovskySeymourFourWayPackage fs := - chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs hrr hpos hnn - PosComboNoCommonSameDegreePairHasCommonInterleaverNonneg - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonneg - /-- `chudnovskySeymour_pairwiseCompatible_iff_familyCompatible` with an unused nonnegativity hypothesis, kept for existing callers. -/ theorem chudnovskySeymour_pairwiseCompatible_iff_familyCompatible_nonnegCoeffs diff --git a/RealRooted/ClosedSegmentCountEqFromAnalytic.lean b/RealRooted/ClosedSegmentCountEqFromAnalytic.lean deleted file mode 100644 index 2a7272057..000000000 --- a/RealRooted/ClosedSegmentCountEqFromAnalytic.lean +++ /dev/null @@ -1,65 +0,0 @@ -import RealRooted.CommonInterleaver.PairBridge.SuccDegree.SlotData -import RealRooted.DegreeIncreasingLocalLowerCount -import RealRooted.SmallPositiveParameterCount - -/-! -# Closed-Segment Count Equality from Analytic Inputs - -This file packages the issue #42 analytic route into the central -closed-segment count-equality target. The degree-increasing lower-count input -handles the small-positive endpoint, and the positive-parameter same-degree -lower-count input handles local constancy along the two positive parameter -families. --/ - -open Polynomial - -namespace RealRooted - -/-- -The central closed-segment count-equality target follows from the proved -degree-increasing and positive-parameter local lower-count inputs. --/ -private theorem compatibleSuccDegreeClosedSegmentCountEq_of_local_lower_counts : - CompatibleSuccDegreeClosedSegmentCountEqStatement := - fun f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg => by - have hx_roots : x ∉ f.roots := - fun hx => hxf ((Polynomial.mem_roots hf_pos.ne_zero).mp hx) - have hlt : f.natDegree < g.natDegree := by simp [hdeg] - have hfg_split_pos : ∀ μ : ℝ, 0 < μ → (f + C μ * g).Splits := fun μ hμ ↦ by - rcases hcomp 1 μ zero_le_one hμ.le with hzero | hrr - · simp [show f + C μ * g = 0 by grind] - · grind - have hgf_split : ∀ ν ∈ Set.Icc (0 : ℝ) 1, (g + C ν * f).Splits := fun ν hν ↦ by - rcases hcomp.comm 1 ν zero_le_one hν.1 with hzero | hrr - · simp [show g + C ν * f = 0 by grind] - · grind - refine card_filter_gt_endpoint_eq_of_local_lower_counts - hf_pos hg_pos hdeg hf_split hx_roots - ?_ - ?_ ?_ ?_ ?_ - · intro ρ hρ - obtain ⟨δ, hδ_pos, hδ⟩ := degreeIncreasing_local_lower_count hf_split hlt ρ hρ - grind - · simp_all - · exact fun μ hμ _ ↦ closedSegment_not_isRoot_add_right_of_nonneg hμ.le hseg - · simp_all - · intro ν hν - refine closedSegment_not_isRoot_add_right_of_nonneg - (f := g) (g := f) (x := x) hν.1 ?_ - grind - -/-- The proved closed-segment count equality closes the repaired succ-degree -#42 pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_local_lower_counts : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentCountEq - compatibleSuccDegreeClosedSegmentCountEq_of_local_lower_counts - -/-- Positive combinations of a successor-degree nonnegative pair without -common roots have a common interleaver. -/ -theorem PosComboNoCommonSuccDegreePairHasCommonInterleaverNonneg : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_local_lower_counts - -end RealRooted diff --git a/RealRooted/CommonInterleaver/AffineBoundary.lean b/RealRooted/CommonInterleaver/AffineBoundary.lean index e01841c55..5bccdb0df 100644 --- a/RealRooted/CommonInterleaver/AffineBoundary.lean +++ b/RealRooted/CommonInterleaver/AffineBoundary.lean @@ -6,7 +6,7 @@ They turn the no-common boundary right-pair orientation statement into the positive affine-family bridge used by the common-interleaver reductions. -/ import RealRooted.AffineFamily -import RealRooted.CommonInterleaver.Statements +import RealRooted.AllCombo import RealRooted.PosCombo open Polynomial diff --git a/RealRooted/CommonInterleaver/PairBridge.lean b/RealRooted/CommonInterleaver/PairBridge.lean index 1effbdc08..5357d16c1 100644 --- a/RealRooted/CommonInterleaver/PairBridge.lean +++ b/RealRooted/CommonInterleaver/PairBridge.lean @@ -3,7 +3,7 @@ import RealRooted.CommonInterleaver.PairBridge.Compatibility.NonnegativeShift /-! # Pair bridge assembly for two-polynomial common interleavers -Compatibility facade for the layered two-polynomial common-interleaver bridge. -The forward, succ-degree, common-root reduction, endpoint, and nonnegative-shift -layers live in dedicated children. +Facade for the two-polynomial common-interleaver theorem. The forward, +succ-degree, common-root reduction, and nonnegative-shift layers live in +dedicated children. -/ diff --git a/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean b/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean index 291f44f91..b10d2f48f 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Compatibility.lean @@ -2,9 +2,11 @@ import RealRooted.CommonInterleaver.PairBridge.Reduction.AllCombo import RealRooted.CommonInterleaver.PairBridge.Reduction.CommonInterleaver /-! -# Pair bridge assembly: compatibility endpoints +# Common interleavers for nonnegative positive-combination pairs -Final pairwise and compatibility-to-common-interleaver wrappers. +Degree closeness and the ordered no-common case give a common interleaver for +every pair of nonnegative polynomials whose positive combinations are +real-rooted. -/ open Polynomial @@ -58,13 +60,10 @@ theorem posComboPairHasCommonInterleaver_of_orderedBridge_and_nonnegCoeffs ⟨h, hg_strictInterl, hf_strictInterl⟩ exact ⟨h, hf_strictInterl, hg_strictInterl⟩ -/-- Repaired degree-split package for the full positive-combo pair bridge in -the nonnegative-coefficient regime. This is the version to use after the -same-degree orientation alternative is replaced by a common-interleaver target. --/ -theorem posComboPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) +/-- Two polynomials with positive leading coefficients and nonnegative +coefficients whose positive combinations are real-rooted have a common +interleaver. -/ +theorem posComboPairHasCommonInterleaver_of_nonnegCoeffs {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) @@ -73,53 +72,7 @@ theorem posComboPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs posComboPairHasCommonInterleaver_of_orderedBridge_and_nonnegCoeffs (fun {f g} hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi => CommonInterleaver.PairBridge.pairDegreeSplit_ordered - (f := f) (g := g) hsame hsucc hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi) - hf_pos hg_pos hfnn hgnn hfg - -private theorem compatiblePairHasCommonInterleaver_of_nonnegPosComboPairBridge - (hbridge : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - hbridge hf_pos hg_pos hfnn hgnn - (hfg.toPosComboRealRooted hf_pos hg_pos) - -private theorem nonnegPosComboPairBridge_of_pairDegreeSplit - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - posComboPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - hsame hsucc hf_pos hg_pos hfnn hgnn hfg - -/-- Compatibility bridge under nonnegative coefficients, reduced to the -repaired degree-split package with common-interleaver conclusions in both -branches. -/ -theorem compatiblePairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - {f g : ℝ[X]} - (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) (hgnn : HasNonnegCoeffs g) - (hfg : Compatible f g) : - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - compatiblePairHasCommonInterleaver_of_nonnegPosComboPairBridge - (nonnegPosComboPairBridge_of_pairDegreeSplit hsame hsucc) + (f := f) (g := g) hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi) hf_pos hg_pos hfnn hgnn hfg end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean b/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean index c44a02115..4b40dcc2b 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Compatibility/NonnegativeShift.lean @@ -1,10 +1,10 @@ import RealRooted.CommonInterleaver.PairBridge.Compatibility /-! -# Pair bridge assembly: nonnegative shifts +# Chudnovsky--Seymour for two polynomials -Translation to nonnegative coefficients and the resulting positive-leading -common-interleaver endpoint wrappers. +Translating a split pair far enough makes its coefficients nonnegative, which +reduces the two-polynomial common-interleaver theorem to the nonnegative case. -/ open Polynomial @@ -157,85 +157,64 @@ theorem compatiblePairHasCommonInterleaver_of_natDegree_le_two (hfg.isRealRooted_right hg_pos).2 (hfg.toPosComboRealRooted hf_pos hg_pos) hfdeg hgdeg -/-- Translation reduces the full positive-leading compatibility bridge to the -repaired nonnegative-coefficient degree-split package. This is the shifted -version whose same-degree input already has the common-right-interleaver -conclusion, rather than the stronger orientation alternative. -/ -theorem posComboPairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) - {f g : ℝ[X]} - (_hf_rr_ne : f ≠ 0) (hf_rr_splits : f.Splits) - (_hg_rr_ne : g ≠ 0) (hg_rr_splits : g.Splits) - (hf_pos : HasPosLeadingCoeff f) - (hg_pos : HasPosLeadingCoeff g) +/-- Two split polynomials with positive leading coefficients whose positive +combinations are real-rooted have a common interleaver. Translating both far +enough makes their coefficients nonnegative, where +`posComboPairHasCommonInterleaver_of_nonnegCoeffs` applies; the common +interleaver is translated back. -/ +theorem posComboPairHasCommonInterleaver_of_splits + {f g : ℝ[X]} (hf_splits : f.Splits) (hg_splits : g.Splits) + (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) (hfg : PosComboRealRooted f g) : ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := posComboPairHasCommonInterleaver_via_nonnegShift - _hf_rr_ne hf_rr_splits _hg_rr_ne hg_rr_splits hf_pos hg_pos hfg - (fun {F G} hF_pos hG_pos hFnn hGnn hFG => - posComboPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - hsame hsucc (f := F) (g := G) hF_pos hG_pos hFnn hGnn hFG) - -private theorem compatiblePairHasCommonInterleaver_of_realRootedPosComboBridge - (hbridge : + hf_pos.ne_zero hf_splits hg_pos.ne_zero hg_splits hf_pos hg_pos hfg + (fun {_ _} hF_pos hG_pos hFnn hGnn hFG => + posComboPairHasCommonInterleaver_of_nonnegCoeffs hF_pos hG_pos hFnn hGnn hFG) + +/-- **Chudnovsky--Seymour for two polynomials.** Compatible polynomials with +positive leading coefficients have a common interleaver. -/ +theorem chudnovskySeymour_compatiblePairHasCommonInterleaver + ⦃f g : ℝ[X]⦄ (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) + (h : Compatible f g) : + ∃ k : ℝ[X], StrictInterl f k ∧ StrictInterl g k := + posComboPairHasCommonInterleaver_of_splits + (h.isRealRooted_left hf).2 (h.isRealRooted_right hg).2 hf hg + (h.toPosComboRealRooted hf hg) + +/-- `chudnovskySeymour_compatiblePairHasCommonInterleaver`, with two unused +same-degree and successor-degree hypotheses; kept for its `LiuOppositeSigns` +callers. -/ +theorem compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift + (_hsame : + ∀ ⦃f g : ℝ[X]⦄, + HasPosLeadingCoeff f → + HasPosLeadingCoeff g → + HasNonnegCoeffs f → + HasNonnegCoeffs g → + PosComboRealRooted f g → + g.natDegree = f.natDegree → + (∀ r, f.IsRoot r → ¬ g.IsRoot r) → + ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) + (_hsucc : ∀ ⦃f g : ℝ[X]⦄, - f ≠ 0 → - f.Splits → - g ≠ 0 → - g.Splits → HasPosLeadingCoeff f → HasPosLeadingCoeff g → + HasNonnegCoeffs f → + HasNonnegCoeffs g → PosComboRealRooted f g → + g.natDegree = f.natDegree + 1 → + (∀ r, f.IsRoot r → ¬ g.IsRoot r) → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) : - CompatiblePairHasCommonInterleaverStatement := by - intro f g hf_pos hg_pos hfg - have hf_rr : (f ≠ 0 ∧ f.Splits) := hfg.isRealRooted_left hf_pos - have hg_rr : (g ≠ 0 ∧ g.Splits) := hfg.isRealRooted_right hg_pos - exact hbridge hf_rr.1 hf_rr.2 hg_rr.1 hg_rr.2 hf_pos hg_pos - (hfg.toPosComboRealRooted hf_pos hg_pos) - -/-- Shifted compatibility bridge using the repaired same-degree -common-interleaver branch directly. -/ -theorem compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_realRootedPosComboBridge - (fun {_ _} hf_ne hf_splits hg_ne hg_splits hf_pos hg_pos hfg => - posComboPairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - hsame hsucc hf_ne hf_splits hg_ne hg_splits hf_pos hg_pos hfg) - -/-- Shifted compatibility bridge from the root-crossing formulations of the -nonnegative same-degree and succ-degree branches. The succ-degree branch also -needs the left-splitting input that is part of its slot-data decomposition. -/ -theorem compatiblePairHasCommonInterleaver_of_rootCrossing_via_nonnegShift - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - (sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing hsame) - (succDegreePairHasCommonInterleaver_nonneg_of_leftSplits_and_rootCrossing - hsplit hsucc) - -/-- Shifted compatibility bridge from root-crossing formulations alone. The -succ-degree left endpoint is supplied by the root-continuity theorem. -/ -theorem compatiblePairHasCommonInterleaver_of_rootCrossing - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_rootCrossing_via_nonnegShift - hsame PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hsucc + chudnovskySeymour_compatiblePairHasCommonInterleaver -/-- Shifted compatibility bridge from common-non-root upper-threshold root-count -formulations in both branches. -/ +/-- `chudnovskySeymour_compatiblePairHasCommonInterleaver`, with two unused +root-count hypotheses; kept for its `LiuOppositeSigns` callers. -/ theorem compatiblePairHasCommonInterleaver_of_rootCountAboveBothNonRoot - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : + (_hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) + (_hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : CompatiblePairHasCommonInterleaverStatement := - compatiblePairHasCommonInterleaver_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot hsame) - (posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot hsucc) + chudnovskySeymour_compatiblePairHasCommonInterleaver end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/Forward.lean b/RealRooted/CommonInterleaver/PairBridge/Forward.lean index abef9434e..c080e6384 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Forward.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Forward.lean @@ -6,7 +6,7 @@ import RealRooted.CommonInterleaver.RightPencil import RealRooted.CommonInterleaver.SuccDegreeLowDegree import RealRooted.CommonInterleaver.IntervalLemmas import RealRooted.CommonInterleaver.SameDegreeRootCount -import RealRooted.CommonInterleaver.Statements +import RealRooted.AllCombo import RealRooted.PosCombo import RealRooted.CommonInterleaverSeq import RealRooted.AffineFamily diff --git a/RealRooted/CommonInterleaver/PairBridge/Reduction/CommonInterleaver.lean b/RealRooted/CommonInterleaver/PairBridge/Reduction/CommonInterleaver.lean index 5138ca4ea..30a227d76 100644 --- a/RealRooted/CommonInterleaver/PairBridge/Reduction/CommonInterleaver.lean +++ b/RealRooted/CommonInterleaver/PairBridge/Reduction/CommonInterleaver.lean @@ -1,4 +1,5 @@ import RealRooted.CommonInterleaver.PairBridge.Reduction.Basic +import RealRooted.SameDegreeCountFromAnalytic /-! # Pair bridge reduction: common interleavers @@ -12,17 +13,15 @@ noncomputable section namespace RealRooted -/-- Repaired no-common degree-split reduction of the common-interleaver bridge -in the nonnegative regime: both same-degree and succ-degree branches are stated -directly with the common-right-interleaver conclusion needed downstream. -/ -theorem posComboNoCommonPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) +/-- **Chudnovsky--Seymour for two polynomials, no-common close-degree case.** +If every positive combination of `f` and `g` is real-rooted, `f` and `g` have +positive leading coefficients and no common roots, and +`f.natDegree ≤ g.natDegree ≤ f.natDegree + 1`, then they have a common +interleaver. -/ +theorem pairHasCommonInterleaver_of_posCombo_noCommon_of_natDegree_close {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) - (hfnn : HasNonnegCoeffs f) - (hgnn : HasNonnegCoeffs g) (hfg : PosComboRealRooted f g) (hdeg_lo : f.natDegree ≤ g.natDegree) (hdeg_hi : g.natDegree ≤ f.natDegree + 1) @@ -30,8 +29,8 @@ theorem posComboNoCommonPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCo ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by have hdeg : g.natDegree = f.natDegree ∨ g.natDegree = f.natDegree + 1 := by lia rcases hdeg with hsame_deg | hsucc_deg - · exact hsame hf_pos hg_pos hfnn hgnn hfg hsame_deg hno - · exact hsucc hf_pos hg_pos hfnn hgnn hfg hsucc_deg hno + · exact pairHasCommonInterleaver_of_posCombo_sameDegree hf_pos hg_pos hfg hsame_deg hno + · exact pairHasCommonInterleaver_of_posCombo_succDegree hf_pos hg_pos hfg hsucc_deg private theorem posComboPairHasCommonInterleaver_of_noCommonPairBridge_and_nonnegCoeffs_ordered (hterminal : @@ -199,11 +198,11 @@ theorem posComboPairHasCommonInterleaver_nonneg_of_natDegree_le_two hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno hgdeg) hf_pos hg_pos hfnn hgnn hfg hfdeg hgdeg -/-- Internal ordered degree-split bridge for the endpoint layer. -/ +/-- Ordered common-interleaver theorem for nonnegative positive-combination +pairs: shared roots are factored out recursively, and the no-common case is +`pairHasCommonInterleaver_of_posCombo_noCommon_of_natDegree_close`. -/ protected theorem CommonInterleaver.PairBridge.pairDegreeSplit_ordered - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) @@ -214,10 +213,9 @@ protected theorem (hdeg_hi : g.natDegree ≤ f.natDegree + 1) : ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := posComboPairHasCommonInterleaver_of_noCommonPairBridge_and_nonnegCoeffs_ordered - (fun {f g} hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno => - posComboNoCommonPairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - hsame hsucc (f := f) (g := g) - hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi hno) + (fun {_ _} hf_pos hg_pos _ _ hfg hdeg_lo hdeg_hi hno => + pairHasCommonInterleaver_of_posCombo_noCommon_of_natDegree_close + hf_pos hg_pos hfg hdeg_lo hdeg_hi hno) hf_pos hg_pos hfnn hgnn hfg hdeg_lo hdeg_hi end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree.lean index 17f14b156..628d0c8ef 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree.lean @@ -3,9 +3,9 @@ import RealRooted.CommonInterleaver.PairBridge.SuccDegree.RootCount import RealRooted.CommonInterleaver.PairBridge.SuccDegree.RootCrossing /-! -# Pair bridge succ-degree reductions +# Succ-degree root counts -Facade for root-count reductions, closed-segment consequences, and the final -list/root-crossing bridge. Slot-data constructors and common-interleaver -wrappers live in `SuccDegree.SlotData`. +Facade for the succ-degree root-count, closed-segment, and root-crossing +modules. The succ-degree common-interleaver theorem lives in +`SuccDegree.SlotData`. -/ diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean index 3d4fd9667..12b719fb0 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean @@ -1,9 +1,14 @@ import RealRooted.CommonInterleaver.PairBridge.SuccDegree.RootCount +import RealRooted.DegreeIncreasingLocalLowerCount +import RealRooted.SmallPositiveParameterCount /-! -# Pair bridge succ-degree closed-segment consequences +# Succ-degree root counts along the closed segment -Closed-segment, endpoint-sign, and no-gap consequences of succ-degree root counts. +For a compatible successor-degree pair, the upper root counts agree at any +threshold that the closed segment from `f` to `g` never crosses. This rules +out exact upper-count gaps of two, and derivative induction then bounds the +upper-count difference by one at every common non-root threshold. -/ open Polynomial @@ -12,14 +17,96 @@ noncomputable section namespace RealRooted -/-- The exact gap-two obstruction closes the compatible common-non-root -root-count target. The proof is by strong induction on the lower endpoint -degree: low degrees are explicit, while degree at least two uses derivative -induction for the gap-at-most-two bound and the no-gap hypothesis to rule out -the remaining exact gap. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (hgap : CompatibleSuccDegreeRootCountAboveNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by +/-- Closed-segment count stability for a compatible successor-degree pair: if a +threshold is never a root along the closed segment from the lower-degree +endpoint `f` to the higher-degree endpoint `g`, then the endpoint upper root +counts at that threshold agree. -/ +theorem Compatible.succDegree_card_roots_gt_eq_of_closedSegment + {f g : ℝ[X]} (hcomp : Compatible f g) + (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (hdeg : g.natDegree = f.natDegree + 1) (hf_split : f.Splits) + {x : ℝ} (hxf : ¬ f.IsRoot x) (hxg : ¬ g.IsRoot x) + (hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → + ¬ (C (1 - β) * f + C β * g).IsRoot x) : + (f.roots.filter (x < ·)).card = (g.roots.filter (x < ·)).card := by + have hx_roots : x ∉ f.roots := + fun hx => hxf ((Polynomial.mem_roots hf_pos.ne_zero).mp hx) + have hlt : f.natDegree < g.natDegree := by simp [hdeg] + have hfg_split_pos : ∀ μ : ℝ, 0 < μ → (f + C μ * g).Splits := fun μ hμ ↦ by + rcases hcomp 1 μ zero_le_one hμ.le with hzero | hrr + · simp [show f + C μ * g = 0 by grind] + · grind + have hgf_split : ∀ ν ∈ Set.Icc (0 : ℝ) 1, (g + C ν * f).Splits := fun ν hν ↦ by + rcases hcomp.comm 1 ν zero_le_one hν.1 with hzero | hrr + · simp [show g + C ν * f = 0 by grind] + · grind + refine card_filter_gt_endpoint_eq_of_local_lower_counts + hf_pos hg_pos hdeg hf_split hx_roots + ?_ + ?_ ?_ ?_ ?_ + · intro ρ hρ + obtain ⟨δ, hδ_pos, hδ⟩ := degreeIncreasing_local_lower_count hf_split hlt ρ hρ + grind + · simp_all + · exact fun μ hμ _ ↦ closedSegment_not_isRoot_add_right_of_nonneg hμ.le hseg + · simp_all + · intro ν hν + refine closedSegment_not_isRoot_add_right_of_nonneg + (f := g) (g := f) (x := x) hν.1 ?_ + grind + +/-- A compatible successor-degree pair has no exact upper root-count gap of two +at a common non-root threshold: such a gap would keep the threshold off the +closed segment, where the endpoint counts agree. -/ +theorem Compatible.succDegree_rootCountAbove_sub_ne_two + {f g : ℝ[X]} (hcomp : Compatible f g) + (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (hdeg : g.natDegree = f.natDegree + 1) (hf_split : f.Splits) + {x : ℝ} (hxf : ¬ f.IsRoot x) (hxg : ¬ g.IsRoot x) : + ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≠ 2 ∧ + ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≠ 2 := by + constructor + · intro hgap + have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → + ¬ (C (1 - β) * f + C β * g).IsRoot x := by + intro β hβ0 hβ1 + exact + compatibleSuccDegree_closedSegment_not_isRoot_of_roots_gt_count_sub_eq_two + hcomp hf_pos hg_pos hdeg hf_split hβ0 hβ1 hxf hxg hgap + have hcard : + ((f.roots.filter (x < ·)).card : ℤ) = (g.roots.filter (x < ·)).card := by + exact_mod_cast + hcomp.succDegree_card_roots_gt_eq_of_closedSegment + hf_pos hg_pos hdeg hf_split hxf hxg hseg + linarith + · intro hgap + have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → + ¬ (C (1 - β) * f + C β * g).IsRoot x := by + intro β hβ0 hβ1 + exact + compatibleSuccDegree_closedSegment_not_isRoot_of_rev_roots_gt_count_sub_eq_two + hcomp hf_pos hg_pos hdeg hf_split hβ0 hβ1 hxf hxg hgap + have hcard : + ((f.roots.filter (x < ·)).card : ℤ) = (g.roots.filter (x < ·)).card := by + exact_mod_cast + hcomp.succDegree_card_roots_gt_eq_of_closedSegment + hf_pos hg_pos hdeg hf_split hxf hxg hseg + linarith + +/-- For a compatible successor-degree pair with positive leading coefficients +and split lower-degree endpoint, the upper root counts at every common non-root +threshold differ by at most one. The proof is by strong induction on the lower +endpoint degree: low degrees are explicit, while degree at least two uses +derivative induction for the gap-at-most-two bound and +`Compatible.succDegree_rootCountAbove_sub_ne_two` to rule out the remaining +exact gap. -/ +theorem compatibleSuccDegree_rootCountAbove_diff_le_one_of_nonRoot + ⦃f g : ℝ[X]⦄ (hcomp : Compatible f g) + (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (hdeg : g.natDegree = f.natDegree + 1) (hf_split : f.Splits) : + ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → + ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ + ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 := by have hmain : ∀ n : ℕ, ∀ {f g : ℝ[X]}, f.natDegree = n → @@ -63,39 +150,14 @@ theorem compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo compatibleSuccDegreeRootCountAbove_le_two_of_derivative_bound hcomp hf_pos hg_pos hdeg hf_split hfdeg hder_bound x obtain ⟨hfg_ne2, hgf_ne2⟩ := - hgap hcomp hf_pos hg_pos hdeg hf_split x hxf hxg + hcomp.succDegree_rootCountAbove_sub_ne_two hf_pos hg_pos hdeg hf_split hxf hxg exact ⟨int_le_one_of_le_two_ne_two hfg_le2 hfg_ne2, int_le_one_of_le_two_ne_two hgf_le2 hgf_ne2⟩ · have hfdeg_le_one : f.natDegree ≤ 1 := Nat.lt_succ_iff.mp (Nat.lt_of_not_ge hfdeg) exact compatibleSuccDegreeRootCountAbove_of_natDegree_le_one hcomp hf_pos hg_pos hdeg hf_split hfdeg_le_one x - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg + intro x hxf hxg exact hmain f.natDegree rfl hcomp hf_pos hg_pos hdeg hf_split x hxf hxg -/-- The closed-segment no-gap-two theorem closes the compatible succ-degree -common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegment - (hclosed : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - (compatibleSuccDegreeRootCountAboveNoGapTwo_of_closedSegment hclosed) - -/-- Closed-segment endpoint count equality closes the compatible succ-degree -common-non-root upper root-count leaf. -/ -theorem compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := - compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegment - (compatibleSuccDegreeClosedSegmentNoGapTwo_of_countEq hcount) - -/-- Closed-segment endpoint count equality also supplies the positive-combo -succ-degree common-non-root upper root-count leaf used by the repaired #42 -pair-interleaver route. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq hcount) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean index 663584c6d..526fbdc92 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/RootCount.lean @@ -1,10 +1,7 @@ import RealRooted.CommonInterleaver.PairBridge.Forward /-! -# Pair bridge succ-degree root-count reductions - -Orientation, root-count, residual, lead, and divX reductions for the -succ-degree case. +# Succ-degree root counts from a common left interleaver -/ open Polynomial @@ -14,8 +11,7 @@ noncomputable section namespace RealRooted /-- Common-left-interleaver formulation of the succ-degree no-common -root-count target. This isolates the Obreschkoff-converse content needed for -the honest common-non-root leaf. -/ +root-count bound, kept only for its `LiuOppositeSigns` callers. -/ def PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → @@ -28,16 +24,20 @@ def PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement : Prop := f.Splits → ∃ h : ℝ[X], StrictInterl h f ∧ StrictInterl h g -/-- A common left interleaver gives the lower common-non-root succ-degree -root-count target. The degrees force the left interleaver to have the same +/-- A common left interleaver gives the succ-degree common-non-root upper +root-count bound. The degrees force the left interleaver to have the same degree as `f`, so the same-degree and tight succ-degree oriented count bounds combine directly. -/ -theorem posComboNoCommonSuccDegreeRootCountNonRoot_of_commonLeftInterleaver +theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_commonLeftInterleaver (hleft : PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement := by + PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split x _hxf _hxg obtain ⟨h, hhf, hhg⟩ := hleft hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split + have hg_split : g.Splits := + (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 + refine (succDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise + hf_split hg_split hdeg x).mpr ?_ have hhf_le := hhf.natDegree_le have hhg_le_succ := hhg.natDegree_le_succ have hdh : f.natDegree = h.natDegree := by lia @@ -46,31 +46,4 @@ theorem posComboNoCommonSuccDegreeRootCountNonRoot_of_commonLeftInterleaver obtain ⟨hB1, hB2⟩ := succDegreeRootCountLowerOriented_of_strictInterl hhg hdg x exact ⟨by lia, by lia⟩ -/-- The honest common-non-root upper-count succ-degree leaf, reduced to the -common-left-interleaver formulation. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_commonLeftInterleaver - (hleft : PosComboNoCommonSuccDegreeCommonLeftInterleaverNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := - posComboNoCommonSuccDegreeRootCountAboveNonRoot_iff_rootCountNonRoot.mpr - (posComboNoCommonSuccDegreeRootCountNonRoot_of_commonLeftInterleaver hleft) - -/-- The upper-threshold succ-degree root-count formulation implies the -descending-root crossing formulation. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact succDegreeRootCrossing_of_rootCountAbove hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) - -/-- The succ-degree root-crossing target follows from the upper common-non-root -root-count formulation. -/ -theorem posComboNoCommonSuccDegreeRootCrossing_of_rootCountAboveNonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeRootCrossingNonnegStatement := - posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove - (posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot hcount) - end RealRooted diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean index f247956a2..9611a3013 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean @@ -1,10 +1,12 @@ import RealRooted.CommonInterleaver.PairBridge.SuccDegree /-! -# Pair bridge assembly: succ-degree slot data +# Succ-degree case of the two-polynomial common-interleaver theorem -Slot-data constructors and common-interleaver wrappers built from the -succ-degree root-count and root-crossing core. +For a successor-degree pair whose positive combinations are real-rooted, the +lower-degree member splits, the pair is compatible, the upper root counts +differ by at most one at every threshold, and the descending roots therefore +weave into a common interleaver. -/ open Polynomial @@ -13,86 +15,37 @@ noncomputable section namespace RealRooted -/-- **Decomposition of milestone B2 into its two honest remaining pieces.** - -The succ-degree slot-data statement follows from left-endpoint real-rootedness -of `f` (`PosComboSuccDegreeLeftSplitsNonnegStatement`) together with the -descending-root crossing inequalities -(`PosComboNoCommonSuccDegreeRootCrossingNonnegStatement`); the combinatorial -step is discharged by `rootSlotInterval_inter_nonempty_of_crossing`. Via -`posComboNoCommonSuccDegreeSlotData_iff_pairHasCommonInterleaver` this reduces -the corrected common-right-interleaver target for milestone B2 (#42) to these -two analytic statements. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_leftSplits_and_rootCrossing - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc hno - have hf_split : f.Splits := hsplit hf_pos hg_pos hfnn hgnn hfg hsucc - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hsucc).2 - refine ⟨⟨HasPosLeadingCoeff.ne_zero hf_pos, hf_split⟩, ?_⟩ - obtain ⟨hc1, hc2⟩ := hcross hf_pos hg_pos hfnn hgnn hfg hsucc hno hf_split +/-- **Successor-degree case of Chudnovsky--Seymour for two polynomials.** If +every positive combination of `f` and `g` is real-rooted, `f` and `g` have +positive leading coefficients and `g.natDegree = f.natDegree + 1`, then they +have a common interleaver. -/ +theorem pairHasCommonInterleaver_of_posCombo_succDegree + {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (hfg : PosComboRealRooted f g) (hsucc : g.natDegree = f.natDegree + 1) : + ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by + have hf_split : f.Splits := + splits_of_add_C_mul_family_of_succDegree + (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc + have hg_rr : g ≠ 0 ∧ g.Splits := + hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hsucc + have hcomp : Compatible f g := + Compatible.of_posComboRealRooted_succDegree hfg hf_pos hg_pos hsucc hf_split + obtain ⟨hc1, hc2⟩ := + succDegreeRootCrossing_of_rootCountAbove hf_split hg_rr.2 hsucc <| + rootCountAbove_diff_le_one_of_nonRoot_isRoot hf_pos.ne_zero hg_rr.1 <| + compatibleSuccDegree_rootCountAbove_diff_le_one_of_nonRoot + hcomp hf_pos hg_pos hsucc hf_split have hlenf : (rootSeqDesc f).length = f.natDegree := rootSeqDesc_length hf_split - have hleng : (rootSeqDesc g).length = g.natDegree := rootSeqDesc_length hg_split - intro j _ hjf hjg + have hleng : (rootSeqDesc g).length = g.natDegree := rootSeqDesc_length hg_rr.2 + refine pairHasCommonInterleaver_of_succDegree_slotIntersections + hf_pos.ne_zero hg_rr.1 hf_split hg_rr.2 hsucc ?_ + intro j _ exact rootSlotInterval_inter_nonempty_of_crossing (rootSeqDesc f) (rootSeqDesc g) rootSeqDesc_pairwise rootSeqDesc_pairwise (by rw [hleng, hlenf, hsucc]) (fun k hk1 hk2 => hc1 k hk1 (by rw [hlenf] at hk2; exact hk2)) (fun k hk1 hk2 => hc2 k hk1 (by rw [hlenf] at hk2; exact hk2)) - j hjf hjg - -/-- The corrected succ-degree pair-interleaver endpoint follows directly from -left-endpoint real-rootedness and the succ-degree descending-root crossing -inequalities. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_leftSplits_and_rootCrossing - (hsplit : PosComboSuccDegreeLeftSplitsNonnegStatement) - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_slotData - (posComboNoCommonSuccDegreeSlotData_of_leftSplits_and_rootCrossing hsplit hcross) - -/-- Succ-degree slot data from the unconditional root-continuity left endpoint -and the descending-root crossing inequalities. -/ -theorem posComboNoCommonSuccDegreeSlotData_of_rootCrossing - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreeSlotDataNonnegStatement := - posComboNoCommonSuccDegreeSlotData_of_leftSplits_and_rootCrossing - PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity hcross - -/-- The corrected succ-degree pair-interleaver endpoint follows from the -succ-degree descending-root crossing inequalities alone; root continuity -supplies the left endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_slotData - (posComboNoCommonSuccDegreeSlotData_of_rootCrossing hcross) - -/-- The corrected succ-degree pair-interleaver endpoint follows directly from -the upper-threshold root-count formulation. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (posComboNoCommonSuccDegreeRootCrossing_of_rootCountAbove hcount) - -/-- The repaired succ-degree pair-interleaver endpoint follows from the -common-non-root upper-threshold root-count formulation. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove - (posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot hcount) - -/-- Closed-segment endpoint count equality supplies the repaired succ-degree -#42 pair-interleaver endpoint. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentCountEq - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := - succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - (posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq hcount) + j _ _ end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade.lean index 171e9406e..fd307ad34 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade.lean @@ -1,8 +1,8 @@ /- # Pairwise finite-family common-interleaver upgrades -This module lifts compatible pairs and pair-bridge hypotheses to pairwise -common-interleaver witnesses. Generic global and full-family compatibility +This module lifts a two-polynomial common-interleaver theorem to pairwise +common-interleaver witnesses for a family. Generic global and full-family compatibility packaging lives in `PairwiseUpgrade.FamilyCompatibility`. -/ import RealRooted.CommonInterleaver.PairBridge @@ -13,55 +13,24 @@ noncomputable section namespace RealRooted -/-- Internal degree-split pair bridge shared with the four-way package. -/ -protected theorem PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := - fun {_ _} hf_pos hg_pos hfnn hgnn hfg => - compatiblePairHasCommonInterleaver_of_pairDegreeSplit_and_nonnegCoeffs - hsame hsucc hf_pos hg_pos hfnn hgnn hfg - -/-- Pairwise upgrade using the natural positive-leading two-polynomial bridge. -/ +/-- A pairwise compatible family with positive leading coefficients has pairwise +common interleavers, given the two-polynomial common-interleaver theorem +`htwo`. -/ theorem pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos {fs : List ℝ[X]} - (htwo : CompatiblePairHasCommonInterleaverStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonInterleaver fs := - fun i j hij => - htwo - (hpos (fs.get i) (List.get_mem _ _)) - (hpos (fs.get j) (List.get_mem _ _)) - (hpair i j hij) - -/-- Internal pairwise-family lift shared with the four-way package. -/ -protected theorem PairwiseUpgrade.pairwiseHasCommonInterleaver_of_nonnegPairBridge - {fs : List ℝ[X]} - (hbridge : + (htwo : ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → Compatible f g → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) (hpair : PairwiseCompatible fs) : PairwiseHasCommonInterleaver fs := fun i j hij => - hbridge + htwo (hpos (fs.get i) (List.get_mem _ _)) (hpos (fs.get j) (List.get_mem _ _)) - (hnn (fs.get i) (List.get_mem _ _)) - (hnn (fs.get j) (List.get_mem _ _)) (hpair i j hij) end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean index 060a43266..48dae8864 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay.lean @@ -37,7 +37,7 @@ private theorem chudnovskySeymour_fourWay_of_pairwiseCompatible_iff_pairwiseComm fun hfull => h23.1 (h12.1 (pairwiseCompatible_of_familyCompatible hfull))⟩ exact ⟨h12, h23, h34⟩ -/-- Internal four-way assembly bridge shared with the low-degree package. -/ +/-- Internal four-way assembly shared with the low-degree package. -/ protected theorem PairwiseUpgrade.fourWay_of_pairwiseCommonForward {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) @@ -47,47 +47,20 @@ protected theorem PairwiseUpgrade.fourWay_of_pairwiseCommonForward chudnovskySeymour_fourWay_of_pairwiseCompatible_iff_pairwiseCommon hrr hpos ⟨hforward, fun hpair => pairwiseCompatible_of_pairwiseHasCommonInterleaver hpair hpos⟩ -/-- Chudnovsky--Seymour four-way package with the natural two-polynomial bridge -assumption (requiring positive leading coefficients on the pair). -/ +/-- The four-way package for a family follows from the two-polynomial +common-interleaver theorem `htwo` by the finite Helly upgrade. -/ theorem chudnovskySeymour_fourWay_of_pairBridgePos {fs : List ℝ[X]} (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (htwo : CompatiblePairHasCommonInterleaverStatement) : - ChudnovskySeymourFourWayPackage fs := - PairwiseUpgrade.fourWay_of_pairwiseCommonForward hrr hpos <| - pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos htwo hpos - -/-- Internal four-way package constructor shared with the equivalence layer. -/ -protected theorem PairwiseUpgrade.fourWay_of_nonnegPairBridge - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hbridge : + (htwo : ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → Compatible f g → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) : ChudnovskySeymourFourWayPackage fs := PairwiseUpgrade.fourWay_of_pairwiseCommonForward hrr hpos <| - PairwiseUpgrade.pairwiseHasCommonInterleaver_of_nonnegPairBridge hbridge hpos hnn - -/-- Four-way Chudnovsky--Seymour package in the nonnegative-coefficient regime -from the repaired degree split: both same-degree and succ-degree no-common -branches are stated directly as common-interleaver bridges. -/ -theorem chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := - PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn - (PairwiseUpgrade.nonnegPairBridge_of_pairDegreeSplit hsame hsucc) + pairwiseHasCommonInterleaver_of_pairwiseCompatible_of_pairBridgePos htwo hpos end RealRooted diff --git a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean index 4883df4e6..0bb430c27 100644 --- a/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean +++ b/RealRooted/CommonInterleaver/PairwiseUpgrade/FourWay/Equivalences.lean @@ -54,48 +54,4 @@ theorem pairwiseCompatible_iff_familyCompatible_of_fourWay (pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay hfour).trans (hasCommonInterleaver_iff_familyCompatible_of_fourWay hfour) -/-- Chudnovsky--Seymour `1 ↔ 3` corollary under the natural positive-leading -pair bridge. -/ -theorem pairwiseCompatible_iff_hasCommonInterleaver_of_pairBridgePos - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (htwo : CompatiblePairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - chudnovskySeymour_fourWay_of_pairBridgePos - (fs := fs) hrr hpos htwo - -/-- Chudnovsky--Seymour `1 ↔ 4` corollary under the natural positive-leading -pair bridge: pairwise compatibility is equivalent to full family -compatibility. -/ -theorem pairwiseCompatible_iff_familyCompatible_of_pairBridgePos - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (htwo : CompatiblePairHasCommonInterleaverStatement) : - PairwiseCompatible fs ↔ FamilyCompatible fs := - pairwiseCompatible_iff_familyCompatible_of_commonInterleaver_forward hpos <| - (pairwiseCompatible_iff_hasCommonInterleaver_of_pairBridgePos - (fs := fs) hrr hpos htwo).1 - -/-- Nonnegative-coefficient specialization of Chudnovsky--Seymour `1 ↔ 3` -from a direct nonnegative pair bridge. -/ -private theorem pairwiseCompatible_iff_hasCommonInterleaver_of_nonnegPairBridge - {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hbridge : - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h) : - PairwiseCompatible fs ↔ HasCommonInterleaver fs := - pairwiseCompatible_iff_hasCommonInterleaver_of_fourWay <| - PairwiseUpgrade.fourWay_of_nonnegPairBridge hrr hpos hnn hbridge - end RealRooted diff --git a/RealRooted/CommonInterleaver/RightPencil.lean b/RealRooted/CommonInterleaver/RightPencil.lean index 4d248bdf0..dcd0f9b84 100644 --- a/RealRooted/CommonInterleaver/RightPencil.lean +++ b/RealRooted/CommonInterleaver/RightPencil.lean @@ -72,39 +72,6 @@ theorem succDegree_closedSegment_derivative_splits closedSegment_derivative_splits_of_ne hseg hβ0 hβ1 (succDegree_closedSegment_derivative_ne_zero hg_pos hdeg hfdeg hβ0) -/-- Closed-segment form of the exact gap-two obstruction. This is the -continuity/count target left after the sign argument has shown that the fixed -threshold is never a root along the closed segment from `f` to `g`. -/ -def CompatibleSuccDegreeClosedSegmentNoGapTwoStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - (∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → - ¬ (C (1 - β) * f + C β * g).IsRoot x) → - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≠ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≠ 2 - -/-- Closed-segment endpoint count-equality formulation. This is the precise -count-stability theorem suggested by the root-continuity route: if a fixed -threshold is never crossed along the closed segment from the lower-degree -endpoint to the higher-degree endpoint, then the endpoint upper root counts at -that threshold agree. -/ -def CompatibleSuccDegreeClosedSegmentCountEqStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - (∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → - ¬ (C (1 - β) * f + C β * g).IsRoot x) → - (f.roots.filter (x < ·)).card = (g.roots.filter (x < ·)).card - /-- Succ-degree right-pencil parity bridge for upper root counts. -/ theorem succDegree_odd_roots_gt_count_sub_iff_exists_pos_isRoot_add_right {f g : ℝ[X]} @@ -651,44 +618,6 @@ lemma splits_of_comp_X_add_C_splits simpa [Polynomial.comp_assoc, add_assoc, add_left_comm, add_comm, sub_eq_add_neg] using hback.2 -/-- Closed-segment endpoint count equality excludes both exact upper -root-count gaps of two. -/ -theorem compatibleSuccDegreeClosedSegmentNoGapTwo_of_countEq - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - CompatibleSuccDegreeClosedSegmentNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - have hcard := hcount hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg - have hcard_int : - ((f.roots.filter (x < ·)).card : ℤ) = - (g.roots.filter (x < ·)).card := by - exact_mod_cast hcard - constructor <;> intro hgap <;> linarith - -/-- The closed-segment no-gap-two theorem implies the compatible exact -gap-two obstruction, since an assumed exact gap two supplies the required -closed-segment nonvanishing by the endpoint sign lemma. -/ -theorem compatibleSuccDegreeRootCountAboveNoGapTwo_of_closedSegment - (hclosed : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNoGapTwoStatement := by - intro f g hcomp hf_pos hg_pos hdeg hf_split x hxf hxg - constructor - · intro hcount - have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → - ¬ (C (1 - β) * f + C β * g).IsRoot x := by - intro β hβ0 hβ1 - exact - compatibleSuccDegree_closedSegment_not_isRoot_of_roots_gt_count_sub_eq_two - hcomp hf_pos hg_pos hdeg hf_split hβ0 hβ1 hxf hxg hcount - exact (hclosed hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg).1 hcount - · intro hcount - have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → - ¬ (C (1 - β) * f + C β * g).IsRoot x := by - intro β hβ0 hβ1 - exact - compatibleSuccDegree_closedSegment_not_isRoot_of_rev_roots_gt_count_sub_eq_two - hcomp hf_pos hg_pos hdeg hf_split hβ0 hβ1 hxf hxg hcount - exact (hclosed hcomp hf_pos hg_pos hdeg hf_split x hxf hxg hseg).2 hcount - /-- If the threshold is never a root of a nonnegative right-pencil member, then the forward upper root-count difference has even parity. -/ theorem succDegree_even_roots_gt_count_sub_of_no_rightFamily_isRoot diff --git a/RealRooted/CommonInterleaver/RootCountCombinatorics.lean b/RealRooted/CommonInterleaver/RootCountCombinatorics.lean index 8aff22563..e095fdbce 100644 --- a/RealRooted/CommonInterleaver/RootCountCombinatorics.lean +++ b/RealRooted/CommonInterleaver/RootCountCombinatorics.lean @@ -18,48 +18,10 @@ noncomputable section namespace RealRooted -/-- **Sub-statement B of milestone B2: descending-root crossing inequalities.** - -Given the nonnegative positive-combination/no-common hypotheses at succ degree -and that `f` already splits, the descending root sequences of `f` and `g` weave -in the two clean crossing inequalities consumed by -`rootSlotInterval_inter_nonempty_of_crossing`. This is the genuine analytic -converse-Obreschkoff crossing content for the succ-degree case, now separated -from the proved combinatorial slot construction. -/ -def PosComboNoCommonSuccDegreeRootCrossingNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - (∀ j, 1 ≤ j → j ≤ f.natDegree → - (rootSeqDesc g).getD j 0 ≤ (rootSeqDesc f).getD (j - 1) 0) ∧ - (∀ j, 1 ≤ j → j < f.natDegree → - (rootSeqDesc f).getD j 0 ≤ (rootSeqDesc g).getD (j - 1) 0) - -/-- **Upper-threshold version of the succ-degree root-count formulation.** - -This is the form naturally suggested by the root-continuity proof route: the -numbers of roots strictly above each threshold differ by at most one. -/ -def PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - ∀ x : ℝ, - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 - -/-- Common-non-root version of the succ-degree upper root-count formulation. -/ +/-- Common-non-root version of the succ-degree upper root-count formulation. +This holds for every such pair (see +`compatibleSuccDegree_rootCountAbove_diff_le_one_of_nonRoot`); the proposition +is kept only for its `LiuOppositeSigns` callers. -/ def PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → @@ -75,9 +37,9 @@ def PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement : Prop := ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 /-- Compatible-pair version of the succ-degree common-non-root upper -root-count leaf. This strips the #42 target down to the Chudnovsky--Seymour -compatibility input, positive leading coefficients, the succ-degree condition, -and splitting of the lower-degree endpoint. -/ +root-count bound. It is proved by +`compatibleSuccDegree_rootCountAbove_diff_le_one_of_nonRoot`; the proposition +is kept only for its `LiuOppositeSigns` callers. -/ def CompatibleSuccDegreeRootCountAboveNonRootStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, Compatible f g → @@ -89,35 +51,12 @@ def CompatibleSuccDegreeRootCountAboveNonRootStatement : Prop := ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 -/-- Exact gap-two obstruction for the compatible succ-degree common-non-root -upper root-count leaf. -/ -def CompatibleSuccDegreeRootCountAboveNoGapTwoStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - Compatible f g → - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - g.natDegree = f.natDegree + 1 → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≠ 2 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≠ 2 - /-- An integer bounded above by two but not equal to two is bounded above by one. -/ theorem int_le_one_of_le_two_ne_two {z : ℤ} (hzle : z ≤ 2) (hzne : z ≠ 2) : z ≤ 1 := by have hzlt : z < 2 := lt_of_le_of_ne hzle hzne exact Int.lt_add_one_iff.mp (by simpa using hzlt) -/-- The compatible CS 3.4 root-count leaf implies the #42 positive-combo -succ-degree root-count leaf. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - intro f g hf_pos hg_pos _hfnn _hgnn hfg hdeg _hno hf_split x hxf hxg - exact hcount - (Compatible.of_posComboRealRooted_succDegree hfg hf_pos hg_pos hdeg hf_split) - hf_pos hg_pos hdeg hf_split x hxf hxg - /-- Differentiating a succ-degree pair preserves the succ-degree relation, provided the lower-degree endpoint has positive degree. -/ theorem succDegree_derivative_natDegree_eq @@ -216,21 +155,6 @@ theorem succDegreeRootCountAbove_oriented_iff_rootCount_oriented_pointwise have hdegZ : (g.natDegree : ℤ) = (f.natDegree : ℤ) + 1 := by exact_mod_cast hdeg constructor <;> · rintro ⟨h1, h2⟩; constructor <;> lia -/-- Common-non-root version of the succ-degree lower root-count formulation. -/ -def PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - f.Splits → - ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → - ((f.roots.filter (· ≤ x)).card : ℤ) - (g.roots.filter (· ≤ x)).card ≤ 0 ∧ - ((g.roots.filter (· ≤ x)).card : ℤ) - (f.roots.filter (· ≤ x)).card ≤ 2 - /-- At a fixed threshold, the succ-degree upper common-non-root bounds are equivalent to the lower common-non-root bounds. -/ theorem succDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise @@ -293,25 +217,6 @@ theorem succDegree_rev_roots_gt_count_sub_eq_two_iff_roots_le_sub_eq_one have hdegZ : (g.natDegree : ℤ) = (f.natDegree : ℤ) + 1 := by exact_mod_cast hdeg constructor <;> intro h <;> lia -/-- The succ-degree upper common-non-root root-count target is equivalent to -the lower common-non-root root-count target. -/ -theorem posComboNoCommonSuccDegreeRootCountAboveNonRoot_iff_rootCountNonRoot : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement ↔ - PosComboNoCommonSuccDegreeRootCountNonRootNonnegStatement := by - constructor - · intro hcount f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split x hxf hxg - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact (succDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise - hf_split hg_split hdeg x).mp - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split x hxf hxg) - · intro hcount f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split x hxf hxg - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).2 - exact (succDegreeRootCountAbove_nonRoot_iff_rootCount_nonRoot_pointwise - hf_split hg_split hdeg x).mpr - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split x hxf hxg) - /-- Root-count bridge for the succ-degree root-crossing target. The asymmetric lower-threshold count inequalities encode the fact that `g` @@ -834,15 +739,4 @@ theorem sameDegreeRootCountOriented_of_strictInterl rw [hpcard, hqcard] constructor <;> lia -/-- The succ-degree upper root-count target follows from its common-non-root -variant. -/ -theorem posComboNoCommonSuccDegreeRootCountAbove_of_nonRoot - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split - have hg_ne : g ≠ 0 := - (hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hdeg).1 - exact rootCountAbove_diff_le_one_of_nonRoot_isRoot hf_pos.ne_zero hg_ne - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno hf_split) - end RealRooted diff --git a/RealRooted/CommonInterleaver/SameDegreeRootCount.lean b/RealRooted/CommonInterleaver/SameDegreeRootCount.lean index 1a4c9bbaa..b34446841 100644 --- a/RealRooted/CommonInterleaver/SameDegreeRootCount.lean +++ b/RealRooted/CommonInterleaver/SameDegreeRootCount.lean @@ -1,12 +1,12 @@ /- # Same-degree root-count theory for common interleavers -Same-degree slot-data, root-crossing, root-count, and low-degree endpoint -bridges extracted from `RealRooted.CommonInterleaverTwo`. +Same-degree root-slot intersections, root crossings, root counts, and their +low-degree cases. -/ import RealRooted.AffineFamily import RealRooted.CommonInterleaver.IntervalLemmas -import RealRooted.CommonInterleaver.Statements +import RealRooted.AllCombo import RealRooted.CommonInterleaverSeq import RealRooted.PosCombo import RealRooted.RootCountJump @@ -20,49 +20,6 @@ noncomputable section namespace RealRooted -/-- **Honest missing root-slot boundary for milestone B1 (#41).** - -This is the same-degree analogue of -`PosComboNoCommonSuccDegreeSlotDataNonnegStatement`. For a nonnegative -positive-combination pair with no common roots and `g.natDegree = f.natDegree`, -it packages the remaining converse-Obreschkoff content as nonempty -intersections of matching descending root-slot intervals. - -The real-rootedness of `f` and `g` is not bundled here because it is already -available from the same-degree `PosComboRealRooted` lemmas. -/ -def PosComboNoCommonSameDegreeSlotDataNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ j, j < f.natDegree + 1 → - ∀ (hjf : j < (rootSeqDesc f).length + 1) - (hjg : j < (rootSeqDesc g).length + 1), - (rootSlotInterval (rootSeqDesc f) ⟨j, hjf⟩ ∩ - rootSlotInterval (rootSeqDesc g) ⟨j, hjg⟩).Nonempty - -/-- **Checked reduction of #41 to the same-degree root-slot boundary.** - -The repaired same-degree common-right-interleaver endpoint follows from the -matching slot-intersection condition via the constructive slot theorem in -`CommonInterleaverSeq`. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_slotData - (hstmt : PosComboNoCommonSameDegreeSlotDataNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_rr : f ≠ 0 ∧ f.Splits := - hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg - have hg_rr : g ≠ 0 ∧ g.Splits := - hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg - exact - pairHasCommonInterleaver_of_sameDegree_slotIntersections - hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hdeg <| - fun j hj => hstmt hf_pos hg_pos hfnn hgnn hfg hdeg hno j hj _ _ - /-- **Combinatorial core of the same-degree slot bound.** For descending real lists `rf` and `rg` of the same length, if their interior @@ -123,45 +80,10 @@ theorem rootSlotInterval_inter_nonempty_of_sameDegree_crossing simpa [rootSlotInterval, hj0, hjlast, hlen] using icc_inter_icc_nonempty_of_crossing hrf_step hrg_step hcross_fg hcross_gf -/-- **Sub-statement of milestone B1: descending-root crossing inequalities.** - -Given the nonnegative positive-combination/no-common hypotheses at equal -degree, the descending root sequences of `f` and `g` should cross in the two -interior inequalities consumed by -`rootSlotInterval_inter_nonempty_of_sameDegree_crossing`. -/ -def PosComboNoCommonSameDegreeRootCrossingNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - (∀ j, 1 ≤ j → j < f.natDegree → - (rootSeqDesc g).getD j 0 ≤ (rootSeqDesc f).getD (j - 1) 0) ∧ - (∀ j, 1 ≤ j → j < f.natDegree → - (rootSeqDesc f).getD j 0 ≤ (rootSeqDesc g).getD (j - 1) 0) - -/-- **Upper-threshold version of the same-degree root-count formulation.** - -This is the form naturally paired with sign-count lemmas, since the sign of a -split polynomial at `x` is controlled by the number of roots strictly above -`x`. -/ -def PosComboNoCommonSameDegreeRootCountAboveNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∀ x : ℝ, - ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ - ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1 - -/-- Non-root-threshold version of the same-degree upper root-count target. -/ +/-- Non-root-threshold version of the same-degree upper root-count bound. It +holds for every such pair (see +`sameDegree_rootCountAbove_bounds_of_posCombo_noCommon`); the proposition is +kept only for its `LiuOppositeSigns` callers. -/ def PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → @@ -456,28 +378,6 @@ theorem sameDegreeRootCountAbove_of_rootCount have hNcard : g.roots.card = f.natDegree := by rw [card_roots_of_splits hg, hdeg] exact count_gt_diff_le_one_of_count_le_diff_le_one hMcard hNcard hcount -/-- The upper-threshold same-degree root-count formulation implies the -descending-root crossing formulation. -/ -theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - exact rootCrossing_of_rootCountAbove_diff_le_one hf_split hg_split hdeg - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - -/-- The same-degree upper root-count target follows from its common-non-root -variant. -/ -theorem posComboNoCommonSameDegreeRootCountAbove_of_nonRoot - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSameDegreeRootCountAboveNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - exact rootCountAbove_diff_le_one_of_nonRoot_isRoot hf_pos.ne_zero hg_pos.ne_zero - (hcount hf_pos hg_pos hfnn hgnn hfg hdeg hno) - /-- Low-degree base case for the same-degree root-count formulation. If `f` and `g` split, have equal degree, and `f.natDegree ≤ 1`, then at every @@ -754,61 +654,43 @@ theorem sameDegreeRootCrossing_of_posCombo_natDegree_le_three_of_cubicInterior rootCountAbove_diff_le_one_of_posCombo_sameDegree_natDegree_le_three_of_cubicInterior hbelow habove hf_pos hg_pos hfnn hgnn hfg hdeg hno hfdeg x) -/-- **Reduction of milestone B1 to its root-crossing content.** - -The same-degree slot-data statement follows from the descending-root crossing -inequalities; the remaining work is therefore the analytic converse-Obreschkoff -crossing input. -/ -theorem posComboNoCommonSameDegreeSlotData_of_rootCrossing - (hcross : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSameDegreeSlotDataNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hdeg hno - have hf_split : f.Splits := - (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 - have hg_split : g.Splits := - (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 - obtain ⟨hc1, hc2⟩ := hcross hf_pos hg_pos hfnn hgnn hfg hdeg hno +/-- A same-degree pair of split polynomials whose descending roots cross in +both interior inequalities has a common interleaver: every matching root-slot +interval meets. -/ +theorem pairHasCommonInterleaver_of_sameDegree_rootCrossing + {f g : ℝ[X]} (hf : f ≠ 0) (hg : g ≠ 0) (hf_split : f.Splits) (hg_split : g.Splits) + (hdeg : g.natDegree = f.natDegree) + (hcross : + (∀ j, 1 ≤ j → j < f.natDegree → + (rootSeqDesc g).getD j 0 ≤ (rootSeqDesc f).getD (j - 1) 0) ∧ + (∀ j, 1 ≤ j → j < f.natDegree → + (rootSeqDesc f).getD j 0 ≤ (rootSeqDesc g).getD (j - 1) 0)) : + ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by + obtain ⟨hc1, hc2⟩ := hcross have hlenf : (rootSeqDesc f).length = f.natDegree := rootSeqDesc_length hf_split have hleng : (rootSeqDesc g).length = g.natDegree := rootSeqDesc_length hg_split - intro j _ hjf hjg + refine pairHasCommonInterleaver_of_sameDegree_slotIntersections + hf hg hf_split hg_split hdeg ?_ + intro j _ exact rootSlotInterval_inter_nonempty_of_sameDegree_crossing (rootSeqDesc f) (rootSeqDesc g) rootSeqDesc_pairwise rootSeqDesc_pairwise (by rw [hleng, hlenf, hdeg]) (fun k hk1 hk2 => hc1 k hk1 (by rw [hlenf] at hk2; exact hk2)) (fun k hk1 hk2 => hc2 k hk1 (by rw [hlenf] at hk2; exact hk2)) - j hjf hjg - -/-- The repaired same-degree pair-interleaver endpoint follows directly from -the same-degree descending-root crossing inequalities. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (hcross : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_slotData - (posComboNoCommonSameDegreeSlotData_of_rootCrossing hcross) - -/-- The repaired same-degree pair-interleaver endpoint follows directly from -the upper-threshold analytic root-count formulation. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - (posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove hcount) - -/-- Same-degree root crossing from the common-non-root upper-threshold -root-count formulation. -/ -theorem posComboNoCommonSameDegreeRootCrossing_of_rootCountAboveNonRoot - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSameDegreeRootCrossingNonnegStatement := - posComboNoCommonSameDegreeRootCrossing_of_rootCountAbove - (posComboNoCommonSameDegreeRootCountAbove_of_nonRoot hcount) - -/-- The repaired same-degree pair-interleaver endpoint follows from the -common-non-root upper-threshold root-count formulation. -/ -theorem sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAboveNonRoot - (hcount : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove - (posComboNoCommonSameDegreeRootCountAbove_of_nonRoot hcount) + j _ _ + +/-- A same-degree pair of split polynomials whose upper root counts differ by at +most one at every common non-root threshold has a common interleaver. -/ +theorem pairHasCommonInterleaver_of_sameDegree_rootCountAbove_nonRoot + {f g : ℝ[X]} (hf : f ≠ 0) (hg : g ≠ 0) (hf_split : f.Splits) (hg_split : g.Splits) + (hdeg : g.natDegree = f.natDegree) + (hcount : ∀ x : ℝ, ¬ f.IsRoot x → ¬ g.IsRoot x → + ((f.roots.filter (x < ·)).card : ℤ) - (g.roots.filter (x < ·)).card ≤ 1 ∧ + ((g.roots.filter (x < ·)).card : ℤ) - (f.roots.filter (x < ·)).card ≤ 1) : + ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := + pairHasCommonInterleaver_of_sameDegree_rootCrossing hf hg hf_split hg_split hdeg <| + rootCrossing_of_rootCountAbove_diff_le_one hf_split hg_split hdeg <| + rootCountAbove_diff_le_one_of_nonRoot_isRoot hf hg hcount end RealRooted diff --git a/RealRooted/CommonInterleaver/Statements.lean b/RealRooted/CommonInterleaver/Statements.lean deleted file mode 100644 index 20347d284..000000000 --- a/RealRooted/CommonInterleaver/Statements.lean +++ /dev/null @@ -1,45 +0,0 @@ -/- -# Common-interleaver statement aliases - -Shared positive-combination statement aliases used by the CommonInterleaverTwo -converse package and its extracted submodules. --/ -import RealRooted.AllCombo - -open Polynomial - -noncomputable section - -namespace RealRooted - -/-- Repaired same-degree no-common target in the nonnegative regime. The -orientation alternative is too strong in degree `2`; for the -Chudnovsky--Seymour bridge the needed conclusion is only a common right -interleaver. -/ -def PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -/-- Repaired succ-degree no-common target for the Chudnovsky--Seymour bridge -in the nonnegative regime: when the right degree is exactly one larger, the -needed conclusion is the existence of a common interleaver, not a fixed -orientation between `f` and `g`. -/ -def PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h - -end RealRooted diff --git a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean index fae96d592..16ead80d2 100644 --- a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean +++ b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean @@ -1,13 +1,13 @@ /- -# Succ-degree endpoint and degree-drop reductions +# Succ-degree slots and the left endpoint -Succ-degree slot-data and left-endpoint reductions extracted from -`RealRooted.CommonInterleaverTwo`. +Root-slot intersections for succ-degree crossings, left-endpoint +real-rootedness, and degree-drop root-count lemmas. -/ import RealRooted.AffineFamily import RealRooted.CommonInterleaver.AffineBoundary import RealRooted.CommonInterleaver.IntervalLemmas -import RealRooted.CommonInterleaver.Statements +import RealRooted.AllCombo import RealRooted.CommonInterleaverSeq import RealRooted.DegreeDropDivXPrec import RealRooted.DegreeDropReversal @@ -22,55 +22,6 @@ noncomputable section namespace RealRooted -/-- **Honest missing root-slot boundary for milestone B2 (#42).** - -This is the succ-degree analogue of the same-degree slot-intersection input -used for #41. For a nonnegative positive-combination pair with no common -roots and `g.natDegree = f.natDegree + 1`, it packages the two remaining -pieces of the remaining converse-Obreschkoff content: - -* real-rootedness of the lower-degree member `f`, and -* the descending root-slot intervals of `f` and `g` meet in each of the - `f.natDegree + 1` common slots. - -The right endpoint `g` is now supplied by -`PosComboRealRooted.isRealRooted_right_of_succDegree`. -The `Fin` bounds are threaded as explicit hypotheses so no in-type proof -obligations remain. -/ -def PosComboNoCommonSuccDegreeSlotDataNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - (∀ r, f.IsRoot r → ¬ g.IsRoot r) → - (f ≠ 0 ∧ f.Splits) ∧ - ∀ j, j < f.natDegree + 1 → - ∀ (hjf : j < (rootSeqDesc f).length + 1) - (hjg : j < (rootSeqDesc g).length + 1), - (rootSlotInterval (rootSeqDesc f) ⟨j, hjf⟩ ∩ - rootSlotInterval (rootSeqDesc g) ⟨j, hjg⟩).Nonempty - -/-- **Checked reduction of #42 to the root-slot boundary.** - -The corrected succ-degree common-right-interleaver endpoint follows from the -precise root-slot condition `PosComboNoCommonSuccDegreeSlotDataNonnegStatement` -via the constructive slot theorem. This mirrors the same-degree slot boundary -route for #41. -/ -theorem succDegreePairHasCommonInterleaver_nonneg_of_slotData - (hstmt : PosComboNoCommonSuccDegreeSlotDataNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - intro f g hf_pos hg_pos hfnn hgnn hfg hsucc hno - obtain ⟨hf_rr, hslot⟩ := hstmt hf_pos hg_pos hfnn hgnn hfg hsucc hno - have hg_rr : g ≠ 0 ∧ g.Splits := - hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hsucc - exact - pairHasCommonInterleaver_of_succDegree_slotIntersections - hf_rr.1 hg_rr.1 hf_rr.2 hg_rr.2 hsucc <| - fun j hj => hslot j hj _ _ - /-- **Combinatorial core of the succ-degree slot bound.** For descending real lists `rf` (length `n`) and `rg` (length `n + 1`), if the @@ -117,32 +68,18 @@ theorem rootSlotInterval_inter_nonempty_of_crossing simpa [rootSlotInterval, hjn, hjg'] using icc_inter_icc_nonempty_of_crossing (hstep hrf (by lia)) (hstep hrg (by lia)) hc₂ hc₁ -/-- **Sub-statement A of milestone B2: left-endpoint real-rootedness.** - -For a nonnegative positive-combination pair `(f, g)` with positive leading -coefficients and `g.natDegree = f.natDegree + 1`, the lower-degree member `f` -splits over `ℝ`. This is the degree-drop root-continuity endpoint (`f` is the -`μ → 0⁺` limit of the real-rooted family `f + C μ * g`, whose `f.natDegree` -finite roots converge to the roots of `f` while one root escapes to `-∞`), -isolated here as a reusable statement. -/ -def PosComboSuccDegreeLeftSplitsNonnegStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - HasNonnegCoeffs f → - HasNonnegCoeffs g → - PosComboRealRooted f g → - g.natDegree = f.natDegree + 1 → - f.Splits - -/-- The succ-degree left endpoint follows directly from the escaping-root -continuity argument for the family `f + C μ * g`; no ASW input is needed. -/ -theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity : - PosComboSuccDegreeLeftSplitsNonnegStatement := by - intro f g hf_pos hg_pos _ _ hfg hsucc - exact - splits_of_add_C_mul_family_of_succDegree - (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc +/-- Left-endpoint real-rootedness for a successor-degree pair: if every +positive combination of `f` and `g` is real-rooted and +`g.natDegree = f.natDegree + 1`, then `f` splits. The proof is the +escaping-root continuity argument for the family `f + C μ * g`; the +nonnegativity hypotheses are unused and kept for existing callers. -/ +theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity + ⦃f g : ℝ[X]⦄ (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (_hfnn : HasNonnegCoeffs f) (_hgnn : HasNonnegCoeffs g) + (hfg : PosComboRealRooted f g) (hsucc : g.natDegree = f.natDegree + 1) : + f.Splits := + splits_of_add_C_mul_family_of_succDegree + (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc /-- The succ-degree left endpoint from the proved forward ASW theorem, with no backend argument required from the caller. -/ diff --git a/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean b/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean index e450e1dda..22ac7003b 100644 --- a/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean +++ b/RealRooted/CommonInterleaver/SuccDegreeLowDegree.lean @@ -209,8 +209,8 @@ theorem compatiblePairHasCommonInterleaver_of_natDegree_le_one pairHasCommonInterleaver_of_natDegree_le_one hf_pos hg_pos hf_deg_le_one hg_deg_le_one -/-- Succ-degree branch of the honest no-common target is already unconditional -in the constant-vs-linear endpoint case. -/ +/-- A constant and a linear polynomial with positive leading coefficients are +strictly interlaced in the succ-degree orientation. -/ theorem posComboNoCommonSuccDegreeOrientation_of_degree_zero {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) @@ -687,8 +687,8 @@ theorem succDegreeSlotData_of_posCombo_natDegree_le_one (fun k hk1 hk2 => hc2 k hk1 (by rw [hlenf] at hk2; exact hk2)) j hjf hjg -/-- Low-degree base case for the repaired succ-degree common-right-interleaver -endpoint in the positive-combination / no-common-root setting. -/ +/-- Low-degree case of the succ-degree common-interleaver theorem in the +positive-combination / no-common-root setting. -/ theorem posComboNoCommonSuccDegreePairHasCommonInterleaver_of_natDegree_le_one {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) @@ -743,8 +743,8 @@ theorem posComboSameDegreePairHasCommonInterleaver_of_natDegree_le_two (fun k hk1 hk2 => hc2 k hk1 (by rw [hlenf] at hk2; exact hk2)) j (by rw [hlenf]; exact hj) (by rw [hleng, hdeg]; exact hj) -/-- Low-degree base case for the repaired same-degree common-right-interleaver -endpoint in the positive-combination / no-common-root setting. -/ +/-- Low-degree case of the same-degree common-interleaver theorem in the +positive-combination / no-common-root setting. -/ theorem posComboNoCommonSameDegreePairHasCommonInterleaver_of_natDegree_le_two {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) diff --git a/RealRooted/Compatibility/Basic.lean b/RealRooted/Compatibility/Basic.lean index 79420bf21..d8b591541 100644 --- a/RealRooted/Compatibility/Basic.lean +++ b/RealRooted/Compatibility/Basic.lean @@ -318,7 +318,7 @@ lemma of_posComboRealRooted_sameDegree {f g : ℝ[X]} (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg) (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg) -/-- In the succ-degree #42 setting, strict positive-combination +/-- In the succ-degree setting, strict positive-combination real-rootedness upgrades to full nonnegative compatibility once the left endpoint is known to split. The right endpoint real-rootedness is supplied by the existing succ-degree endpoint theorem. -/ diff --git a/RealRooted/Compatibility/InterleaverBridge.lean b/RealRooted/Compatibility/InterleaverBridge.lean index 0ff8cdf35..26b3a9d05 100644 --- a/RealRooted/Compatibility/InterleaverBridge.lean +++ b/RealRooted/Compatibility/InterleaverBridge.lean @@ -2,10 +2,11 @@ import RealRooted.Compatibility.Basic import RealRooted.CommonInterleaverSeq /-! -# Compatibility and common-interleaver bridge statements +# Compatibility from common interleavers -This module contains the pairwise compatibility/common-interleaver bridge layer -used by the two-polynomial converse and Chudnovsky--Seymour packaging. +A family with a common (left or right) interleaver, or with pairwise common +interleavers, is pairwise compatible: the easy direction of +Chudnovsky--Seymour. -/ open Polynomial @@ -66,9 +67,10 @@ theorem pairwiseCompatible_of_pairwiseHasCommonInterleaver (hpos (fs.get i) (fs.get_mem i)) (hpos (fs.get j) (fs.get_mem j)) -/-- Natural two-polynomial bridge hypothesis in the Chudnovsky--Seymour setup: -compatibility plus positive leading coefficients implies a common right -interleaver. -/ +/-- Compatibility plus positive leading coefficients implies a common right +interleaver. This is proved by +`chudnovskySeymour_compatiblePairHasCommonInterleaver`; the proposition is kept +only for its `LiuOppositeSigns` callers. -/ def CompatiblePairHasCommonInterleaverStatement : Prop := ∀ ⦃f g : ℝ[X]⦄, HasPosLeadingCoeff f → @@ -76,71 +78,4 @@ def CompatiblePairHasCommonInterleaverStatement : Prop := Compatible f g → ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h -/-- Positive-leading two-polynomial common-left bridge. This is the usable -pair-local form for the roadmap theorem, whose finite-family statement already -assumes memberwise positive leading coefficients. -/ -def CompatiblePairHasCommonLeftInterleaverPosStatement : Prop := - ∀ ⦃f g : ℝ[X]⦄, - HasPosLeadingCoeff f → - HasPosLeadingCoeff g → - Compatible f g → - ∃ h : ℝ[X], StrictInterl h f ∧ StrictInterl h g - -/-- Once the two-polynomial common-left-interleaver converse is available, the -pairwise Chudnovsky--Seymour hypothesis immediately upgrades to pairwise common -left interleavers. This isolates the exact missing bridge. -/ -theorem pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible - (htwo : CompatiblePairHasCommonLeftInterleaverPosStatement) - {fs : List ℝ[X]} - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hpair : PairwiseCompatible fs) : - PairwiseHasCommonLeftInterleaver fs := - fun i j hij => - htwo - (hpos (fs.get i) (fs.get_mem i)) - (hpos (fs.get j) (fs.get_mem j)) - (hpair i j hij) - -/-- Reduction for the left-oriented Chudnovsky--Seymour target: the full -`PairwiseCompatible ↔ HasCommonLeftInterleaver` statement follows from the -two-polynomial common-left bridge and the finite-family left Helly upgrade. -/ -theorem pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge - {fs : List ℝ[X]} - (htwo : CompatiblePairHasCommonLeftInterleaverPosStatement) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hglobal : PairwiseHasCommonLeftInterleaver fs → HasCommonLeftInterleaver fs) : - PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := - ⟨fun hpair => - hglobal (pairwiseHasCommonLeftInterleaver_of_pairwiseCompatible htwo hpos hpair), - fun hcommon => pairwiseCompatible_of_commonLeftInterleaver hcommon hpos⟩ - -/-- Direct left-oriented finite-family reduction after the common-left Helly -upgrade: only the two-polynomial common-left bridge remains as input. -/ -theorem pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge_direct - {fs : List ℝ[X]} - (htwo : CompatiblePairHasCommonLeftInterleaverPosStatement) - (hrr : ∀ f ∈ fs, f.Splits) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) : - PairwiseCompatible fs ↔ HasCommonLeftInterleaver fs := - pairwiseCompatible_iff_commonLeftInterleaver_of_pairwiseLeftBridge htwo hpos <| - hasCommonLeftInterleaver_of_pairwiseHasCommonLeftInterleaver hrr hpos - -/-- A positive-leading common-right bridge implies the corresponding common-left -bridge: first get a common right interleaver, then convert it to a common left -interleaver using degree closeness. -/ -theorem compatiblePairHasCommonLeftInterleaverPos_of_pairBridge - (hright : CompatiblePairHasCommonInterleaverStatement) : - CompatiblePairHasCommonLeftInterleaverPosStatement := by - intro f g hf hg hfg - have : f.natDegree ≤ g.natDegree + 1 ∧ g.natDegree ≤ f.natDegree + 1 := - hfg.natDegree_close hf hg - by_cases hdeg : f.natDegree ≤ g.natDegree - · rcases hright hf hg hfg with ⟨h, hfh, hgh⟩ - exact - pairHasCommonLeftInterleaver_of_commonInterleaver - hfh hgh hdeg this.2 - · rcases hright hg hf hfg.comm with ⟨h, hgh, hfh⟩ - exact (pairHasCommonLeftInterleaver_of_commonInterleaver - hgh hfh (le_of_not_ge hdeg) this.1).imp fun _ h => h.symm - end RealRooted diff --git a/RealRooted/Production.lean b/RealRooted/Production.lean index da35ec8d0..d6259a086 100644 --- a/RealRooted/Production.lean +++ b/RealRooted/Production.lean @@ -228,7 +228,6 @@ import RealRooted.ClassicalHurwitzMatrix.Stability.Terminal import RealRooted.ClassicalHurwitzMatrix.Stability.Vieta import RealRooted.ClassicalHurwitzMatrix.Stability.WeakConverse import RealRooted.ClassicalHurwitzMatrix.TotallyNonnegative -import RealRooted.ClosedSegmentCountEqFromAnalytic import RealRooted.CoefficientDominance import RealRooted.CoefficientDominance.LogConcavity import RealRooted.CoefficientDominance.RootGap @@ -303,7 +302,6 @@ import RealRooted.CommonInterleaver.RootSlots import RealRooted.CommonInterleaver.RootSlots.Basic import RealRooted.CommonInterleaver.SameDegreeRootCount import RealRooted.CommonInterleaver.Sequence -import RealRooted.CommonInterleaver.Statements import RealRooted.CommonInterleaver.SuccDegreeEndpoint import RealRooted.CommonInterleaver.SuccDegreeLowDegree import RealRooted.CommonInterleaverExamples diff --git a/RealRooted/SameDegreeCountFromAnalytic.lean b/RealRooted/SameDegreeCountFromAnalytic.lean index bc238acbb..de642f703 100644 --- a/RealRooted/SameDegreeCountFromAnalytic.lean +++ b/RealRooted/SameDegreeCountFromAnalytic.lean @@ -6,10 +6,11 @@ import RealRooted.RootCountLocalConstancy /-! # Same-Degree Count Equality from Analytic Inputs -This file starts the issue #41 reuse of the issue #42 count route. The main -point is that in the same-degree case there is no escaping root at the endpoint: -the right pencil has constant degree, so the local-lower-count/local-constancy -machinery from #42 can be used directly. +In the same-degree case there is no escaping root at the endpoint: the right +pencil has constant degree, so the local-lower-count/local-constancy machinery +used for the successor-degree case applies directly. The upper root counts of +a no-common positive-combination pair differ by at most one, which gives the +same-degree case of the two-polynomial common-interleaver theorem. -/ open Polynomial @@ -21,7 +22,7 @@ the strict-upper root count by at most one, and only upward from the source side. This is the crossing analogue of the non-root local-constancy bridge from -`RootCountLocalConstancy`: the analytic input is still the #42 multiplicity +`RootCountLocalConstancy`: the analytic input is still the multiplicity lower-count theorem, but the finite count conclusion allows the single root at `x` to move across the threshold. -/ theorem exists_eps_card_roots_gt_bounds_near_simple_root @@ -117,7 +118,7 @@ theorem rightFamily_card_roots_gt_eq_of_no_isRoot_interval_sameDegree grind) hμ hρ -/-- Local lower counts from the #42 multiplicity-continuity theorem give +/-- Local lower counts from the multiplicity-continuity theorem give strict-upper root-count equality on the unit interval. -/ theorem rightFamily_card_roots_gt_eq_zero_one_of_constant_degree {f g : ℝ[X]} {x : ℝ} @@ -135,7 +136,7 @@ theorem rightFamily_card_roots_gt_eq_zero_one_of_constant_degree the nonnegative right pencil, then `f` and `g` have the same number of roots strictly above `x`. -This is the same-degree endpoint analogue of the #42 closed-segment count +This is the same-degree analogue of the successor-degree closed-segment count assembly, but it uses only constant-degree local constancy; no escaping-root argument is involved. -/ theorem sameDegree_card_roots_gt_eq_of_no_rightFamily_isRoot @@ -357,25 +358,28 @@ theorem sameDegree_rootCountAbove_bounds_of_posCombo_noCommon sameDegree_rootCountAbove_pointwise_of_not_exists_pos_isRoot hf_pos hg_pos hfg hdeg hxf hxg hcross -/-- The #41 common-non-root upper root-count target follows from the #42 -analytic count spine. -/ +/-- `sameDegree_rootCountAbove_bounds_of_posCombo_noCommon` in the shape of +`PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement`, kept for its +`LiuOppositeSigns` callers. -/ theorem posComboNoCommonSameDegreeRootCountAboveNonRootNonneg_from_analytic : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement := fun _ _ hf_pos hg_pos _hfnn _hgnn hfg hdeg hno => sameDegree_rootCountAbove_bounds_of_posCombo_noCommon hf_pos hg_pos hfg hdeg hno -/-- The repaired #41 same-degree pair-interleaver endpoint follows from the -#42 analytic count spine. -/ -theorem posComboNoCommonSameDegreePairHasCommonInterleaverNonneg_from_analytic : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - sameDegreePairHasCommonInterleaver_nonneg_of_rootCountAboveNonRoot - posComboNoCommonSameDegreeRootCountAboveNonRootNonneg_from_analytic - -/-- Positive combinations of a same-degree nonnegative pair without common -roots have a common interleaver. -/ -theorem PosComboNoCommonSameDegreePairHasCommonInterleaverNonneg : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := - posComboNoCommonSameDegreePairHasCommonInterleaverNonneg_from_analytic +/-- **Same-degree case of Chudnovsky--Seymour for two polynomials.** If every +positive combination of `f` and `g` is real-rooted, `f` and `g` have equal +degree, positive leading coefficients and no common roots, then they have a +common interleaver. -/ +theorem pairHasCommonInterleaver_of_posCombo_sameDegree + {f g : ℝ[X]} (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) + (hfg : PosComboRealRooted f g) (hdeg : g.natDegree = f.natDegree) + (hno : ∀ r, f.IsRoot r → ¬ g.IsRoot r) : + ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := + pairHasCommonInterleaver_of_sameDegree_rootCountAbove_nonRoot + hf_pos.ne_zero hg_pos.ne_zero + (hfg.isRealRooted_left_of_sameDegree hf_pos hg_pos hdeg).2 + (hfg.isRealRooted_right_of_sameDegree hf_pos hg_pos hdeg).2 hdeg + (sameDegree_rootCountAbove_bounds_of_posCombo_noCommon hf_pos hg_pos hfg hdeg hno) end RealRooted diff --git a/RealRooted/SameDegreeCubicRootCount.lean b/RealRooted/SameDegreeCubicRootCount.lean index 3f4024173..eba155333 100644 --- a/RealRooted/SameDegreeCubicRootCount.lean +++ b/RealRooted/SameDegreeCubicRootCount.lean @@ -474,16 +474,13 @@ theorem cubicSecondRootBound_of_interior · exact habove hf hg hfs hgs hfd hgd hpc a b c p q r hab hbc hpq hqr hfr hgr har hcon -/-- Checked reduction of the cubic same-degree root-count target to the -partial-separation leaf. - -Given the `CubicSecondRootBoundStatement` leaf, two split cubics with positive -leading coefficients forming a positive-combination real-rooted pair have -threshold root-count functions differing by at most one at every threshold. -This strengthens `sameDegree_cubic_rootCount_le_two` from `≤ 2` to `≤ 1`, -modulo the single analytic leaf `hbound`, and matches the degree-three case of -the milestone-B1 root-count target -`PosComboNoCommonSameDegreeRootCountNonnegStatement`. -/ +/-- Cubic same-degree root counts from the second-root bound. + +Given the second-root bound `hbound`, two split cubics with positive leading +coefficients forming a positive-combination real-rooted pair have threshold +root-count functions differing by at most one at every threshold. This +strengthens `sameDegree_cubic_rootCount_le_two` from `≤ 2` to `≤ 1`; the bound +itself is `cubicSecondRootBound_from_analytic`. -/ theorem sameDegree_cubic_rootCount_le_one_of_secondRootBound (hbound : CubicSecondRootBoundStatement) {f g : ℝ[X]} diff --git a/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean b/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean index 430867f5c..05a78c450 100644 --- a/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/AnalyticRules.lean @@ -14,100 +14,6 @@ namespace RealRooted namespace Tactic macro_rules - | `(tactic| rr_sameDegree_rootCountAbove_nonRoot_analytic) => - `(tactic| - exact - RealRooted.posComboNoCommonSameDegreeRootCountAboveNonRootNonneg_from_analytic) - | `(tactic| rr_sameDegree_pair_common_interleaver_analytic) => - `(tactic| - exact - RealRooted.PosComboNoCommonSameDegreePairHasCommonInterleaverNonneg) - | `(tactic| rr_succDegree_pair_common_interleaver_local_lower) => - `(tactic| - exact - RealRooted.PosComboNoCommonSuccDegreePairHasCommonInterleaverNonneg) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible using - root_count := $hcount:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_compatible - $hcount) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_noGapTwo - $hgap) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment using - no_gap_two := $hgap:term) => - `(tactic| - exact RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegment - $hgap) - | `(tactic| - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := $hcount:term) => - `(tactic| - exact - RealRooted.compatibleSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq - $hcount) - | `(tactic| - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := $hcount:term) => - `(tactic| - exact RealRooted.posComboNoCommonSuccDegreeRootCountAboveNonRoot_of_closedSegmentCountEq - $hcount) - | `(tactic| - rr_succDegree_pair_common_interleaver_rootCrossing using - root_crossing := $hcross:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCrossing - $hcross) - | `(tactic| - rr_succDegree_pair_common_interleaver_rootCountAbove using - root_count_above := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_rootCountAbove - $hcount) - | `(tactic| - rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot using - root_count_above := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_nonRoot - $hcount) - | `(tactic| - rr_succDegree_pair_common_interleaver_closedSegmentCountEq using - count_eq := $hcount:term) => - `(tactic| - exact RealRooted.succDegreePairHasCommonInterleaver_nonneg_of_closedSegmentCountEq - $hcount) - | `(tactic| - rr_compatible_pair_common_interleaver_degree_split_nonnegShift using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_pairDegreeSplit_via_nonnegShift - $hsame $hsucc) - | `(tactic| - rr_compatible_pair_common_interleaver_rootCrossing using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCrossing - $hsame $hsucc) - | `(tactic| - rr_compatible_pair_common_interleaver_rootCountAboveNonRoot using - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact RealRooted.compatiblePairHasCommonInterleaver_of_rootCountAboveBothNonRoot - $hsame $hsucc) - | `(tactic| rr_chudnovskySeymour_compatible_pair_common_interleaver_statement) => - `(tactic| - exact RealRooted.chudnovskySeymour_compatiblePairHasCommonInterleaver) - | `(tactic| rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement) => - `(tactic| - exact RealRooted.chudnovskySeymour_compatiblePairHasCommonLeftInterleaver) | `(tactic| rr_chudnovskySeymour_compatible_pair_common_interleaver using left_pos_lc := $hf:term, @@ -122,7 +28,7 @@ macro_rules right_pos_lc := $hg:term, compatible := $hcomp:term) => `(tactic| - exact RealRooted.compatiblePairHasCommonLeftInterleaver_chudnovskySeymour + exact RealRooted.chudnovskySeymour_compatiblePairHasCommonLeftInterleaver $hf $hg $hcomp) end Tactic diff --git a/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean b/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean index b6f637c96..f68cad478 100644 --- a/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/AnalyticSyntax.lean @@ -10,101 +10,6 @@ common-interleaver endpoints. namespace RealRooted namespace Tactic -syntax (name := rr_sameDegree_rootCountAbove_nonRoot_analytic_named) - "rr_sameDegree_rootCountAbove_nonRoot_analytic" : - tactic - -syntax (name := rr_sameDegree_pair_common_interleaver_analytic_named) - "rr_sameDegree_pair_common_interleaver_analytic" : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_local_lower_named) - "rr_succDegree_pair_common_interleaver_local_lower" : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible" " using " - "root_count" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment" " using " - "no_gap_two" ":=" term : - tactic - -syntax (name := rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq_named) - "rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq" " using " - "count_eq" ":=" term : - tactic - -syntax (name := rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq_named) - "rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq" " using " - "count_eq" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_rootCrossing_named) - "rr_succDegree_pair_common_interleaver_rootCrossing" " using " - "root_crossing" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_rootCountAbove_named) - "rr_succDegree_pair_common_interleaver_rootCountAbove" " using " - "root_count_above" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot_named) - "rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot" " using " - "root_count_above" ":=" term : - tactic - -syntax (name := rr_succDegree_pair_common_interleaver_closedSegmentCountEq_named) - "rr_succDegree_pair_common_interleaver_closedSegmentCountEq" " using " - "count_eq" ":=" term : - tactic - -syntax - (name := - rr_succDegree_pair_common_interleaver_residualStrictInterl_bothNonzero_divXStrictInterl_named) - "rr_succDegree_pair_common_interleaver_residualStrictInterl_\ - bothNonzero_divXStrictInterl" " using " - "residual_strictInterl" ":=" term "," - "both_nonzero" ":=" term "," - "divX_strictInterl" ":=" term : - tactic - -syntax (name := rr_compatible_pair_common_interleaver_degree_split_nonnegShift_named) - "rr_compatible_pair_common_interleaver_degree_split_nonnegShift" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_compatible_pair_common_interleaver_rootCrossing_named) - "rr_compatible_pair_common_interleaver_rootCrossing" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax (name := rr_compatible_pair_common_interleaver_rootCountAboveNonRoot_named) - "rr_compatible_pair_common_interleaver_rootCountAboveNonRoot" " using " - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - -syntax - (name := rr_chudnovskySeymour_compatible_pair_common_interleaver_statement_named) - "rr_chudnovskySeymour_compatible_pair_common_interleaver_statement" : - tactic - -syntax - (name := rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement_named) - "rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement" : - tactic - syntax (name := rr_chudnovskySeymour_compatible_pair_common_interleaver_named) "rr_chudnovskySeymour_compatible_pair_common_interleaver" " using " "left_pos_lc" ":=" term "," diff --git a/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean b/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean index f9aa040d5..fd58621b2 100644 --- a/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean +++ b/RealRooted/Tactic/CommonInterleaver/FamilyRules.lean @@ -14,16 +14,6 @@ namespace RealRooted namespace Tactic macro_rules - | `(tactic| - rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs using - member_realrooted := $hrr:term, - member_pos_lc := $hpos:term, - member_nonneg_coeffs := $hnn:term, - same_degree := $hsame:term, - succ_degree := $hsucc:term) => - `(tactic| - exact chudnovskySeymour_fourWay_of_pairDegreeSplit_and_nonnegCoeffs - $hrr $hpos $hnn $hsame $hsucc) | `(tactic| rr_chudnovskySeymour_fourWay_degree_le_one using member_pos_lc := $hpos:term, diff --git a/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean b/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean index 0bdd10adc..4354ae186 100644 --- a/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean +++ b/RealRooted/Tactic/CommonInterleaver/FamilySyntax.lean @@ -10,15 +10,6 @@ pairwise-to-family compatibility upgrades. namespace RealRooted namespace Tactic -syntax (name := rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs_named) - "rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs" " using " - "member_realrooted" ":=" term "," - "member_pos_lc" ":=" term "," - "member_nonneg_coeffs" ":=" term "," - "same_degree" ":=" term "," - "succ_degree" ":=" term : - tactic - syntax (name := rr_chudnovskySeymour_fourWay_degree_le_one_named) "rr_chudnovskySeymour_fourWay_degree_le_one" " using " "member_pos_lc" ":=" term "," diff --git a/RealRooted/Tactic/Examples/CommonInterleaver.lean b/RealRooted/Tactic/Examples/CommonInterleaver.lean index 327bea869..bcd889a9c 100644 --- a/RealRooted/Tactic/Examples/CommonInterleaver.lean +++ b/RealRooted/Tactic/Examples/CommonInterleaver.lean @@ -441,104 +441,6 @@ example {FS : Nat → List ℝ[X]} member_pos_lc := hpos, nonempty := hne -example : - PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement := by - rr_sameDegree_rootCountAbove_nonRoot_analytic - -example : - PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement := by - rr_sameDegree_pair_common_interleaver_analytic - -example : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_local_lower - -example - (hcount : CompatibleSuccDegreeRootCountAboveNonRootStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_compatible using - root_count := hcount - -example - (hgap : CompatibleSuccDegreeRootCountAboveNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_noGapTwo using - no_gap_two := hgap - -example - (hgap : CompatibleSuccDegreeClosedSegmentNoGapTwoStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_closedSegment using - no_gap_two := hgap - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - CompatibleSuccDegreeRootCountAboveNonRootStatement := by - rr_compatibleSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := hcount - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement := by - rr_posComboSuccDegree_rootCountAbove_nonRoot_of_countEq using - count_eq := hcount - -example - (hcross : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCrossing using - root_crossing := hcross - -example - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCountAbove using - root_count_above := hcount - -example - (hcount : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_rootCountAboveNonRoot using - root_count_above := hcount - -example - (hcount : CompatibleSuccDegreeClosedSegmentCountEqStatement) : - PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement := by - rr_succDegree_pair_common_interleaver_closedSegmentCountEq using - count_eq := hcount - -example - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_degree_split_nonnegShift using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCrossingNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCrossingNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCrossing using - same_degree := hsame, - succ_degree := hsucc - -example - (hsame : PosComboNoCommonSameDegreeRootCountAboveNonRootNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreeRootCountAboveNonRootNonnegStatement) : - CompatiblePairHasCommonInterleaverStatement := by - rr_compatible_pair_common_interleaver_rootCountAboveNonRoot using - same_degree := hsame, - succ_degree := hsucc - -example : - CompatiblePairHasCommonInterleaverStatement := by - rr_chudnovskySeymour_compatible_pair_common_interleaver_statement - -example : - CompatiblePairHasCommonLeftInterleaverPosStatement := by - rr_chudnovskySeymour_compatible_pair_common_left_interleaver_statement - example {f g : ℝ[X]} (hf : HasPosLeadingCoeff f) (hg : HasPosLeadingCoeff g) (hcomp : Compatible f g) : @@ -557,20 +459,6 @@ example {f g : ℝ[X]} right_pos_lc := hg, compatible := hcomp -example {fs : List ℝ[X]} - (hrr : ∀ f ∈ fs, (f ≠ 0 ∧ f.Splits)) - (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) - (hnn : ∀ f ∈ fs, HasNonnegCoeffs f) - (hsame : PosComboNoCommonSameDegreePairHasCommonInterleaverNonnegStatement) - (hsucc : PosComboNoCommonSuccDegreePairHasCommonInterleaverNonnegStatement) : - ChudnovskySeymourFourWayPackage fs := by - rr_chudnovskySeymour_fourWay_pairDegreeSplit_nonnegCoeffs using - member_realrooted := hrr, - member_pos_lc := hpos, - member_nonneg_coeffs := hnn, - same_degree := hsame, - succ_degree := hsucc - example {fs : List ℝ[X]} (hpos : ∀ f ∈ fs, HasPosLeadingCoeff f) (hdeg : ∀ f ∈ fs, f.natDegree ≤ 1) : diff --git a/scripts/import_architecture.json b/scripts/import_architecture.json index 7888415bb..3f9a4fc5a 100644 --- a/scripts/import_architecture.json +++ b/scripts/import_architecture.json @@ -1156,13 +1156,13 @@ "max_modules": 153 }, "RealRooted.CommonInterleaver.PairBridge.SuccDegree": { - "max_modules": 157 + "max_modules": 163 }, "RealRooted.CommonInterleaver.PairBridge.SuccDegree.RootCount": { "max_modules": 154 }, "RealRooted.CommonInterleaver.PairBridge.SuccDegree.ClosedSegment": { - "max_modules": 155 + "max_modules": 161 }, "RealRooted.CommonInterleaver.PairBridge.SuccDegree.RootCrossing": { "max_modules": 155 @@ -1171,28 +1171,28 @@ "max_modules": 89 }, "RealRooted.CommonInterleaver.PairBridge.Reduction.Basic": { - "max_modules": 160 + "max_modules": 166 }, "RealRooted.CommonInterleaver.PairBridge.Reduction.CommonInterleaver": { - "max_modules": 161 + "max_modules": 168 }, "RealRooted.CommonInterleaver.PairBridge.Reduction.AllCombo": { - "max_modules": 161 + "max_modules": 167 }, "RealRooted.CommonInterleaver.PairBridge.Reduction": { - "max_modules": 163 + "max_modules": 170 }, "RealRooted.CommonInterleaver.PairBridge.Compatibility": { - "max_modules": 163 + "max_modules": 170 }, "RealRooted.CommonInterleaver.PairBridge.Compatibility.NonnegativeShift": { - "max_modules": 164 + "max_modules": 171 }, "RealRooted.CommonInterleaverSeq": { "max_modules": 97 }, "RealRooted.CommonInterleaver.PairBridge": { - "max_modules": 165 + "max_modules": 172 }, "RealRooted.DerivativeRecurrence": { "max_modules": 56 From 63ac0b379c6f879bffe9942b5a35cbad42f3de97 Mon Sep 17 00:00:00 2001 From: Per Alexandersson Date: Fri, 2 Oct 2026 15:52:41 +0000 Subject: [PATCH 3/4] Drop unused implicit binder name in left-splits proofs Co-Authored-By: Claude Opus 5.5 --- .../CommonInterleaver/PairBridge/SuccDegree/SlotData.lean | 2 +- RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean index 9611a3013..6a74a9bbb 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/SlotData.lean @@ -25,7 +25,7 @@ theorem pairHasCommonInterleaver_of_posCombo_succDegree ∃ h : ℝ[X], StrictInterl f h ∧ StrictInterl g h := by have hf_split : f.Splits := splits_of_add_C_mul_family_of_succDegree - (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc + (fun {_} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc have hg_rr : g ≠ 0 ∧ g.Splits := hfg.isRealRooted_right_of_succDegree hf_pos hg_pos hsucc have hcomp : Compatible f g := diff --git a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean index 16ead80d2..30a01d6a5 100644 --- a/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean +++ b/RealRooted/CommonInterleaver/SuccDegreeEndpoint.lean @@ -79,7 +79,7 @@ theorem PosComboSuccDegreeLeftSplitsNonnegStatement_of_rootContinuity (hfg : PosComboRealRooted f g) (hsucc : g.natDegree = f.natDegree + 1) : f.Splits := splits_of_add_C_mul_family_of_succDegree - (fun {μ} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc + (fun {_} hμ => hfg.isRealRooted_add_right hμ) hf_pos hg_pos hsucc /-- The succ-degree left endpoint from the proved forward ASW theorem, with no backend argument required from the caller. -/ From e5c210626da6e72451f29a23b9e9b142bef45a4e Mon Sep 17 00:00:00 2001 From: Per Alexandersson Date: Mon, 5 Oct 2026 08:24:08 +0000 Subject: [PATCH 4/4] Drop redundant non-root hypothesis from closed-segment count lemma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The closed-segment hypothesis at β = 1 already rules out a root of g, so hxg was unused and failed the unused-variable lint. Co-Authored-By: Claude Opus 5.5 --- .../PairBridge/SuccDegree/ClosedSegment.lean | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean index 12b719fb0..04dd2e0ae 100644 --- a/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean +++ b/RealRooted/CommonInterleaver/PairBridge/SuccDegree/ClosedSegment.lean @@ -25,7 +25,7 @@ theorem Compatible.succDegree_card_roots_gt_eq_of_closedSegment {f g : ℝ[X]} (hcomp : Compatible f g) (hf_pos : HasPosLeadingCoeff f) (hg_pos : HasPosLeadingCoeff g) (hdeg : g.natDegree = f.natDegree + 1) (hf_split : f.Splits) - {x : ℝ} (hxf : ¬ f.IsRoot x) (hxg : ¬ g.IsRoot x) + {x : ℝ} (hxf : ¬ f.IsRoot x) (hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → ¬ (C (1 - β) * f + C β * g).IsRoot x) : (f.roots.filter (x < ·)).card = (g.roots.filter (x < ·)).card := by @@ -77,7 +77,7 @@ theorem Compatible.succDegree_rootCountAbove_sub_ne_two ((f.roots.filter (x < ·)).card : ℤ) = (g.roots.filter (x < ·)).card := by exact_mod_cast hcomp.succDegree_card_roots_gt_eq_of_closedSegment - hf_pos hg_pos hdeg hf_split hxf hxg hseg + hf_pos hg_pos hdeg hf_split hxf hseg linarith · intro hgap have hseg : ∀ {β : ℝ}, 0 ≤ β → β ≤ 1 → @@ -90,7 +90,7 @@ theorem Compatible.succDegree_rootCountAbove_sub_ne_two ((f.roots.filter (x < ·)).card : ℤ) = (g.roots.filter (x < ·)).card := by exact_mod_cast hcomp.succDegree_card_roots_gt_eq_of_closedSegment - hf_pos hg_pos hdeg hf_split hxf hxg hseg + hf_pos hg_pos hdeg hf_split hxf hseg linarith /-- For a compatible successor-degree pair with positive leading coefficients