SageMath:多项式环模整数到整数上的一元多项式环

2024-09-28 21:03:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我是Sage的新成员,我想使用DiscreteGaussianDistributionPolynomialSampler库:

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 - 

但是,它需要一个univariate polynomial ring over the Integers,但是我想用一个整数模的商环来代替。像这样:

(1)多项式的商

^{pr2}$

问题:有可能吗?如果不可能的话,有没有一种方法可以手动地用(x^1024 +1)修改结果,然后用13修改结果?在

任何帮助都将不胜感激。在


Tags: theintegersfromstats成员sigmaoverdistributions