[sage-support] Rendering tables in jupyter notebook

2022-11-19 Thread Gaurish Telang


I want to create a neat table of the factorization of several polynomials 
of the form [image: x^n-1] in the ring Z/3Z [x]. 

This is my code, which I am using inside of a Jupyter notebook that works 
as expected:

R = IntegerModRing(3) 
x = PolynomialRing(R, 'x').gen()

rows  = []
for k in range(1,10):
f = x^k - 1
factor = f.factor()
rows.append((f,factor))

table(rows, header_row=["Polynomial ", "Factorization"], frame=True)

However, the output produced is ugly and looks like the one in the 
attachment; it leaves a lot of space on the right but the factorization is 
spread across multiple rows. How can I ask Sage to place each factorization 
in the right column on a single line. 

Also is it possible for me to write [image: x^k-1] for various powers of 
[image: 
k] in latex in place of [image: x^k+2]. i.e. I want to write -1 wherever 
there is a 2 in the left column. Sure I can do this with print, but the 
output won’t be Latex rendered. 

​

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/8e6ac426-311f-4ab6-82e2-0be392d866dfn%40googlegroups.com.


[sage-support] Listing elements of a finite ring.

2022-11-19 Thread Gaurish Telang
I am afraid I cannot seem to find the answer to the following question in 
the docs. 

Suppose I have finite ring? How do I list all its elements? e.g.

```
R = PolynomialRing(GF(97),'x')
x = R.gen()

p = lambda x: x^2+2
S = R.quotient(p(x), 'a')
```

I would like to list all the elements of the quotient ring S. Is there a 
function/method that allows listing elements of S?

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b26ade6d-167d-4466-9247-29823197c49bn%40googlegroups.com.


Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread Raymond Rogers
BTW: I have used the Mathematica package on a Raspberry Pi3+ over vnc, 
and the setup works quite well.  It's not a brain dead version; it knows 
things about Generalized Hypergeometric functions; and gives answers in 
a reasonable time.  It's nice to know that I can send off a problem and 
have "somebody else" (the Raspberry) work on it while I do something 
else :)   I presume that this is legal?

I didn't do stress tests though; I normally use SageMath.

rrogers


On 11/19/22 14:58, William Stein wrote:

xcept when this use is for further development. For end-user


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f6242c64-a09c-7cb7-5f56-fb9b6820f7a6%40gmail.com.


Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread William Stein
On Sat, Nov 19, 2022 at 11:25 AM kcrisman  wrote:
>
> Though see this: 
> https://www.wolfram.com/engine/faq/#can-i-use-the-free-engine-in-an-open-source-project

That says " However, the Free Engine license does not permit end-user
use, except when this use is for further development. For end-user
uses, users must have a separate license for the Wolfram Engine."
which seems to me to make it crystal clear that it would not be legal
to install cocalc-docker (or even Jupyter notebook) and along with
Wolfram Engine and use it for any purpose except for development of
cocalc or Jupyter itself (i.e., to make sure the UI works).
Everything in that FAQ is about "developing a product".  This is a
license aimed at increasing the number of reasons people will buy
Mathematica, by being nice to developers who are building products
that use Mathematica.

The discussions like this

https://mathematica.stackexchange.com/questions/274333/wolfram-engine-jupyter-stackrel-mathematica

(and the corresponding reddit thread) seem to me to be wildly
optimistic in their interpretation.

Anyway, I'm not a lawyer, though I applaud Wolfram, Inc. for posting
that very clearly worded plain language FAQ instead of just some
massive wall of legalese.

William

> On Saturday, November 19, 2022 at 2:24:15 PM UTC-5 kcrisman wrote:
>>>
>>> The same could also apply to Cocalc ... except that Cocalc is also a 
>>> commercial product, therefore excluded from Wolfram terms for the *gratis* 
>>> Wolfram engine...
>>
>>
>> Technically if someone ran a Cocalc instance (say, from a Docker image) that 
>> was not commercial, maybe that would be okay?  (IANAL as usual.)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/58eebc97-408e-4511-bbc8-c1a61d19249en%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBGVdaisv4SN0g2ZPZXw%3DksWWv1ZXhX8JhaCq3F02xo7w%40mail.gmail.com.


