ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 17 Aug 2021 19:01:08 +0200How to reduce a list of fractionshttps://ask.sagemath.org/question/58505/how-to-reduce-a-list-of-fractions/I have a list of integers. I want to divide (n+1) by n. I can do this with no problem, but I can't get the resulting fractions in reduced form. My list has 50 items, but I'll only do a list of 5 here to avoid spamming.
sage: a = [6198089008491993412800, 3099044504245996706400, 2066029669497331137600, 2324283378184497529800, 1239617801698398682560]
sage: c = [(n + 1)/n for n in a]
sage: print (c)
[6198089008491993412801/6198089008491993412800, 3099044504245996706401/3099044504245996706400, 2066029669497331137601/2066029669497331137600, 2324283378184497529801/2324283378184497529800, 1239617801698398682561/1239617801698398682560]
I don't know why Sage doesn't automatically reduce these fractions, but since it doesn't, I've tried multiplying by 1 and using reduce() and simplify(), and have searched everywhere I could think of for an answer, but nothing works. I apologize in advance for asking such a rudimentary question.Jerry CaveneyTue, 17 Aug 2021 19:01:08 +0200https://ask.sagemath.org/question/58505/Verbose option for interreduced_basis() function?https://ask.sagemath.org/question/57686/verbose-option-for-interreduced_basis-function/I was trying to see how/which reductions were being computed for a non-reduced grobner basis. Is there anyway to see the intermediate steps/reduction steps, the interreduced_basis() makes?
Any help is much appreciated, thank you!jimmyjo6867Tue, 22 Jun 2021 22:36:28 +0200https://ask.sagemath.org/question/57686/Find expansion of polynomial in an idealhttps://ask.sagemath.org/question/51149/find-expansion-of-polynomial-in-an-ideal/ I have a polynomial `p` and some other polynomials `p_1,...,p_k` which are elements of a multivariate polynomial ring. Say something like `P = PolynomialRing(QQ,'a,b,c,d,e,f,g')` . I know that `p` belongs to the ideal generated by `p_1,..,p_k` because when I ask for a groebner basis of `I` I can see explicitly `p` there. How do I find the expression of `p` as a linear combination of the `p_i`'s with coefficients in `P`?heluaniWed, 29 Apr 2020 21:54:09 +0200https://ask.sagemath.org/question/51149/Uniqueness of reduced Groebner basis - proofhttps://ask.sagemath.org/question/39792/uniqueness-of-reduced-groebner-basis-proof/ Hi, can you please help me understand something.
I defined minimal GB like this:
Let G = {g1, . . . , gs} be a GB of an ideal I ⊂ k[x1, . . . , xn].
Then G is a **minimal GB** if and only if for each i = 1, . . . , s, the polynomial LC(gi) = 1 and its leading monomial LM(gi) does not divide LM(gj) for any j different than i.
and I showed that if:
G = {g1, . . . , gs} and H = {h1, . . . , ht} are two minimal GB for I then s = t and, after renumbering as necessary, LT(gi) = LT(hi) for i = 1, . . . , s.
Now I have a definition for reduced GB:
Let G = {g1, . . . , gs} be a GB of an ideal I ⊂ k[x1, . . . , xn].
Then G is a **reduced GB** if and only if for each i = 1, . . . , s LC(gi) = 1 and its leading monomial LM(gi) does not divide
any term of any gj for any j different then i.
Now i want to show **uniqueness** of reduced GB and the proof goes like this:
Suppose that {f1, . . . , fs} and {g1, . . . , gs} are both reduced and ordered so that LT(fi) = LT(gi) for each i.
Consider fi − gi ∈ I. If it is not zero, then its leading term must be a term that appeared in fi or in gi . In either case, this
contradicts the bases being reduced, so in fact fi = gi as claimed.
I don't understand why is there a contradiction with the bases being reduced.PetraSat, 25 Nov 2017 21:54:03 +0100https://ask.sagemath.org/question/39792/Several variables, consider polynomail as polynomial only of $X$, group coefficientshttps://ask.sagemath.org/question/33646/several-variables-consider-polynomail-as-polynomial-only-of-x-group-coefficients/Suppose I have variables `d`, `e` and `x` and I somehow using symbolic calculation get polynomial like this:
$$9d^2e^2x^2 - 36d^2ex^3 + 18de^2x^2$$
I want sage to group coefficients at `x` and consider my polynomial as polynomial only of `x`, I want other variables to be no more than just parameters. In short I want to see something like this:
$$9de^2(d + 2)x^2 - 36d^2ex^3$$
Is it possible to exploit such an approach in Sage?
P.S. I shortened my example. In real life example it is not so easy to see such a grouping by hands.petRUShkaThu, 02 Jun 2016 17:25:07 +0200https://ask.sagemath.org/question/33646/Quotient of Polynomial rings reduction not workinghttps://ask.sagemath.org/question/27068/quotient-of-polynomial-rings-reduction-not-working/<code>
<br>R.<x>=PolynomialRing(QQ)
<br>R.ideal(x^4).reduce(x^8+1)
<br>R.<x>=PolynomialRing(ZZ)
<br>R.ideal(x^4).reduce(x^8+1)
1
x^8 + 1
</code>
Why am I not getting the result 1 in both cases?WizqTue, 09 Jun 2015 15:44:26 +0200https://ask.sagemath.org/question/27068/Reducing a Set of Polynomial Equations to Minimal Variables and Equationshttps://ask.sagemath.org/question/10187/reducing-a-set-of-polynomial-equations-to-minimal-variables-and-equations/I have a list of polynomial equations equal to zero, lets call it
> equations = [f1 == 0, f2 == 0, ..., fn ==0]
I know that each polynomial $f_{i}$ is a function of $n^2$ variables where $n$ is determined by input from the user. Is there any way that I can reduce this system of polynomial equations in Python (or with a Sage package) to a minimal number of polynomials and variables?
I tried looking up Grobner basis (http://www.sagemath.org/doc/constructions/polynomials.html#grobner-bases) but it does not seem to be working for what I want as it doesn't check out correctly with the analytical math I have been doing. Thanks!Samuel ReidMon, 03 Jun 2013 19:23:57 +0200https://ask.sagemath.org/question/10187/reducing ideal wrt another idealhttps://ask.sagemath.org/question/8323/reducing-ideal-wrt-another-ideal/I have two ideals I & J in k[X_1,\cdots,x_n], where k is a field. How do I reduce an ideal I wrt ideal J.
e.g. Singular provides me a command
reduce(I,std(J));
Without moving back and forth to Singular, is it possible to implement this in sage?
Thanks and regards
-- VInay WaghVInay WaghMon, 26 Sep 2011 21:32:26 +0200https://ask.sagemath.org/question/8323/