Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_DerivativeChainPrivate_foundations.lean
qedmarketβs copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source β
/-From Prove2Me, definition `DerivativeChainPrivate_foundations` (https://prove2.me/definitions/68b95d66-17eb-4790-99fc-9c955976c17a). Apache-2.0 per Prove2Me's terms.-/import Mathlib open scoped BigOperatorsset_option autoImplicit falsenamespace DerivativeChainPrivate noncomputable def fromRoots {n : β} (a : Fin n β β) : Polynomial β := β i, (Polynomial.X - Polynomial.C (a i)) noncomputable def row {n : β} (a : Fin n β β) (m : β) : Polynomial β := (Polynomial.derivative^[n - m]) (fromRoots a) noncomputable def IsChain {n : β} (a z : Fin n β β) : Prop := β i, (row a (i.val + 1)).eval (z i) = 0 noncomputable def chainCost {n : β} (z : Fin n β β) : β := β i : Fin (n - 1), βz β¨i.val + 1, by omegaβ© - z β¨i.val, by omegaβ©β noncomputable def RealCoefficients {n : β} (a : Fin n β β) : Prop := β k : β, ((fromRoots a).coeff k).im = 0 noncomputable def nonrealCount {n : β} (a : Fin n β β) : β := by classical exact (Finset.univ.filter (fun i => (a i).im β 0)).card end DerivativeChainPrivate