Subset-sum polynomial #
The polynomial ∏ x ∈ s, (X - C x) attached to a multiset s and its factorization
according to the vanishing subset sums, used to track integer divisibility in
Niven's argument.
The polynomial ∏ x ∈ s, (X - C x) associated to a multiset s.
Equations
- polyOfMultiset s = (Multiset.map (fun (a : S) => Polynomial.X - Polynomial.C a) s).prod
Instances For
∏_{a ∈ s} (X - a) = X^{#{a ∈ s, a = 0}} ∏_{a ∈ s, a ≠ 0} (X - a).
The multiset {X₀, …, Xₙ₋₁} inside ℤ[X₀, …, Xₙ₋₁].
Equations
Instances For
The polynomial whose roots are { ∑_{x ∈ t} x | t ⊆ s } for a given multiset s.
Equations
Instances For
The polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s } for a given multiset s.
Equations
Instances For
The polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s } for a given multiset s
is monic.
If { ∑_{x ∈ t} x ≠ 0 | t ⊆ s } is indexed by a : Fin n → S, then every a i is nonzero.
The r-th elementary symmetric polynomial in { ∑_{i ∈ I} Xᵢ | I ⊆ {0, …, n-1} }.
Equations
- esymmVarsFinSubsetSums n r = (subsetSums (varsFin n)).esymm r
Instances For
Taking powersets commutes with mapping a function over a multiset.
The multiset {X₀, …, Xₙ₋₁} is invariant under permutation of the variables.
The multiset of subset sums of X₀, …, Xₙ₋₁ is invariant under permutation of the
variables.
Renaming variables commutes with the elementary symmetric polynomial of a multiset.
The r-th elementary symmetric polynomial in { ∑_{i ∈ I} Xᵢ | I ⊆ {0, …, n-1} }
is symmetric.
Evaluating {X₀, …, Xₙ₋₁} at b gives the multiset {b₀, …, bₙ₋₁}.
Evaluating the subset sums of {X₀, …, Xₙ₋₁} at b is the subset sums of {b₀, …, bₙ₋₁}.
Evaluating the r-th elementary symmetric polynomial in { ∑_{i ∈ I} Xᵢ | I ⊆ {0, …, n-1} }
at b gives the r-th elementary symmetric polynomial in the subset sums of {b₀, …, bₙ₋₁}.
The k-th coefficient of the polynomial whose roots are { ∑_{x ∈ t} x | t ⊆ b }
is given by an elementary symmetric polynomial in { ∑_{i ∈ I} Xᵢ | I ⊆ {0, …, n-1} } at b.
If B is monic with roots b₀, …, bₙ₋₁, then the coefficients of the polynomial
whose roots are { ∑_{x ∈ t} x | t ⊆ b } are polynomials in the coefficients of B.
If B is monic with roots b₀, …, bₙ₋₁, then the coefficients of the polynomial
whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ b } are polynomials in the coefficients of B.
From a monic polynomial B with roots a₀, …, aₙ₋₁, one obtains a polynomial over the
base ring whose image has roots the nonzero subset sums of the a_i.
Clearing denominators for a polynomial over ℚ: every rational polynomial
is a nonzero integer multiple of the image of some polynomial over ℤ.
The coefficients of Xᵈ + ∑ₖ₌₀ᵈ⁻¹ cᵈ⁻¹⁻ᵏ Tₖ Xᵏ.
Xᵈ + ∑ₖ₌₀ᵈ⁻¹ cᵈ⁻¹⁻ᵏ Tₖ Xᵏ has degree d.
Xᵈ + ∑ₖ₌₀ᵈ⁻¹ cᵈ⁻¹⁻ᵏ Tₖ Xᵏ is monic.
Coefficients of Xᵈ + ∑ₖ₌₀ᵈ⁻¹ cᵈ⁻¹⁻ᵏ Tₖ Xᵏ correspond to the coefficients of scaleRoots.
After mapping to ℚ, the monic rescaling is the scaleRoots of the monic rational
polynomial T'.
If T = c T' with T' monic of degree d and roots a₀, …, a_{d-1},
then Xᵈ + ∑ₖ₌₀ᵈ⁻¹ cᵈ⁻¹⁻ᵏ Tₖ Xᵏ is the monic polynomial whose roots are c a₀, …, c a_{d-1}.
If T' is the polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s },
then T' is monic.
If T' is the polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s },
then deg(T') is the number of those roots.
If T' is the polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s },
then its roots are exactly that multiset.
If T' is the polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s }, then T'(0) ≠ 0.
If T = c • T', and T' is the polynomial whose roots are { ∑_{x ∈ t} x ≠ 0 | t ⊆ s },
then the roots of T are also { ∑_{x ∈ t} x ≠ 0 | t ⊆ s }.
If c ≠ 0 and c * T' = T ∈ ℤ[X], then deg(T) = deg(T').
If T'(0) ≠ 0 and c * T' = T ∈ ℤ[X], then T(0) ≠ 0.
If T = c • T', and T' is the polynomial whose roots are
{ ∑_{x ∈ t} x ≠ 0 | t ⊆ s }, then T(0) ≠ 0.