Re: [sage-support] Re: Can't compile hello.spyx
On Sunday, 13 January 2013 02:34:04 UTC+8, Volker Braun wrote: > > On Saturday, January 12, 2013 6:18:08 PM UTC, Jeroen Demeyer wrote: > >> > * replace /usr/include with $SAGE_ROOT/local/include >> It's already there in the include path. >> > > Yes but gcc has > local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.3/include-fixed/ > after $SAGE_ROOT/local/include. The fixed limit.h ends with #include_next > which only searches in the include paths further down. > > Of course we could name the directory it differently, > $SAGE_ROOT/local/include/platform-headers or so. > > >> > A quick grep of gcc's include-fixed directory suggests that limits.h is >> > the only header required >> That would be very surprising. Is stdio.h for example included by >> default on OS X systems without XCode? >> > > Oh ok, stdio.h doesn't get fixed so it doesn't occur in include-fixed. > Still, I only see following #include-next statements > for stdio.h, string.h, unistd.h, stdint.h, limits.h. > > Somebody with a Mac without xcode should try to copy just those headers > into /usr/include and figure out which other headers are needed... > Tried, and saw that not only quite a bit of /usr/include needs to be shipped, but also as must be in the bundle. Namely, after putting the whole /usr/include from Xcode of a similar OSX system on such a bare machine: Compiling ./hello.spyx... Error compiling cython file: Error compiling ./hello.spyx: running build running build_ext building '_Users_edith_Desktop_sage_hello_spyx_6' extension gcc -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/edith/Desktop/sage/local/include/csage -I/Users/edith/Desktop/sage/local/include -I/Users/edith/Desktop/sage/local/include/python2.7 -I/Users/edith/Desktop/sage/local/lib/python/site-packages/numpy/core/include -I/Users/edith/Desktop/sage/devel/sage/sage/ext -I/Users/edith/Desktop/sage/devel/sage -I/Users/edith/Desktop/sage/devel/sage/sage/gsl -I. -I/Users/edith/Desktop/sage/local/include/python2.7 -c _Users_edith_Desktop_sage_hello_spyx_6.c -o build/temp.macosx-10.6-i386-2.7/_Users_edith_Desktop_sage_hello_spyx_6.o -w -O2 gcc: error trying to exec 'as': execvp: No such file or directory error: command 'gcc' failed with exit status 1 Needless to say, ld is also missing... I finally got hello.spyx compiling/linking/running on a "bare" OSX 10.6.8, after copying (from a similar 32-bit Core 2Duo OSX 10.6.8 with XCode 3.2.6) /usr/bin/as /usr/libexec/gcc/darwin/i386/as /usr/bin/ld /usr/lib/bundle1.o Welcome to the binary Hell! Of course there is no guarantee that this is all even needed. Perhaps there is a standard way to package such a minimum, I don't know. Dima > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: how to compute group extensions?
On 2013-01-14, Pierre Guillot wrote: > partially answering my own question: for the "lame but easy method", > one can do the following. Having a putative group H, try: > > for x in [g for g in G.Centre().Elements() if g.Order() == 2]: > Q= G.FactorGroupNC( G.Subgroup([ x ]) ) # no idea why NC NC is GAP's names suffix indicating something like "do not check the property", potentially speeding up things quite a bit. > if Q.IdGroup() == what you want > return True > > ... or something. > > 2013/1/14 Pierre : >> Thanks, I thought about this, but I'm not sure how to pick central elements >> of order 2 in a group, or more precisely in a group that is given by >> gap("SmallGroup(n,i)"). I can try C= G.centre() and then get C.generators() >> but i'm not sure if I can assume anything about these generators (I doubt >> that they generate cyclic subgroups whose *direct* product is C). >> >> Am I missing something easy? >> >> Le lundi 14 janvier 2013 13:35:05 UTC+1, Volker Braun a écrit : >>> >>> Lame but easy method: Go though all groups with 2*G.Size() elements and >>> pick out the ones you want. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To post to this group, send email to sage-support@googlegroups.com. >> To unsubscribe from this group, send email to >> sage-support+unsubscr...@googlegroups.com. >> Visit this group at http://groups.google.com/group/sage-support?hl=en. >> >> > > > > -- > Pierre > 06 06 40 72 28 > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Sage 5.5 fails to build from source on x86_64 Linux system with i386 userland
Rogério Brito writes: > Hi there. > > I use a Debian sid/unstable system with Linux kernel for amd64/x86_64, but > with userland being i386. Thanks for the report. I've seen this issue come up before, I believe. I'm CCing sage-devel in case someone there knows what to do about it. -Keshav > Unfortunately, in such situation, Sage FTBFS during the compilation of > GMP-ECM. Some parts of the log (more upon request, so as to not bomb the > list with useless garbage) are: > > , > | Now building GMP-ECM... > | make[3]: Entering directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src' > | make all-recursive > | make[4]: Entering directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src' > | Making all in x86_64 > | make[5]: Entering directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src/x86_64' > | m4 -I../ -DOPERATION_mulredc1 `test -f mulredc1.asm || echo > './'`mulredc1.asm >mulredc1.s > | /bin/bash ../libtool --mode=compile gcc -march=native -g -O3 -fPIC -c > -o mulredc1.lo mulredc1.s > | libtool: compile: gcc -march=native -g -O3 -fPIC -c mulredc1.s -o > mulredc1.o > | mulredc1.s: Assembler messages: > | mulredc1.s:49: Error: bad register name `%rdx' > | mulredc1.s:50: Error: bad register name `%rsi' > | mulredc1.s:51: Error: bad register name `%rdx' > | mulredc1.s:52: Error: bad register name `%rax' > | mulredc1.s:53: Error: bad register name `%r8' > | mulredc1.s:54: Error: bad register name `%rcx' > | mulredc1.s:55: Error: bad register name `%r9' > | mulredc1.s:57: Error: bad register name `%r10' > | mulredc1.s:58: Error: bad register name `%rdx' > | mulredc1.s:59: Error: bad register name `%rax' > | make[5]: *** [mulredc1.lo] Error 1 > | rm mulredc1.s > | make[5]: Leaving directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src/x86_64' > | make[4]: *** [all-recursive] Error 1 > | make[4]: Leaving directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src' > | make[3]: *** [all] Error 2 > | make[3]: Leaving directory > `/home/rbrito/Downloads/sage-5.5/spkg/build/ecm-6.3.p8/src' > | Error building GMP-ECM. > | > | real0m11.086s > | user0m3.416s > | sys 0m1.828s > ` > > As you can see, it is trying to use x86_64 registers and failing at that > point. > > Please let me know of any further information needed. > > > Thanks, > > -- > Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFC > http://rb.doesntexist.org/blog : Projects : https://github.com/rbrito/ > DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: sage crashes on this input
Hi Michael, On 2013-01-14, Michael Beeson wrote: > --=_Part_111_11990633.1358202706289 > Content-Type: text/plain; charset=ISO-8859-1 > > sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) > sage: R. = K[] > sage: a = x^3-x^-3 > sage: b = x^5-x^-5 > sage: c = x^8-x^-8 Are you aware that a, b, c do *not* live in R? sage: a.parent() is R False In fact, your computations take place in a very complicated ring, namely in the fraction field of a polynomial ring in x with coefficients in the fraction field of a polynomial ring with variables p,d,e,N. If you want to invert x anyway, then it would probably make sense to simply work in the fraction field of the polynomial ring with variables x,p,d,e,N. Or do you have a particular reason not to work there? > sage: X = p*a + d*b + e*c > sage: f = x^16 *(X^2- N*b*c) > > and Sage does not answer. It just hangs... I can confirm that it hangs (or at least takes long time, after all this complicated ring has no efficient implementation), but... > ... and I have to kill the session. ... I can simply interrupt with Ctrl-c, without killing the session (at least when I use a debug version of sage-5.6.beta1). Here is what happens if you work in a simpler (better implemented) ring: sage: K2. = QQ[] sage: a = x^3-x^-3 sage: b = x^5-x^-5 sage: c = x^8-x^-8 sage: X = p*a + d*b + e*c Sage automatically creates the fraction field of K2 when you invert x: sage: X.parent() Fraction Field of Multivariate Polynomial Ring in x, p, d, e, N over Rational Field And then sage: f = x^16 *(X^2- N*b*c) sage: f x^32*e^2 + 2*x^29*d*e - x^29*N + 2*x^27*p*e + x^26*d^2 + 2*x^24*p*d + x^22*p^2 - 2*x^21*p*e - 2*x^19*d*e - 2*x^18*p*d + x^19*N - 2*x^16*p^2 - 2*x^16*d^2 - 2*x^16*e^2 - 2*x^14*p*d - 2*x^13*d*e + x^13*N - 2*x^11*p*e + x^10*p^2 + 2*x^8*p*d + x^6*d^2 + 2*x^5*p*e + 2*x^3*d*e - x^3*N + e^2 works immediately. > If it would answer I would like to continue with > > F = R(f) > psi = cyclotomic_polynomial(30) > g = F.quo_rem(psi)[1] > g Let's try something similar. As you can see, all exponents are positive, and thus we can map the element into K2: sage: F = K2(f) sage: psi = cyclotomic_polynomial(30) sage: g = F.quo_rem(psi)[1] sage: g -x^7*p^2 - 6*x^7*p*d - 2*x^7*p*e - 4*x^6*p*d - 2*x^6*d*e + x^5*p^2 + 2*x^5*p*d + 2*x^5*p*e - 2*x^5*d*e + x^6*N + 4*x^4*p*d + 2*x^4*d*e + x^5*N + 8*x^3*p*d + 4*x^3*d*e - x^4*N + 4*x^2*p*d + 2*x^2*p*e + 2*x^2*d*e + x^2*e^2 - 2*x^3*N + 2*x*p^2 - 2*x*p*d + 3*x*d^2 + 2*x*p*e + 2*x*d*e + 2*x*e^2 - x^2*N - p^2 - 6*p*d + e^2 - x*N Does that work as you wanted it to be? Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: sage crashes on this input
On Monday, January 14, 2013 2:31:46 PM UTC-8, Michael Beeson wrote: > > sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) > Why not just sage: K. = PolynomialRing(QQ,4,'pdeN') > With this change, sage doesn't hang (for me). Oh, I see, later you need field coefficients. sage: R. = K[] > sage: a = x^3-x^-3 > sage: b = x^5-x^-5 > sage: c = x^8-x^-8 > sage: X = p*a + d*b + e*c > sage: f = x^16 *(X^2- N*b*c) > > and Sage does not answer. It just hangs and I have to kill the session. > If it would answer I would like to continue with > > F = R(f) > When I do this, I get TypeError: denominator must be a unit sage: f.denominator() x^45 Starting over: sage: P. = (PolynomialRing(QQ,4,'pdeN') sage: R. = P[] sage: a = x^3-x^-3 sage: b = x^5-x^-5 sage: c = x^8-x^-8 sage: X = p*a + d*b + e*c sage: f = x^16 *(X^2- N*b*c) sage: K = FractionField(P) sage: S. = K[] sage: F = S(f.numerator()) # not sure if this is what you want sage: psi = cyclotomic_polynomial(30) sage: g = F.quo_rem(psi)[1] sage: g (p^2 + 6*p*d + 2*p*e)*x^7 + (4*p*d + 2*d*e - N)*x^6 + (-p^2 - 2*p*d - 2*p*e + 2*d*e - N)*x^5 + (-4*p*d - 2*d*e + N)*x^4 + (-8*p*d - 4*d*e + 2*N)*x^3 + (-4*p*d - 2*p*e - 2*d*e - e^2 + N)*x^2 + (-2*p^2 + 2*p*d - 3*d^2 - 2*p*e - 2*d*e - 2*e^2 + N)*x + p^2 + 6*p*d - e^2 -- John -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: sage crashes on this input
So one problem with the original post was that the thing I was trying to cast to a polynomial isn't a polynomial. I should have multiplied by x^32, not x^16. The correct input works correctly (see below). Still, attempting to cast a rational function with too big a denominator to a polynomial ought to just fail, not crash. sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) sage: R. = K[] sage: a = x^3-x^-3 sage: b = x^5-x^-5 sage: c = x^8-x^-8 sage: X = p*a + d*b + e*c sage: X = R(x^8*X) sage: X e*x^16 + d*x^13 + p*x^11 - p*x^5 - d*x^3 - e sage: f = X^2 - N*b*c*x^32 sage: f = R(f) sage: psi = cyclotomic_polynomial(30) sage: f.quo_rem(psi)[1] (-p^2 - 6*p*d - 2*p*e - N)*x^7 + (-4*p*d - 2*d*e - N)*x^6 + (p^2 + 2*p*d + 2*p*e - 2*d*e + N)*x^5 + (4*p*d + 2*d*e + 2*N)*x^4 + (8*p*d + 4*d*e + N)*x^3 + (4*p*d + 2*p*e + 2*d*e + e^2 + N)*x^2 + (2*p^2 - 2*p*d + 3*d^2 + 2*p*e + 2*d*e + 2*e^2)*x - p^2 - 6*p*d + e^2 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: sage crashes on this input
oh, never mind, this isn't the same computation as I didn't square X. On Monday, January 14, 2013 2:54:08 PM UTC-8, Michael Beeson wrote: > > If I break the computation into smaller pieces it works OK: > > > sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) >> sage: R. = K[] >> sage: a = x^3-x^-3 >> sage: b = x^5-x^-5 >> sage: c = x^8-x^-8 >> sage: X = p*a +d*b + e*c >> sage: H = R(x^8 * X) >> sage: f = H - N*b*c*x^16 >> sage: f >> -N*x^29 + N*x^19 + e*x^16 + (d + N)*x^13 + p*x^11 - p*x^5 + (-d - N)*x^3 >> - e >> sage: psi = cyclotomic_polynomial(30) >> sage: psi >> x^8 + x^7 - x^5 - x^4 - x^3 + x + 1 >> sage: f.quo_rem(psi)[1] >> -d*x^7 + (p + N)*x^6 + (-p + d + N)*x^5 + (d - N)*x^4 + (-d - 2*N)*x^3 - >> N*x^2 + (-p - d - e - N)*x - d - e >> > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: sage crashes on this input
If I break the computation into smaller pieces it works OK: sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) > sage: R. = K[] > sage: a = x^3-x^-3 > sage: b = x^5-x^-5 > sage: c = x^8-x^-8 > sage: X = p*a +d*b + e*c > sage: H = R(x^8 * X) > sage: f = H - N*b*c*x^16 > sage: f > -N*x^29 + N*x^19 + e*x^16 + (d + N)*x^13 + p*x^11 - p*x^5 + (-d - N)*x^3 - > e > sage: psi = cyclotomic_polynomial(30) > sage: psi > x^8 + x^7 - x^5 - x^4 - x^3 + x + 1 > sage: f.quo_rem(psi)[1] > -d*x^7 + (p + N)*x^6 + (-p + d + N)*x^5 + (d - N)*x^4 + (-d - 2*N)*x^3 - > N*x^2 + (-p - d - e - N)*x - d - e > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] sage crashes on this input
sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) sage: R. = K[] sage: a = x^3-x^-3 sage: b = x^5-x^-5 sage: c = x^8-x^-8 sage: X = p*a + d*b + e*c sage: f = x^16 *(X^2- N*b*c) and Sage does not answer. It just hangs and I have to kill the session. If it would answer I would like to continue with F = R(f) psi = cyclotomic_polynomial(30) g = F.quo_rem(psi)[1] g -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Converting a symbolic expression to a power series and substituting another power series
You can't substitute power series into the symbolic ring, since power series are not objects of the symbolic ring. It just doesn't make sense in general. You can substitute power series into polynomials; This also makes mathematical sense: sage: f_symb (t1, t2) |--> t1*t2 sage: f_symb.polynomial(QQ) t1*t2 sage: _.parent() Multivariate Polynomial Ring in t1, t2 over Rational Field sage: f_symb.polynomial(QQ).subs(t1=x1, t2=x2) x1*x2 On Monday, January 14, 2013 9:39:00 PM UTC, marco nijmeijer wrote: > > Thank you. That is a good point although I still do not see how it solves > the issue. Suppose I define f_symb as > > f_symb(t1,t2)=t1*t2 > > to avoid the confusion of using identical variable-names meaning different > things, what would I have to do to convert f_symb to f such that I can do > the substitution? Help is much appreciated. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Converting a symbolic expression to a power series and substituting another power series
Thank you. That is a good point although I still do not see how it solves the issue. Suppose I define f_symb as f_symb(t1,t2)=t1*t2 to avoid the confusion of using identical variable-names meaning different things, what would I have to do to convert f_symb to f such that I can do the substitution? Help is much appreciated. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
Re: [sage-support] Re: how to compute group extensions?
sorry G should be H throughout, in my last post. 2013/1/14 Pierre Guillot : > partially answering my own question: for the "lame but easy method", > one can do the following. Having a putative group H, try: > > for x in [g for g in G.Centre().Elements() if g.Order() == 2]: > Q= G.FactorGroupNC( G.Subgroup([ x ]) ) # no idea why NC > if Q.IdGroup() == what you want > return True > > ... or something. > > 2013/1/14 Pierre : >> Thanks, I thought about this, but I'm not sure how to pick central elements >> of order 2 in a group, or more precisely in a group that is given by >> gap("SmallGroup(n,i)"). I can try C= G.centre() and then get C.generators() >> but i'm not sure if I can assume anything about these generators (I doubt >> that they generate cyclic subgroups whose *direct* product is C). >> >> Am I missing something easy? >> >> Le lundi 14 janvier 2013 13:35:05 UTC+1, Volker Braun a écrit : >>> >>> Lame but easy method: Go though all groups with 2*G.Size() elements and >>> pick out the ones you want. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To post to this group, send email to sage-support@googlegroups.com. >> To unsubscribe from this group, send email to >> sage-support+unsubscr...@googlegroups.com. >> Visit this group at http://groups.google.com/group/sage-support?hl=en. >> >> > > > > -- > Pierre > 06 06 40 72 28 -- Pierre 06 06 40 72 28 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
Re: [sage-support] Re: how to compute group extensions?
partially answering my own question: for the "lame but easy method", one can do the following. Having a putative group H, try: for x in [g for g in G.Centre().Elements() if g.Order() == 2]: Q= G.FactorGroupNC( G.Subgroup([ x ]) ) # no idea why NC if Q.IdGroup() == what you want return True ... or something. 2013/1/14 Pierre : > Thanks, I thought about this, but I'm not sure how to pick central elements > of order 2 in a group, or more precisely in a group that is given by > gap("SmallGroup(n,i)"). I can try C= G.centre() and then get C.generators() > but i'm not sure if I can assume anything about these generators (I doubt > that they generate cyclic subgroups whose *direct* product is C). > > Am I missing something easy? > > Le lundi 14 janvier 2013 13:35:05 UTC+1, Volker Braun a écrit : >> >> Lame but easy method: Go though all groups with 2*G.Size() elements and >> pick out the ones you want. > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To post to this group, send email to sage-support@googlegroups.com. > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > -- Pierre 06 06 40 72 28 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: how to compute group extensions?
Thanks, I thought about this, but I'm not sure how to pick central elements of order 2 in a group, or more precisely in a group that is given by gap("SmallGroup(n,i)"). I can try C= G.centre() and then get C.generators() but i'm not sure if I can assume anything about these generators (I doubt that they generate cyclic subgroups whose *direct* product is C). Am I missing something easy? Le lundi 14 janvier 2013 13:35:05 UTC+1, Volker Braun a écrit : > > Lame but easy method: Go though all groups with 2*G.Size() elements and > pick out the ones you want. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: how to compute group extensions?
Lame but easy method: Go though all groups with 2*G.Size() elements and pick out the ones you want. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Converting a symbolic expression to a power series and substituting another power series
Reusing variable names is generally a recipe for confusion: R.=PowerSeriesRing(SR) P.=PolynomialRing(QQ) Now R and P have variables that print as "x1" and "x2", but of course they are still different variables. Now compare sage: f x1*x2 + O(x1, x2)^3 sage: f[2]# the degree-2 part in the power series variables x1*x2 sage: f2 x1*x2 + O(x1, x2)^3 sage: f2[0]# the degree-0 part in the power series variables x1*x2 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] how to compute group extensions?
hello, I was wondering how to ask Sage for the following: given a finite group G, find the complete list of groups H such that G = H/C_2, where C_2 is a *central* subgroup of order 2 in H. If I create a group with say G= gap("SmallGroup(4, 2)") then I can see that the "Extensions" method should in principle do the trick. However the documentation is for GAP rather than Sage and I'm not sure how to proceed. I thought maybe this would be trivial for someone around here... thanks! Pierre -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Converting a symbolic expression to a power series and substituting another power series
Hello, I am quite new to Sage. I have a science background but am a stranger to rings, fields and other advanced mathematical topics which seem central in working with Sage. Having struggled with the issue below for quite a while though, I decided to post it. I have a power series f in x1 and x2 and want to substitute x1 and x2 with a power series in y to finally obtain a power series in y. The code below is an example of the idea and seems to work fine: c= var('c') R.=PowerSeriesRing(SR) Y.=PowerSeriesRing(SR) f=x1*x2+R.O(3) g1=y g2=c*y r=f.substitute(x1=g1,x2=g2);r c*y^2 + O(y^3) The issue is that at first instance I obtain f as a symbolic expression f_symb, not as a power series. So the idea is to convert the symbolic expression to a power series first and then carry out the same substitution as above f_symb(x1,x2)=x1*x2 P.=PolynomialRing(QQ) f_poly = P(f_symb) f2 = R(f_poly)+R.O(3) It appears that f2 is exactly the same as f: f;type(f);f2;type(f2) x1*x2 + O(x1, x2)^3 x1*x2 + O(x1, x2)^3 However, if I now try to carry out the substitution, an error appears: r=f2.substitute(x1=g1,x2=g2) Traceback (click to the left of this block for traceback) ... AttributeError: 'sage.symbolic.expression.Expression' object has no attribute 'add_bigoh' It turns out that the error is due to the part "+R.O(3)" in the definition of f2. Leaving out this part, there is no error. But then Sage does not know anymore till what order it should expand. My apologies if this is a basic question, which it seems to be. But as I said, I have been stuck with this for quite a while. Thanks for any help provided! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.
Re: [sage-support] Re: Graph plotting problem. Everything looks small.
Oh. I see. It's just that the default layout does not like disconnected graphs at all. Your graph ha many connected components, and it would be best to print them independently :-) for cc in CG.connected_components_subgraphs(): cc.show() Nathann -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.