Re: [sage-support] Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread William Stein
Hi,

I just read through the links you provide.  I hope I'm wrong, but it
seems pretty clear to me that
you absolutely cannot legally use Wolfram engine as part of
https://sagecell.sagemath.org
or https://cocalc.com without purchasing a license.   They do sell a
license that would make
it possible to  use Wolfram engine in these sites, and the cost would
be a function of "number
of virtual machines" (and maybe cpu's).

There seems to be no information on their pages about how much any of
their Wolfram engine
licenses cost for cloud computing use.  They do say the cost to
distribute Wolfram engine
with installed software is "typically $5–$100 per Wolfram Engine,
depending on volume
and application", so... **Pure speculation:** my guess is that they do
cloud licensing
on a similar case-by-case basis,  e.g., you have to record exactly
how/when it is getting
used, and probably pay Wolfram $5 per active user per month or
something like that.

 -- William

On Sat, Nov 19, 2022 at 8:36 AM Emmanuel Charpentier
 wrote:
>
> Dear list
>
> Now that the *gratis* (but by no means free) [Wofram 
> engine](https://www.wolfram.com/engine/) can be used for "pre-production" 
> projects, it seems to me that it *could* be installed on 
> `sagegell.sagemath.org`, this allowing access to the 
> `algorithm="mathematica"` options and, more generally, using Mathematica 
> algorithms for comparison with Sage ones... This is sometimes more than 
> useful...
>
> Technically, installing it on a Debian machine, and on a WSL installation of 
> Sage under Windows was a breeze. It should be possible to install it on 
> whatever runs the Sagecell server
>
> Legally, perusing the [FAQ](https://www.wolfram.com/engine/faq/) makes me 
> think that this use *could* be alowed unfer Wolfram's terms, but I am by no 
> means any kind of lawyer...
>
> The same could also apply to Cocalc ... except that Cocalc is also a 
> commercial product, therefore excluded from Wolfram terms for the *gratis* 
> Wolfram engine...
>
> Reactions ? Advices ?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/2b1592d2-85ab-4d55-886e-8da460abf604n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GCdaAaHZwjcgcGXERO9vs2LS8nPJ0y1HrHwfQJ8f%3DBNdA%40mail.gmail.com.


[sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread kcrisman
Though see 
this: 
https://www.wolfram.com/engine/faq/#can-i-use-the-free-engine-in-an-open-source-project

On Saturday, November 19, 2022 at 2:24:15 PM UTC-5 kcrisman wrote:

> The same could also apply to Cocalc ... except that Cocalc is also a 
>> commercial product, therefore excluded from Wolfram terms for the *gratis* 
>> Wolfram engine...
>>
>
> Technically if someone ran a Cocalc instance (say, from a Docker image) 
> that was not commercial, maybe that would be okay?  (IANAL as usual.)
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/58eebc97-408e-4511-bbc8-c1a61d19249en%40googlegroups.com.


[sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread kcrisman


> The same could also apply to Cocalc ... except that Cocalc is also a 
> commercial product, therefore excluded from Wolfram terms for the *gratis* 
> Wolfram engine...
>

Technically if someone ran a Cocalc instance (say, from a Docker image) 
that was not commercial, maybe that would be okay?  (IANAL as usual.)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d734a763-ba38-4e3a-9825-7c40bc2562f9n%40googlegroups.com.


Re: [sage-support] Re: differentiation in InfinitePolynomialRing

2022-11-19 Thread Max Alekseyev
Just for the record, I have created a 
ticket https://trac.sagemath.org/ticket/34758

Regards,
Max

On Monday, October 25, 2021 at 5:26:37 PM UTC-4 Max Alekseyev wrote:

> Btw, another there is another issue related to the order of indeterminates 
> described at 
> https://ask.sagemath.org/question/53319/
>
> Regards,
> Max
>
> On Thu, Sep 9, 2021 at 11:01 AM Max Alekseyev  wrote:
>
>> That would be nice to fix. Btw, there is also the same issue with formal 
>> integration - like in the example below:
>>
>> K. = PolynomialRing(QQ)
>> R. = InfinitePolynomialRing(K)
>> f = x[0] + x[1]
>> integrate(f,x[2])
>>
>> which fails while integrate(f,x[1]) works fine.
>>
>> Regards,
>> Max
>>
>> On Thursday, September 9, 2021 at 2:15:48 AM UTC-4 Simon King wrote:
>>
>>> Hi Nils, 
>>>
>>> can you open a ticket for it? 
>>>
>>> Best regards, 
>>> Simon 
>>>
>>> On 2021-09-08, Nils Bruin  wrote: 
>>> > On Wednesday, 8 September 2021 at 09:24:15 UTC-7 max...@gmail.com 
>>> wrote: 
>>> > 
>>> >> Hi Simon, 
>>> >> 
>>> >> Thank you for your insight, and let me state that I 
>>> >> find InfinitePolynomialRing useful in combinatorics to deal with 
>>> >> (truncated) multivariate generating functions with apriori unknown 
>>> number 
>>> >> of variables, and so basic operations (such as differentiation) on 
>>> >> polynomials would be very welcome here. Btw, is there 
>>> >> InfinitePowerSeriesRing or alike available by any chance? 
>>> >> 
>>> >> From what you said, I think it should be easy to fix (making it work) 
>>> at 
>>> >> least ISSUE#2 -- one just needs to extend the underlying finite 
>>> >> PolynomialRing with the differentiating variable(s) before delegating 
>>> the 
>>> >> actual differentiation to it. 
>>> >> 
>>> > 
>>> > I don't think any extending is required: if the differentiation 
>>> variables 
>>> > do no lie in the parent of the representing finite polynomial ring for 
>>> the 
>>> > actual element then the answer is 0. 
>>> > 
>>> > def derivative(self, *args): 
>>> > R=self._p.parent() 
>>> > try: 
>>> > L=[R(c) for c in args] 
>>> > except TypeError: #perhaps test a little more here 
>>> > return 
>>> > self.parent().zero() 
>>> > return R(self._p.derivative(*L)) 
>>> > 
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "sage-support" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/sage-support/dou4uqkc20w/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> sage-support...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/76251036-9144-4c1a-bba8-8150451eb493n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/c6c23d43-ee11-425a-b955-7fc3187b2cf9n%40googlegroups.com.


[sage-support] Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread Emmanuel Charpentier
Dear list

Now that the *gratis* (but by no means free) [Wofram 
engine](https://www.wolfram.com/engine/) can be used for "pre-production" 
projects, it seems to me that it *could* be installed on 
`sagegell.sagemath.org`, this allowing access to the 
`algorithm="mathematica"` options and, more generally, using Mathematica 
algorithms for comparison with Sage ones... This is sometimes more than 
useful...

Technically, installing it on a Debian machine, and on a WSL installation 
of Sage under Windows was a breeze. It should be possible to install it on 
whatever runs the Sagecell server

Legally, perusing the [FAQ](https://www.wolfram.com/engine/faq/) makes me 
think that this use *could* be alowed unfer Wolfram's terms, but I am by no 
means any kind of lawyer...

The same could also apply to Cocalc ... except that Cocalc is also a 
commercial product, therefore excluded from Wolfram terms for the *gratis* 
Wolfram engine...

Reactions ? Advices ?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/2b1592d2-85ab-4d55-886e-8da460abf604n%40googlegroups.com.