Polynomial ring modulus integer to univariate polynomial ring over the Integers
I want to use the DiscreteGaussianDistributionPolynomialSampler library:
from sage.stats.distributions.discrete_gaussian_polynomial import DiscreteGaussianDistributionPolynomialSampler
sage: DiscreteGaussianDistributionPolynomialSampler(ZZ['x'], 8, 3.0)()
3*x^7 + 3*x^6 - 3*x^5 - x^4 - 5*x^2 + 3
DiscreteGaussianDistributionPolynomialSampler(P, n, sigma)
P - a univariate polynomial ring over the Integers
n - number of coefficients to be sampled
sigma -
However, it takes a univariate polynomial ring over the Integers
but I want to use a quotient ring of integers modulus instead. Something like this:
Quotient polynomial ring of: (x^1024 + 1) modulus 13:
modulus = 13
R = PolynomialRing(GF(modulus), "X")
X = R.gen()
Y = R.quotient(X^1024 + 1, "x")
x = Y.gen()
Question: Is it possible? if it is not possible is there a way to manually mod the result with x^1024 +1
and then with 13
afterwards?
Any help would be appreciated.
Link of the library (I didn't have sufficient points to have URL in my question): http://doc.sagemath.org/html/en/reference/stats/sage/stats/distributions/discrete_gaussian_polynomial.html#sage.stats.distributions.discrete_gaussian_polynomial.DiscreteGaussianDistributionPolynomialSampler.__init__ (link)
Also asked at http://stackoverflow.com/questions/40189450/.