20191109 13:25:57 0600  answered a question  How to create a subgroup with MAGMA inside SAGE of a group created with MAGMA inside SAGE? As pointed out in a comment, there is a naming issue: you first create an object representing $S_4$ and bind it to the name The subgroup you want to make could be created via something like where sigma is the cycle $(1,2)$ represented in magma. This is difficult to obtain, because magma's syntax for creating permutation group elements is finicky: you need a "group context" to create it, and I don't think the standard interface tools allow you to do this. Ideally something like This works, though: I think going forward, your chances of success would be a little better by using sage's own wrappers of Gap's permutation groups: although that object sigma still doesn't know how to be translated to magma. Implementing that would be fairly straightforward, though (and it would end up doing the analogue of what is done above). 
20191105 21:19:36 0600  received badge  ● Good Answer (source) 
20191105 20:34:37 0600  commented answer  Latex multicolumn is not recognized (please ignore or delete this comment) 
20191105 10:31:37 0600  commented answer  linear algebra derivative expressions I suspect you have to write things out in explicit variables then. It looks like you basically want to work with a fairly general vector field. I'm not so sure a computer algebra system can help you much with that without you doing some pretty specific preprocessing. The examples you gave are (trivially) resolved. Perhaps a different example closer to what you want to accomplish would help. 
20191105 04:29:59 0600  received badge  ● Nice Answer (source) 
20191103 23:56:34 0600  answered a question  linear algebra derivative expressions I assume your matrix A has entries that do not depend on the entries of x? Then with $y=Ax$ you already define $y$ to be a linear function in $x$, so the derivative of $y$ with respect to $x$ is simply $x\mapsto A$. Similarly, assuming that $A$ a symmetric matrix that is independent of $x$ (otherwise your function doesn't deserve the name quadratic form) you have that the total derivative of $\alpha$ with respect to $x$ is simply $x\mapsto x^t A$. No computation necessary; just a calculus book. 
20191031 15:30:57 0600  answered a question  Output of @interact disappears when exporting Jupyter notebook to HTML This is not really a sage question anymore, since the interact feature is now realized by jupyter widgets, which exists outside of sage as well. That's good, because there is a larger community that may be able to help you. If you go to "widgets > embed widgets" you are offered copypastable html code that produces exactly the image that you want. So you get html that does what you want. I haven't been able to find a tool that automatically does the substitutions for you. In fact, this thread (or rather the lack of a satisfying response) suggests this might still be missing functionality. In general, the ipywidgets documentation is probably the way to go. As mentioned there jupytersphinx or nbsphinx may offer the functionality you are looking for. EDIT: (elevating one of the comments below for better visibility)

20191027 11:17:31 0600  commented answer  bus or segmentation fault calling integrate The error message shown here indicates it's maxima that blows up, and indeed, if you include the right initialization code in maxima, it crashes on this example. So it's a bug in maxima, as the other bugs are, The place to report them to get them worked on is maxima. The ticket referenced above is a dumping ground of (probably) maximarelated integration faults anyway. There's nog guarantee the examples there ae actually listed. So if you want to keep track of this example on trac too, then that ticket is a good one to put the example. The only way for that ticket to make progress is if someone takes the effort of reporting the cases listed there to maxima, in a way that the behaviour shows in maxima directly. 
20191026 23:06:42 0600  answered a question  bus or segmentation fault calling integrate Looks a lot like the reports on https://trac.sagemath.org/ticket/25636 by someone who shares your name. 
20191022 16:25:27 0600  answered a question  Can I git pull Sage if I compiled from source? Updating an already cloned gitrepository is normally done with http://doc.sagemath.org/html/en/devel... for more basic information to set up git properly with remote repositories to pull updates from. Once you have that set up (and are on, say, 
20191017 00:19:33 0600  answered a question  Looking for musical exercises using sage Producing sound (files) from python is pretty straightforward. Python has standard library support for it and more advanced packages that google can guide you to. This is not a task that sage specifically will be good at, but the python ecosystem should give you the basic tools for reading/writing sound data. Once you have the data you can analyse it and fourier transform it to your heart's content. Or you can produce wave forms and write them to sound files. For actually playing and recording sound (not just reading and writing sound files) you could look into something like pythonsounddevice or some other library, but be aware that if you are using a notebook (remotely!) the sound device on the server may not be the same as the sound device on the computer where your browser runs. In Jupyter, you may be able to use IPython.display.Audio. 
20191016 11:16:14 0600  answered a question  Finite field F_16=F_4[y]/(y**2+xy+1) (where F_4=F_2[x]/(x**2+x+1)) To construct GF(16) as a twostep extension, which is what it appears you are interested in, would go as follows. This has a slight problem: the field kxy constructed above is a relatively inefficient version of GF(16): sage just knows it's a quotient of a polynomial ring, whereas for GF(16) sage has a specialized implementation that should be quite fast. As suggested by dan_fuela one you can just construct GF(16) any way you want and then find the elements x,y with the desired properties in it. You don't have to exhaustively search the whole field for the right minimal polynomials to occur though: you can just ask sage to solve the relevant polynomial equation. In GF(16) it doesn't matter much because it's a tiny field, but enumerating larger fields quickly becomes undoable. 
20190929 15:08:02 0600  answered a question  I can't show special characters For If you want to work with nonascii characters, you should go for unicode. In Python3 that's going to be the default. At the moment we're still on Python2, so you should do something like If you do that, then you'll see that then The normal LaTeX way of typesetting a word like "rápido" would be as "r\'apido", but that doesn't seem to be supported in the notebook either. I think it would be entirely reasonable to open a featurerequest to let "show" support nonascii (and particularly accented) characters. 
20190920 01:42:55 0600  commented answer  Determining if two subgroups of a symmetric group are conjugate The problem is that 
20190920 01:40:22 0600  edited answer  Determining if two subgroups of a symmetric group are conjugate This is quite old, but since it is not answered: One way to do this is do use the (builtin) version of GAP to test the conjugacy. This has the function You need to turn everything into a GAPobject in order to do this. This returns EDIT: if you define You'll see that you get so the subgroups are conjugate, but not identical. Useful to know how to get this info, though! 
20190920 01:19:39 0600  commented question  Wrong hessian That is indeed astonishing. It would be much more useful if you would paste in the straight output that you get from 
20190918 11:53:41 0600  answered a question  What is DATA variable analog when running in Jupyter notebook? When you run code in a jupyter notebook, the code just runs with the current directory set to the location of the ipynb file. So if you execute something like 
20190826 13:10:53 0600  answered a question  LLL algorithm extended to linearly dependent vectors Have you tried the standard ".LLL" method on integer matrices? It seems to work fine on nonmaximal rank examples too. You might want to dig into the documentation of the underlying libraries to confirm that the results are intended to be valid. 
20190808 10:34:53 0600  answered a question  The shortest string containing all given substrings The program doesn't use any sagespecific functionality, and it doesn't have to. You can just use any correct python implementation. The routine presented seems like a verbatim copy of the one on https://en.wikipedia.org/wiki/De_Brui... . Note that the definition of a "de bruijn sequence" includes it's a cyclic sequence. So you should be appending the head of the sequence to the tail: 
20190731 11:47:21 0600  answered a question  can't display the inverse of complex matrix I think the problem is that you compute with symbolic matrices. Computations there can easily blow up horribly and I expect that is what's happening. The line: produces a new matrix with complexfloat entries, but since you don't assign it to anything, the resulting matrix just gets lost. You continue working with the symbolic matrix after that, and I think that just grinds to a halt due to explosion of intermediate expressions. Perhaps you meant to compute with a float approximation to the matrix instead? Note that computing a "kernel" of a float matrix generally doesn't work, because numerically matrices of nonmaximal rank aren't really distinguishable from maximal rank ones. Also computing the "inverse" numerically is generally tricky and requires special measures to get a bit of numerical stability. Sage unfortunately doesn't do that by default (in part because you're probably doing something wrong if you're computing an inverse numerically). 
20190725 00:55:44 0600  received badge  ● Nice Answer (source) 
20190724 16:49:20 0600  answered a question  Complex numerical integration: how can it be performed in SageMath? I think you can use something along the lines of which gets you a result along the lines of: Exciting part: these error bounds are meant to be certified! No other computer algebra package will give you certified numerical integrals. This is using ARB, see http://fredrikj.net/blog/2017/11/new... Caveat: this is rather new code, so the interface hasn't been tested very much yet. In particular, while the code above should propagate intervals properly through f, it could easily be the case that some funny intermediate coercion step loses a ball radius somewhere. The integrator does depend on correct propagation of ball radii. 
20190605 13:11:46 0600  answered a question  Explicitly clean all memory usage This is really a question about python memory management. If I'm not mistaken, python may under certain conditions give memory back to the OS, but claiming memory from the OS is quite an expensive operation, so for efficiency reasons, I'd expect python to be rather reluctant at doing so: most of the time it's better to keep a hold of the memory for reuse later. Another thing to be aware of: just because you delete one reference to the data structure doesn't necessarily imply the data structure can be garbage collected. It could be that the IPython history buffer holds a reference to it or that there's a debugging dataframe lying around that is still referencing the data structure. 
20190530 17:24:48 0600  answered a question  AttributeError: 'dict' object has no attribute 'solve' I don't think solve does what you hope it does. It seems from your code that you want to select elements from a groebner basis of bounded degree (I guess n is the length of G?) and want to find the solutions to those equations. If the equations you select still define a 0dimensional variety and you're interested in solutions that take values in the ground field, you might be able to do something like Putting your selected polynomials in a dictionary is probably not a good idea. You'd be better off putting them in a list, i.e. 
20190530 13:48:10 0600  answered a question  Why is exponentiation of points on elliptic curve so fast? Note that by constructing the group in the way you do, you get a group that is explicitly represented as an additive cyclic group (with an explicit generator). When you create random elements, the system probably just takes an appropriate random element by taking a random multiple of the generator and store it as such. As a consequence, if you then compute a multiple of THAT point, the system only has to multiply two integers and take it mod the order of the group to represent the element as a multiple of the generator. You're basically avoiding the discrete log problem by never taking "discrete exponentials". When you print the element, it looks like sage does perform the "discrete exp" (i.e., find the coordinate representation of the point). If you take the use of the wrapper out and time something like you get something more realistic, like 0.01 seconds per operation. 
20190522 15:09:09 0600  answered a question  Formal determinant of symbolic matrix I'm not so sure that 
20190520 11:57:55 0600  received badge  ● Nice Answer (source) 
20190518 02:28:57 0600  answered a question  How to recreate traceback? You should probably look at IPython.core.ultratb . It looks like that's the part of IPython that produces the colourful tracebacks. 
20190516 17:07:07 0600  answered a question  Derivative of a recurrence equation Does something like do the trick for you? 
20190424 20:36:16 0600  commented question  "from __future__ import print_function" fails on Sage scripts This is a deficiency in the preparser: this is an example of possible valid python input into the preparser that gets preparsed into iinvalid python instructions. The preparser shouldn't do that. We should check if there is a I'd suggest just taking all the "from __future__ ..." lines from the content and placing them on top. That way we could end up transforming invalid code into valid code, but that's not such a crime. 
20190423 10:39:39 0600  commented answer  Defining a 'nice' Compositum Once you have the field as a relative extension, you can get it as a primitive extension of Q via 
20190421 02:18:12 0600  answered a question  REPLlike output 1: That's what Python and IPython do. However if you do then even at the REPL prompt you won't see output. The REPL doesn't get to execute the individual commands and print their return values for you, because the commands are already packaged up in a function. 2: If your input is in "long_input_file.sage" you could use or then your input is still entered into sage "through the REPL": by redirecting STDIN. (assuming a unixtype command line environment) 
20190419 07:45:39 0600  received badge  ● Nice Answer (source) 