[sage-support] Re: Fail in installing both sage-numerical-backends-gurobi and sage-numerical-backends-coin

2024-07-27 Thread Matthias Koeppe
Which Sage version; logs please.

On Tuesday, July 23, 2024 at 8:28:06 AM UTC-7 Ziyan He wrote:

> When I try to use pip install to install sage-numerical-backends-gurobi, I 
> encounter the following error:
>
> Error compiling Cython file: 
>  ... # the Free 
> Software Foundation, either version 2 of the License, or # (at your option) 
> any later version. # https://www.gnu.org/licenses/ 
> #*
>  
> from sage.numerical.backends.generic_backend cimport GenericBackend ^ 
>  
> sage_numerical_backends_coin/coin_backend.pxd::0: 
> 'sage/numerical/backends/generic_backend.pxd' not found. 
>
> I'm certain that sage.numerical.backends.generic_backend is present in the 
> package. When installing sage-numerical-backends-coin, I encountered the 
> same issue. How can I resolve this?
>

-- 
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/7aa5e0a7-cda1-4f99-b0a0-8df4e0ed096an%40googlegroups.com.


[sage-support] Re: View does not work

2024-07-08 Thread Kwankyu
Try

https://github.com/sagemath/sage/pull/38339

On Sunday, June 23, 2024 at 12:37:52 PM UTC+9 Trey Davis wrote:

> I use wsl with Ubuntu 22.04.3 LTS installed. I installed sage from source 
> code (SageMath version 10.4.beta9.)  View does not work. When I try to use 
> it, it returns the error, "!  ==> Fatal error occurred, no output PDF file 
> produced!." Latex does work though.

-- 
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/f76e618b-62c1-450d-ad86-311aaae0499fn%40googlegroups.com.


[sage-support] Re: View does not work

2024-06-24 Thread Emmanuel Charpentier


The Sage wiki has a relevant section . 
I found it useful.

HTH,
​
Le dimanche 23 juin 2024 à 05:37:52 UTC+2, Trey Davis a écrit :

> I use wsl with Ubuntu 22.04.3 LTS installed. I installed sage from source 
> code (SageMath version 10.4.beta9.)  View does not work. When I try to use 
> it, it returns the error, "!  ==> Fatal error occurred, no output PDF file 
> produced!." Latex does work though.

-- 
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/c0b7b455-aa47-4a5d-9fc6-35052f75426cn%40googlegroups.com.


Re: [sage-support] Re: No doctests are executed in sage/modular/pollack_stevens/padic_lseries.py

2024-06-13 Thread Matthias Koeppe
I agree, the problem is that currently we cannot distinguish typo'd doctest 
tags from valid doctest tags that are not present.
Part of the solution: https://github.com/sagemath/sage/issues/35856

On Thursday, June 13, 2024 at 7:40:27 AM UTC-7 Vincent Delecroix wrote:

> Generalizing the problem of the OP : it is a severe issue that a tag
> can completely prevent a file from being tested.
>
> On Thu, 13 Jun 2024 at 11:23, Jens-Erik Riedel
>  wrote:
> >
> > Thanks to a hint by Dima I found the same typo in two other files.
> > In sage/structure/factory.pyx line 523 it prevents a doctest from being 
> run.
> > In sage/rings/polynomial/padics/polynomial_padic.py line 277 it is 
> merely cosmetic.
> > I will create a Pull Request with fixes for all three occurrences of 
> this typo.
> >
> > On Wednesday, June 12, 2024 at 4:46:45 PM UTC+2 julian...@gmail.com 
> wrote:
> >>
> >> Would you mind creating a Pull Request with these changes at 
> https://github.com/sagemath/sage?
> >>
> >> julian
> >>
> >> On Wednesday, June 12, 2024 at 5:31:01 PM UTC+3 jenseri...@t-online.de 
> wrote:
> >>>
> >>> When running "sage -t" on the file 
> sage/modular/pollack_stevens/padic_lseries.py no doctests are executed 
> although the file contains quite a lot of doctests.
> >>> I think the reason for that is a typo in the very first line of the 
> file:
> >>> # sage.doctest: needs sage.ring.padics
> >>> It must be "rings" instead of "ring.
> >>> This is in Sage 10.3 as well as in Sage 10.4.beta9.
> >>> There is another typo in line 177 of that file: In the doctest comment 
> a comma is missing between "indirect doctest" and "long time".
> >>> After having corrected these two typos all doctests in 
> sage/modular/pollack_stevens/padic_lseries.py are successfully executed.
> >
> > --
> > 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...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/9767d29d-889a-4906-abde-53c4d6340cddn%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/0687d493-48b2-4129-9926-f0191691b7d8n%40googlegroups.com.


[sage-support] Re: No doctests are executed in sage/modular/pollack_stevens/padic_lseries.py

2024-06-13 Thread Jens-Erik Riedel
I have created a pull request for this issue 
.

On Thursday 13 June 2024 at 11:22:54 UTC+2 Jens-Erik Riedel wrote:

> Thanks to a hint by Dima I found the same typo in two other files.
> In sage/structure/factory.pyx line 523 it prevents a doctest from being 
> run.
> In sage/rings/polynomial/padics/polynomial_padic.py line 277 it is merely 
> cosmetic.
> I will create a Pull Request with fixes for all three occurrences of this 
> typo.
>
> On Wednesday, June 12, 2024 at 4:46:45 PM UTC+2 julian...@gmail.com wrote:
>
>> Would you mind creating a Pull Request with these changes at 
>> https://github.com/sagemath/sage?
>>
>> julian
>>
>> On Wednesday, June 12, 2024 at 5:31:01 PM UTC+3 jenseri...@t-online.de 
>> wrote:
>>
>>> When running "sage -t" on the file 
>>> sage/modular/pollack_stevens/padic_lseries.py no doctests are executed 
>>> although the file contains quite a lot of doctests.
>>> I think the reason for that is a typo in the very first line of the file:
>>>   # sage.doctest: needs sage.ring.padics
>>> It must be "rings" instead of "ring.
>>> This is in Sage 10.3 as well as in Sage 10.4.beta9.
>>> There is another typo in line 177 of that file: In the doctest comment a 
>>> comma is missing between "indirect doctest" and "long time".
>>> After having corrected these two typos all doctests in 
>>> sage/modular/pollack_stevens/padic_lseries.py are successfully executed.
>>>
>>

-- 
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/b59e4f92-8e45-4827-a948-97cb4eb59764n%40googlegroups.com.


Re: [sage-support] Re: No doctests are executed in sage/modular/pollack_stevens/padic_lseries.py

2024-06-13 Thread Vincent Delecroix
Generalizing the problem of the OP : it is a severe issue that a tag
can completely prevent a file from being tested.

On Thu, 13 Jun 2024 at 11:23, Jens-Erik Riedel
 wrote:
>
> Thanks to a hint by Dima I found the same typo in two other files.
> In sage/structure/factory.pyx line 523 it prevents a doctest from being run.
> In sage/rings/polynomial/padics/polynomial_padic.py line 277 it is merely 
> cosmetic.
> I will create a Pull Request with fixes for all three occurrences of this 
> typo.
>
> On Wednesday, June 12, 2024 at 4:46:45 PM UTC+2 julian...@gmail.com wrote:
>>
>> Would you mind creating a Pull Request with these changes at 
>> https://github.com/sagemath/sage?
>>
>> julian
>>
>> On Wednesday, June 12, 2024 at 5:31:01 PM UTC+3 jenseri...@t-online.de wrote:
>>>
>>> When running "sage -t" on the file 
>>> sage/modular/pollack_stevens/padic_lseries.py no doctests are executed 
>>> although the file contains quite a lot of doctests.
>>> I think the reason for that is a typo in the very first line of the file:
>>>   # sage.doctest: needs sage.ring.padics
>>> It must be "rings" instead of "ring.
>>> This is in Sage 10.3 as well as in Sage 10.4.beta9.
>>> There is another typo in line 177 of that file: In the doctest comment a 
>>> comma is missing between "indirect doctest" and "long time".
>>> After having corrected these two typos all doctests in 
>>> sage/modular/pollack_stevens/padic_lseries.py are successfully executed.
>
> --
> 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/9767d29d-889a-4906-abde-53c4d6340cddn%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/CAGEwAAmCrAY3%2B_jBOe-rrRJf0cSX6X%2Bj%3DpRfwXNQLpT7SRY4zQ%40mail.gmail.com.


[sage-support] Re: No doctests are executed in sage/modular/pollack_stevens/padic_lseries.py

2024-06-13 Thread Jens-Erik Riedel
Thanks to a hint by Dima I found the same typo in two other files.
In sage/structure/factory.pyx line 523 it prevents a doctest from being run.
In sage/rings/polynomial/padics/polynomial_padic.py line 277 it is merely 
cosmetic.
I will create a Pull Request with fixes for all three occurrences of this 
typo.

On Wednesday, June 12, 2024 at 4:46:45 PM UTC+2 julian...@gmail.com wrote:

> Would you mind creating a Pull Request with these changes at 
> https://github.com/sagemath/sage?
>
> julian
>
> On Wednesday, June 12, 2024 at 5:31:01 PM UTC+3 jenseri...@t-online.de 
> wrote:
>
>> When running "sage -t" on the file 
>> sage/modular/pollack_stevens/padic_lseries.py no doctests are executed 
>> although the file contains quite a lot of doctests.
>> I think the reason for that is a typo in the very first line of the file:
>>   # sage.doctest: needs sage.ring.padics
>> It must be "rings" instead of "ring.
>> This is in Sage 10.3 as well as in Sage 10.4.beta9.
>> There is another typo in line 177 of that file: In the doctest comment a 
>> comma is missing between "indirect doctest" and "long time".
>> After having corrected these two typos all doctests in 
>> sage/modular/pollack_stevens/padic_lseries.py are successfully executed.
>>
>

-- 
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/9767d29d-889a-4906-abde-53c4d6340cddn%40googlegroups.com.


[sage-support] Re: No doctests are executed in sage/modular/pollack_stevens/padic_lseries.py

2024-06-12 Thread julian...@gmail.com
Would you mind creating a Pull Request with these changes at 
https://github.com/sagemath/sage?

julian

On Wednesday, June 12, 2024 at 5:31:01 PM UTC+3 jenseri...@t-online.de 
wrote:

> When running "sage -t" on the file 
> sage/modular/pollack_stevens/padic_lseries.py no doctests are executed 
> although the file contains quite a lot of doctests.
> I think the reason for that is a typo in the very first line of the file:
>   # sage.doctest: needs sage.ring.padics
> It must be "rings" instead of "ring.
> This is in Sage 10.3 as well as in Sage 10.4.beta9.
> There is another typo in line 177 of that file: In the doctest comment a 
> comma is missing between "indirect doctest" and "long time".
> After having corrected these two typos all doctests in 
> sage/modular/pollack_stevens/padic_lseries.py are successfully executed.
>

-- 
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/3de8b0bc-2831-4512-b59c-725b2314fd23n%40googlegroups.com.


[sage-support] Re: A problematic dictionary update (possible Maxima problem)

2024-06-01 Thread Emmanuel Charpentier


The damn thing *can* be done in Sage … by using Sympy :
# Use of Sympy import sympy sx, sy = sympy.symbols("sx, sy") SL = 
[sympy.sin, sympy.cos, sympy.tan, sympy.csc, sympy.sec, sympy.cot, 
sympy.sinh, sympy.cosh, sympy.tanh, sympy.csch, sympy.sech, sympy.coth] SIL 
= [sympy.asin, sympy.acos, sympy.atan, sympy.acsc, sympy.asec, sympy.acot, 
sympy.asinh, sympy.acosh, sympy.atanh, sympy.acsch, sympy.asech, 
sympy.acoth] px = sympy.Wild("px") SD={sx:px} foo=[dict(list(map(lambda 
v:[v.subs(SD), u[0].subs(SD)], u[1]))) for u in zip([w(sx) for w in SIL], 
[w for w in [sympy.solve((u(sy)-sx).rewrite("exp"), sy) for u in SL]])] 
sD=dict() for d in foo:sD|=d # Conversion to Sage 
Dic2={u._sage_().subs({px:w0}):sD[u]._sage_().subs({px:w0}) for u in 
sD.keys()} 

Indeed :
sage: Dic2 {-I*log(I*$0 - I*sqrt($0^2 - 1)): arcsin($0), -I*log(I*$0 + 
I*sqrt($0^2 - 1)): arcsin($0), -I*log($0 - sqrt($0^2 - 1)): arccos($0), 
-I*log($0 + sqrt($0^2 - 1)): arccos($0), -I*log(-sqrt(-($0 - I)/($0 + I))): 
arctan($0), -I*log(sqrt(-($0 - I)/($0 + I))): arctan($0), 
-I*log(-(sqrt($0^2 - 1) - I)/$0): arccsc($0), -I*log((sqrt($0^2 - 1) + 
I)/$0): arccsc($0), -I*log(-(sqrt(-$0^2 + 1) - 1)/$0): arcsec($0), 
-I*log((sqrt(-$0^2 + 1) + 1)/$0): arcsec($0), -I*log(-sqrt(($0 + I)/($0 - 
I))): arccot($0), -I*log(sqrt(($0 + I)/($0 - I))): arccot($0), log($0 - 
sqrt($0^2 + 1)): arcsinh($0), log($0 + sqrt($0^2 + 1)): arcsinh($0), log($0 
- sqrt($0^2 - 1)): arccosh($0), log($0 + sqrt($0^2 - 1)): arccosh($0), 
log(-sqrt(-($0 + 1)/($0 - 1))): arctanh($0), log(sqrt(-($0 + 1)/($0 - 1))): 
arctanh($0), log(-(sqrt($0^2 + 1) - 1)/$0): arccsch($0), log((sqrt($0^2 + 
1) + 1)/$0): arccsch($0), log(-(sqrt(-$0^2 + 1) - 1)/$0): arcsech($0), 
log((sqrt(-$0^2 + 1) + 1)/$0): arcsech($0), log(-sqrt(($0 + 1)/($0 - 1))): 
arccoth($0), log(sqrt(($0 + 1)/($0 - 1))): arccoth($0)} 

But the need for this workaround makes me suspect thai it might not be as 
useful as I wish it would be…

Hints ? Ideas ?

[ Even lazzi are welcome… ]
​
Le samedi 1 juin 2024 à 22:11:43 UTC+2, Emmanuel Charpentier a écrit :

> Context : finding patterns of explicit forms of inverse 
> (hyperbolic|trigonometric) functions for simplification.
>
> Simple solution :
> reset() y=SR.var("y") IL = [] w0=SR.wild(0) L=[sin, cos, tan, csc, sec, 
> cot, sinh, cosh, tanh, csch, sech, coth] for f in L: 
> R=(f(y)==x).solve(y)[0].rhs() for s in (f(y)==x).exponentialize().solve(y): 
> IL += [s.rhs().subs(x==w0)==R.subs(x==w0)] # End loop 
>
> This works. But I’d like to express this list as a dictionary. Brute-force 
> solution fails with a mysterious TypeError: ECL says: THROW: The catch 
> MACSYMA-QUIT is undefined.. But calling this on *parts* of the list seems 
> to work (not shown).
>
> Try a loop :
> ID=dict() for s in IL: ID[s.lhs()]=s.rhs() # End loop 
>
> This fails again :
> --- 
> RuntimeError Traceback (most recent call last) File 
> /usr/local/sage-10/src/sage/interfaces/interface.py:749, in 
> InterfaceElement.__init__(self, parent, value, is_name, name) 748 try: --> 
> 749 self._name = parent._create(value, name=name) 750 except (TypeError, 
> RuntimeError, ValueError) as x: File 
> /usr/local/sage-10/src/sage/interfaces/maxima_lib.py:632, in 
> MaximaLib._create(self, value, name) 631 else: --> 632 self.set(name, 
> value) 633 except RuntimeError as error: File 
> /usr/local/sage-10/src/sage/interfaces/maxima_lib.py:540, in 
> MaximaLib.set(self, var, value) 539 cmd = '%s : %s$' % (var, 
> value.rstrip(';')) --> 540 self.eval(cmd) File 
> /usr/local/sage-10/src/sage/interfaces/maxima_lib.py:486, in 
> MaximaLib._eval_line(self, line, locals, reformat, **kwds) 485 if 
> statement: --> 486 maxima_eval("#$%s$" % statement) 487 if not reformat: 
> File /usr/local/sage-10/src/sage/libs/ecl.pyx:837, in 
> sage.libs.ecl.EclObject.__call__() 836 """ --> 837 lispargs = 
> EclObject(list(args)) 838 return ecl_wrap(ecl_safe_apply(self.obj, 
> (lispargs).obj)) File 
> /usr/local/sage-10/src/sage/libs/ecl.pyx:698, in 
> sage.libs.ecl.EclObject.__init__() 697 elif len(args) == 1: --> 698 
> self.set_obj(python_to_ecl(args[0], True)) 699 elif len(args) == 2: File 
> /usr/local/sage-10/src/sage/libs/ecl.pyx:481, in 
> sage.libs.ecl.python_to_ecl() 480 for i in range(len(pyobj) - 1, -1, -1): 
> --> 481 L = cl_cons(python_to_ecl(pyobj[i], read_strings), L) 482 return L 
> File /usr/local/sage-10/src/sage/libs/ecl.pyx:458, in 
> sage.libs.ecl.python_to_ecl() 457 if read_strings: --> 458 return 
> ecl_safe_funcall(read_from_string_clobj, o) 459 else: File 
> /usr/local/sage-10/src/sage/libs/ecl.pyx:342, in 
> sage.libs.ecl.ecl_safe_funcall() 341 else: --> 342 raise RuntimeError("ECL 
> says: {}".format(message)) 343 else: RuntimeError: ECL says: THROW: The 
> catch MACSYMA-QUIT is undefined. During handling of the above exception, 
> another exception occurred: TypeError Traceback (most recent call last) 
> Cell In[231], line 1 > 1 

[sage-support] Re: [sage-devel] Re: Proposal (redo): Make pytest, pytest_mock, pytest_xdist + dependencies standard packages

2024-06-01 Thread Dima Pasechnik
On Sat, Jun 1, 2024 at 7:18 PM Matthias Koeppe  wrote:
>
> I'll share some additional facts for everyone's convenience.
>
> The total size of these 5 wheel packages to be added in 
> https://github.com/sagemath/sage/pull/37301is about 500 kilobytes. (As a 
> comparison, that's 10% of the size of our "configure" script.)
>
> -rw-r--r--  1 mkoeppe  staff   40612 May 22 12:47 
> upstream/execnet-2.1.1-py3-none-any.whl
> -rw-r--r--  1 mkoeppe  staff5892 May 22 12:57 
> upstream/iniconfig-2.0.0-py3-none-any.whl
> -rw-r--r--  1 mkoeppe  staff  339593 May 22 12:48 
> upstream/pytest-8.2.1-py3-none-any.whl
> -rw-r--r--  1 mkoeppe  staff9863 May 22 12:47 
> upstream/pytest_mock-3.14.0-py3-none-any.whl
> -rw-r--r--  1 mkoeppe  staff   46108 May 22 12:48 
> upstream/pytest_xdist-3.6.1-py3-none-any.whl
>
> On Thursday, May 30, 2024 at 3:25:08 PM UTC-7 Matthias Koeppe wrote:
>
> I ask everyone to focus on the specifics of this proposal.
>
>
> In particular, I'll suggest to refrain from engaging with generic warnings 
> about "bloat", hypothetical scenarios about expensive bandwidth and storage, 
> "backdooring", etc.

In other words, you explicitly encourage everyone to be extremely
myopic  about the project.
Let's keep doing as we always do, don't change anything, don't be
pro-active in preventing possible future troubles,
right?

I am sorry, Matthias, it is not a good idea.

Dima


>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/e43816ba-a3eb-4b45-a0c9-b365d8b569c9n%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/CAAWYfq217wv8ZXit4%3DWEhhkGYQ%3D5XOOThqt%2Bk8cSNb%3Dc3Q0Q6g%40mail.gmail.com.


Re: [sage-support] Re: Does sagemath support something similar to numpy's einsum for symbolic arrays?

2024-05-29 Thread Anton Todorov
After a long search I found something that meets what I need:
https://docs.sympy.org/latest/modules/tensor/array.html

It allows for tensors to be used as they are in ML and lets you use
symbolic and numerical expressions with all the usual mathematical
manipulations built on top.

It's not sagemath per se, but I did get it working within sagemath quite
easily.

On Sun, Apr 21, 2024 at 12:12 AM Anton Todorov 
wrote:

> Looks close but not quite.
>
> I'm interested in what's described here:
> https://stats.stackexchange.com/a/198395
>
> Basically a dumb as bricks extension to matrices to higher dimensions with
> a contraction along selectable axes, with no notion of co and
> contravariance, and ability to have any number of elements in each
> dimension, e.g. a (8,1,512) shaped tensor (or n-way-array) should be
> possible.
>
> From what I've seen of tensors with indices are forced to be n-dimensional
> cubes (along with having the co and contravariant limitations to
> contractions).
>
> On Tue, Apr 16, 2024 at 12:19 PM Matthias Koeppe 
> wrote:
>
>> You might be looking for
>> https://doc.sagemath.org/html/en/reference/tensor_free_modules/sage/tensor/modules/tensor_with_indices.html
>>
>> On Tuesday, April 9, 2024 at 6:59:27 AM UTC-7 Anton Todorov wrote:
>>
>>> Einsum:
>>> https://numpy.org/doc/stable/reference/generated/numpy.einsum.html
>>>
>>> It is a way to define multiple operations on arrays of arbitrary shape.
>>> I've not seen anything that suggests this is implemented in sagemath, but I
>>> was hoping there might be something hidden.
>>>
>>> What I need this for is to calculate symbolic results of array
>>> operations which are too cumbersome to represent as matrix operations.
>>>
>> --
>> 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/Jg64P1k2YfI/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/9acdf077-64a3-4034-8835-e1d806e0e049n%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/CAG%2Bkvu%3DP_CMhGwTL_B3XG%2B_AwF8rzqiSeHTH5Z8uJmaWYwixdg%40mail.gmail.com.


[sage-support] Re: EC question

2024-05-01 Thread John Cremona
False alarm -- the current version of Safe computes this correctly,
presumably because of the bugfix I made.

So this is no longer a Sage issue, but the LMFDB will need to be corrected.

John

On Wed, 1 May 2024 at 08:51, John Cremona  wrote:

> This looks like the same bug as I reported at
> https://github.com/sagemath/sage/issues/36780 five months ago and
> supposedly fixed via a PR (https://github.com/sagemath/sage/pull/36786).
> It's the same bug (over Q(sqrt(5)), j=0, missing a 5-isogeny) so clearly my
> fix was incorrect.
>
> The curve is defined by
> sage: K. = NumberField(x^2-5)
> sage: t = -4320 - 1944*r
> sage: E = EllipticCurve([0, -27*t^2, 0, 216*t^3*(t - 27), -432*t^4*(t -
> 27)^2])
> sage: E.has_cm()
> True
> sage: E.cm_discriminant()
> -75
> sage: C = E.isogeny_class()
> sage: len(C)
> 6
> sage: C.matrix()[0]
> (1, 25, 75, 3, 5, 15)
>
> This is all correct, the class has size 6 and 3- and 5- isogenies suffice
> to fill it.  But the class contains two curves defined over Q for example
> sage: E1 = C[5]; E1.ainvs()
> (0, 0, 1, 0, 1)
> sage: E1.j_invariant()
> 0
> sage: E1.base_field() == K
> True
>
> and computing the isogeny class starting with E1 does not find the whole
> class as it misses 5-isogenies:
>
> sage: len(E1.isogeny_class())
> 2
>
> The problem is in the function possible_isogeny_degrees_cm():
> sage: from sage.schemes.elliptic_curves.isogeny_class import
> isogeny_degrees_cm
> sage: isogeny_degrees_cm(E1, verbose=True)
> CM case, discriminant = -3
> initial primes: {2, 3}
> ramified primes: {3}
> downward split primes: {}
> downward inert primes: {}
> Complete set of primes: {2, 3}
> [2, 3]
>
> Here, "downward" primes are sgrees of isogenies to curves with a strictly
> smaller endomorphism ring and in this case should inlude 5.  I cannot right
> now see the error in the code but am building the current development
> branch and will sort this out.
>
> John
>
> On Tue, 30 Apr 2024 at 17:08, John Cremona  wrote:
>
>> I can confirm that your curve is isogenous (and not isomorphic) to the
>> ones in the LMFDB.  The isogeny class computed by Sage from your curve has
>> 6 curves in it.  That means that there is a bug in Sage's isogeny class
>> code -- which I wrote most of.  I hope that it is something specific to
>> j-invariant 0, which is (as always) treated separately.
>>
>> I will investigate the Sage bug, and when it is fixed I will recompute
>> all the isogeny classes in the LMFDB.  This will not be done very soon.
>>
>> Thanks for the report!
>>
>> John
>>
>> On Tue, 30 Apr 2024 at 16:42, Zhengyu Tao 
>> wrote:
>>
>>> Thanks for your reply! The coefficients of my curve is [0, -27*t^2, 0,
>>> 216*t^3*(t - 27), -432*t^4*(t - 27)^2] with t = -4320 - 1944\sqrt{5}.
>>>
>>> -- Original --
>>> *From: * "John Cremona";
>>> *Date: * Tue, Apr 30, 2024 11:35 PM
>>> *To: * "John Jones";
>>> *Cc: * "lmfdb-support"; "taozhy"<
>>> tao...@smail.nju.edu.cn>;
>>> *Subject: * Re: EC question
>>>
>>> The isogeny classes in the LMFDB are supposed to be complete.  I see
>>> that curve 2.2.5.1-2025.1-d2 has coefficients (0, 0, 1, 0, -34) while the
>>> isogenous curve d1 has coefficients (0, 0, 1, 0, 1), both with j-invariant
>>> 0 and conductor (45) over this field.   They are quadratic twists of each
>>> other by -3.
>>>
>>> What are the coefficients of the curve you have?  If it is not
>>> isomorphic to either of these then there is a bug in Sage, which was used
>>> to compute the isogeny classes.
>>>
>>> John Cremona
>>>
>>> On Tue, 30 Apr 2024 at 16:08, John Jones  wrote:
>>>
 From the feedback page:

 Hi LMFDB devs,

 In a recent problem I'm working on, I need to compute a (CM) elliptic
 curve over Q(\sqrt{5}). When I searched it in LMFDB, it seems that it is
 not included. However, I found that my curve seems isogenous (over
 Q(\sqrt{5})) to the curve 2.2.5.1-2025.1-d2. In fact, I have constructed
 the isogeny from my curve to 2.2.5.1-2025.1-d2 using velu'formula.

 My qusetion is: is the isogeny classes in LMFDB complete? I.e., is each
 isomorphism class (over the base field) in a isogeny class has a
 representative in LMFDB's "isogeny class"?

 Best regards,
 Zhengyu Tao

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

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and 

[sage-support] Re: EC question

2024-05-01 Thread John Cremona
This looks like the same bug as I reported at
https://github.com/sagemath/sage/issues/36780 five months ago and
supposedly fixed via a PR (https://github.com/sagemath/sage/pull/36786).
It's the same bug (over Q(sqrt(5)), j=0, missing a 5-isogeny) so clearly my
fix was incorrect.

The curve is defined by
sage: K. = NumberField(x^2-5)
sage: t = -4320 - 1944*r
sage: E = EllipticCurve([0, -27*t^2, 0, 216*t^3*(t - 27), -432*t^4*(t -
27)^2])
sage: E.has_cm()
True
sage: E.cm_discriminant()
-75
sage: C = E.isogeny_class()
sage: len(C)
6
sage: C.matrix()[0]
(1, 25, 75, 3, 5, 15)

This is all correct, the class has size 6 and 3- and 5- isogenies suffice
to fill it.  But the class contains two curves defined over Q for example
sage: E1 = C[5]; E1.ainvs()
(0, 0, 1, 0, 1)
sage: E1.j_invariant()
0
sage: E1.base_field() == K
True

and computing the isogeny class starting with E1 does not find the whole
class as it misses 5-isogenies:

sage: len(E1.isogeny_class())
2

The problem is in the function possible_isogeny_degrees_cm():
sage: from sage.schemes.elliptic_curves.isogeny_class import
isogeny_degrees_cm
sage: isogeny_degrees_cm(E1, verbose=True)
CM case, discriminant = -3
initial primes: {2, 3}
ramified primes: {3}
downward split primes: {}
downward inert primes: {}
Complete set of primes: {2, 3}
[2, 3]

Here, "downward" primes are sgrees of isogenies to curves with a strictly
smaller endomorphism ring and in this case should inlude 5.  I cannot right
now see the error in the code but am building the current development
branch and will sort this out.

John

On Tue, 30 Apr 2024 at 17:08, John Cremona  wrote:

> I can confirm that your curve is isogenous (and not isomorphic) to the
> ones in the LMFDB.  The isogeny class computed by Sage from your curve has
> 6 curves in it.  That means that there is a bug in Sage's isogeny class
> code -- which I wrote most of.  I hope that it is something specific to
> j-invariant 0, which is (as always) treated separately.
>
> I will investigate the Sage bug, and when it is fixed I will recompute all
> the isogeny classes in the LMFDB.  This will not be done very soon.
>
> Thanks for the report!
>
> John
>
> On Tue, 30 Apr 2024 at 16:42, Zhengyu Tao  wrote:
>
>> Thanks for your reply! The coefficients of my curve is [0, -27*t^2, 0,
>> 216*t^3*(t - 27), -432*t^4*(t - 27)^2] with t = -4320 - 1944\sqrt{5}.
>>
>> -- Original --
>> *From: * "John Cremona";
>> *Date: * Tue, Apr 30, 2024 11:35 PM
>> *To: * "John Jones";
>> *Cc: * "lmfdb-support"; "taozhy"<
>> tao...@smail.nju.edu.cn>;
>> *Subject: * Re: EC question
>>
>> The isogeny classes in the LMFDB are supposed to be complete.  I see
>> that curve 2.2.5.1-2025.1-d2 has coefficients (0, 0, 1, 0, -34) while the
>> isogenous curve d1 has coefficients (0, 0, 1, 0, 1), both with j-invariant
>> 0 and conductor (45) over this field.   They are quadratic twists of each
>> other by -3.
>>
>> What are the coefficients of the curve you have?  If it is not isomorphic
>> to either of these then there is a bug in Sage, which was used to compute
>> the isogeny classes.
>>
>> John Cremona
>>
>> On Tue, 30 Apr 2024 at 16:08, John Jones  wrote:
>>
>>> From the feedback page:
>>>
>>> Hi LMFDB devs,
>>>
>>> In a recent problem I'm working on, I need to compute a (CM) elliptic
>>> curve over Q(\sqrt{5}). When I searched it in LMFDB, it seems that it is
>>> not included. However, I found that my curve seems isogenous (over
>>> Q(\sqrt{5})) to the curve 2.2.5.1-2025.1-d2. In fact, I have constructed
>>> the isogeny from my curve to 2.2.5.1-2025.1-d2 using velu'formula.
>>>
>>> My qusetion is: is the isogeny classes in LMFDB complete? I.e., is each
>>> isomorphism class (over the base field) in a isogeny class has a
>>> representative in LMFDB's "isogeny class"?
>>>
>>> Best regards,
>>> Zhengyu Tao
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "lmfdb-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to lmfdb-support+unsubscr...@googlegroups.com.
>>> To view this discussion on the web, visit
>>> https://groups.google.com/d/msgid/lmfdb-support/CAJciYuQy0AS%3D29ceGLXnAxgMt5Z_01VQj5nom5WHU4kH%3Djf6uA%40mail.gmail.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/CAD0p0K5qJt_u1hHsJBS%2Boukk6yJfwF6R-OyB5eRsQzWBxgSjhQ%40mail.gmail.com.


[sage-support] Re: EC question

2024-04-30 Thread John Cremona
I can confirm that your curve is isogenous (and not isomorphic) to the ones
in the LMFDB.  The isogeny class computed by Sage from your curve has 6
curves in it.  That means that there is a bug in Sage's isogeny class code
-- which I wrote most of.  I hope that it is something specific to
j-invariant 0, which is (as always) treated separately.

I will investigate the Sage bug, and when it is fixed I will recompute all
the isogeny classes in the LMFDB.  This will not be done very soon.

Thanks for the report!

John

On Tue, 30 Apr 2024 at 16:42, Zhengyu Tao  wrote:

> Thanks for your reply! The coefficients of my curve is [0, -27*t^2, 0,
> 216*t^3*(t - 27), -432*t^4*(t - 27)^2] with t = -4320 - 1944\sqrt{5}.
>
> -- Original --
> *From: * "John Cremona";
> *Date: * Tue, Apr 30, 2024 11:35 PM
> *To: * "John Jones";
> *Cc: * "lmfdb-support"; "taozhy"<
> tao...@smail.nju.edu.cn>;
> *Subject: * Re: EC question
>
> The isogeny classes in the LMFDB are supposed to be complete.  I see
> that curve 2.2.5.1-2025.1-d2 has coefficients (0, 0, 1, 0, -34) while the
> isogenous curve d1 has coefficients (0, 0, 1, 0, 1), both with j-invariant
> 0 and conductor (45) over this field.   They are quadratic twists of each
> other by -3.
>
> What are the coefficients of the curve you have?  If it is not isomorphic
> to either of these then there is a bug in Sage, which was used to compute
> the isogeny classes.
>
> John Cremona
>
> On Tue, 30 Apr 2024 at 16:08, John Jones  wrote:
>
>> From the feedback page:
>>
>> Hi LMFDB devs,
>>
>> In a recent problem I'm working on, I need to compute a (CM) elliptic
>> curve over Q(\sqrt{5}). When I searched it in LMFDB, it seems that it is
>> not included. However, I found that my curve seems isogenous (over
>> Q(\sqrt{5})) to the curve 2.2.5.1-2025.1-d2. In fact, I have constructed
>> the isogeny from my curve to 2.2.5.1-2025.1-d2 using velu'formula.
>>
>> My qusetion is: is the isogeny classes in LMFDB complete? I.e., is each
>> isomorphism class (over the base field) in a isogeny class has a
>> representative in LMFDB's "isogeny class"?
>>
>> Best regards,
>> Zhengyu Tao
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "lmfdb-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to lmfdb-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/lmfdb-support/CAJciYuQy0AS%3D29ceGLXnAxgMt5Z_01VQj5nom5WHU4kH%3Djf6uA%40mail.gmail.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/CAD0p0K5jOXaG3ex1st9yTs%3D9BFUN2oRSopExN%3D5qnmWSHX3Wag%40mail.gmail.com.


[sage-support] Re: Jupyter Notebook crashes, then get connection refused error and cannot relaunch on mac

2024-04-23 Thread Marc Culler
Please ask her to try removing the two directories ~/Library/Jupyter and 
~/.sage:
rm -rf ~/Library/Jupyter
rm -rf ~/.sage

If that does not fix it, please open an issue at our github site:
https://github.com/3-manifolds/Sage_macOS/issues
We will work through it with you and figure out what is going wrong.

- Marc


On Tuesday, April 23, 2024 at 2:16:21 PM UTC-5 S Benton wrote:

> Hi - at my wit's end here - my daughter is trying to use Sage Math Jupyter 
> Notebook for her college coursework. She has had problems where if Notebook 
> crashes, she is unable to relaunch it - she gets a "connection refused" 
> error and it mentions Local Host . Last time, we reinstalled everything 
> and she was able to get up and running again. However, this keeps happening.
>
> I am wondering if - when Notebook crashes - if there are still processes 
> running out there that are preventing her from relaunching a new instance 
> of Notebook. She is on a mac, and I'm trying to find the commands or 
> directories where these processes or files might stored so that I can 
> remove them.  
>
> I am not able to use any of the "Jupyter" commands from the mac command 
> line to see what is running. Does anyone have any help they can offer on 
> why this might be happening and how i can get her up and running again?
>
> Many thanks
>

-- 
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/7f900d1c-d86f-4fcf-bc99-0aa413be9623n%40googlegroups.com.


Re: [sage-support] Re: Does sagemath support something similar to numpy's einsum for symbolic arrays?

2024-04-20 Thread Anton Todorov
Looks close but not quite.

I'm interested in what's described here:
https://stats.stackexchange.com/a/198395

Basically a dumb as bricks extension to matrices to higher dimensions with
a contraction along selectable axes, with no notion of co and
contravariance, and ability to have any number of elements in each
dimension, e.g. a (8,1,512) shaped tensor (or n-way-array) should be
possible.

>From what I've seen of tensors with indices are forced to be n-dimensional
cubes (along with having the co and contravariant limitations to
contractions).

On Tue, Apr 16, 2024 at 12:19 PM Matthias Koeppe 
wrote:

> You might be looking for
> https://doc.sagemath.org/html/en/reference/tensor_free_modules/sage/tensor/modules/tensor_with_indices.html
>
> On Tuesday, April 9, 2024 at 6:59:27 AM UTC-7 Anton Todorov wrote:
>
>> Einsum:
>> https://numpy.org/doc/stable/reference/generated/numpy.einsum.html
>>
>> It is a way to define multiple operations on arrays of arbitrary shape.
>> I've not seen anything that suggests this is implemented in sagemath, but I
>> was hoping there might be something hidden.
>>
>> What I need this for is to calculate symbolic results of array operations
>> which are too cumbersome to represent as matrix operations.
>>
> --
> 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/Jg64P1k2YfI/unsubscribe.
> To unsubscribe from this group and all its topics, 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/9acdf077-64a3-4034-8835-e1d806e0e049n%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/CAG%2Bkvu%3DXGrRsX1eNVc6wvmXd6L43h1AvF2AZZLOeRyHexKNGuA%40mail.gmail.com.


[sage-support] Re: Does sagemath support something similar to numpy's einsum for symbolic arrays?

2024-04-15 Thread Matthias Koeppe
You might be looking 
for 
https://doc.sagemath.org/html/en/reference/tensor_free_modules/sage/tensor/modules/tensor_with_indices.html

On Tuesday, April 9, 2024 at 6:59:27 AM UTC-7 Anton Todorov wrote:

> Einsum: https://numpy.org/doc/stable/reference/generated/numpy.einsum.html
>
> It is a way to define multiple operations on arrays of arbitrary shape. 
> I've not seen anything that suggests this is implemented in sagemath, but I 
> was hoping there might be something hidden.
>
> What I need this for is to calculate symbolic results of array operations 
> which are too cumbersome to represent as matrix operations.
>

-- 
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/9acdf077-64a3-4034-8835-e1d806e0e049n%40googlegroups.com.


Re: [sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-15 Thread Henri Girard
I use many vscode with sagemath-9.2 (windows installer) and sagemath 
10.4beta 2wsl2


i start sage copy the address from the terminal then I paste it in 
serveur ans it finds the localhost this is interesting in w11 because i 
can start sage directly in code so I can see what is in ipynb because I 
have done tons of it and I never remenber what's inside !


Le 15/04/2024 à 15:29, Dima Pasechnik a écrit :



On Mon, Apr 15, 2024 at 1:46 PM Henri Girard  
wrote:


I don't understand what you mean , but there is maybe a way you
can use it as I do in vs code ?

Le 15/04/2024 à 09:19, Matthias Koeppe a écrit :

Yes, this is documented in

https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation


The instructions given there for using VS Code+WSL there should be 
adapted to using

VS Code+local Sage, and VS Code + (non-WSL remote Sage install).

It seems that Jupyter extension in VS Code packages more goodies than 
the generic Jupyter install,

in particular various nbextensions are there.




On Monday, April 8, 2024 at 11:16:45 AM UTC-7 Emmanuel
Charpentier wrote:

Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under
WSL2 in Windows 11 (don’t get me started…). I also installed
emacs and its juyter
 package, which is
able to use Sage-installed kernels … when emacs is started
from the Sage shell. [ Yes, there is a point to this…]

What I want to do is to be able to use these Sage-installed
kernels from outside the Sage shell environment, thus
avoiding to duplicate the Sage Jupyter installation. In other
words, I want a jupyter command that is able to finfd the
Sage-instaled kernels in their correct environment.

Is there any way to do that ?

-- 
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/e526ffb3-bebe-49af-9f1d-075b0aacff3an%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/d29a775c-18b1-40c7-a6ba-99054e74c997%40gmail.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/CAAWYfq0TvVUbhSFOzyf3hPOpAfocvS5X_v95OQyH9%3DUiuOdiaA%40mail.gmail.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/89103301-b030-4e45-9bbe-af8a9a442dd3%40gmail.com.


Re: [sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-15 Thread Dima Pasechnik
On Mon, Apr 15, 2024 at 1:46 PM Henri Girard  wrote:

> I don't understand what you mean , but there is maybe a way you can use it
> as I do in vs code ?
> Le 15/04/2024 à 09:19, Matthias Koeppe a écrit :
>
> Yes, this is documented in
> https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation
>
> The instructions given there for using VS Code+WSL there should be adapted
to using
VS Code+local Sage, and VS Code + (non-WSL remote Sage install).

It seems that Jupyter extension in VS Code packages more goodies than the
generic Jupyter install,
in particular various nbextensions are there.


>
>
> On Monday, April 8, 2024 at 11:16:45 AM UTC-7 Emmanuel Charpentier wrote:
>
>> Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in Windows
>> 11 (don’t get me started…). I also installed emacs and its juyter
>>  package, which is able to use
>> Sage-installed kernels … when emacs is started from the Sage shell. [ Yes,
>> there is a point to this…]
>>
>> What I want to do is to be able to use these Sage-installed kernels from
>> outside the Sage shell environment, thus avoiding to duplicate the Sage
>> Jupyter installation. In other words, I want a jupyter command that is
>> able to finfd the Sage-instaled kernels in their correct environment.
>>
>> Is there any way to do that ?
>>
> --
> 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/e526ffb3-bebe-49af-9f1d-075b0aacff3an%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/d29a775c-18b1-40c7-a6ba-99054e74c997%40gmail.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/CAAWYfq0TvVUbhSFOzyf3hPOpAfocvS5X_v95OQyH9%3DUiuOdiaA%40mail.gmail.com.


Re: [sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-15 Thread Henri Girard
I don't understand what you mean , but there is maybe a way you can use 
it as I do in vs code ?


Le 15/04/2024 à 09:19, Matthias Koeppe a écrit :
Yes, this is documented in 
https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation 





On Monday, April 8, 2024 at 11:16:45 AM UTC-7 Emmanuel Charpentier wrote:

Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in
Windows 11 (don’t get me started…). I also installed emacs and its
juyter  package, which
is able to use Sage-installed kernels … when emacs is started from
the Sage shell. [ Yes, there is a point to this…]

What I want to do is to be able to use these Sage-installed
kernels from outside the Sage shell environment, thus avoiding to
duplicate the Sage Jupyter installation. In other words, I want a
jupyter command that is able to finfd the Sage-instaled kernels in
their correct environment.

Is there any way to do that ?

​

--
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/e526ffb3-bebe-49af-9f1d-075b0aacff3an%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/d29a775c-18b1-40c7-a6ba-99054e74c997%40gmail.com.


[sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-15 Thread Matthias Koeppe
Yes, this is documented 
in 
https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation



On Monday, April 8, 2024 at 11:16:45 AM UTC-7 Emmanuel Charpentier wrote:

> Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in Windows 
> 11 (don’t get me started…). I also installed emacs and its juyter 
>  package, which is able to use 
> Sage-installed kernels … when emacs is started from the Sage shell. [ Yes, 
> there is a point to this…]
>
> What I want to do is to be able to use these Sage-installed kernels from 
> outside the Sage shell environment, thus avoiding to duplicate the Sage 
> Jupyter installation. In other words, I want a jupyter command that is 
> able to finfd the Sage-instaled kernels in their correct environment.
>
> Is there any way to do that ?
> ​
>

-- 
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/e526ffb3-bebe-49af-9f1d-075b0aacff3an%40googlegroups.com.


[sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-09 Thread Marc Culler
If I understand your question correctly, the answer is yes.  All that you 
need to do is to copy the sage kernel spec directory into 
/usr/local/share/jupyter/kernels.  If you have installed jupyter in a 
python venv then the jupyter command in the venv will always check for 
kernels in that directory.  By the sage kernel spec directory I mean:
sage/venv/share/jupyter/kernels/sagemath
the kernel.json file in that directory should contain the absolute path to 
the sage  executable in your installation of sage as the first item in the 
"varg" list.

- Marc

On Monday, April 8, 2024 at 1:16:45 PM UTC-5 Emmanuel Charpentier wrote:

> Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in Windows 
> 11 (don’t get me started…). I also installed emacs and its juyter 
>  package, which is able to use 
> Sage-installed kernels … when emacs is started from the Sage shell. [ Yes, 
> there is a point to this…]
>
> What I want to do is to be able to use these Sage-installed kernels from 
> outside the Sage shell environment, thus avoiding to duplicate the Sage 
> Jupyter installation. In other words, I want a jupyter command that is 
> able to finfd the Sage-instaled kernels in their correct environment.
>
> Is there any way to do that ?
> ​
>

-- 
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/567ab9cc-2292-441a-b6c5-a7b50b8f4541n%40googlegroups.com.


[sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-09 Thread Nathan Dunfield
On Monday, April 8, 2024 at 5:21:57 PM UTC-5 Nils Bruin wrote:

If you run `jupyter --paths` and  `sage -sh <<<"jupyter --paths"` you see 
the difference in paths. The relevant ones for you are probably the 
sage-specific ones
$SAGE-LOCAL/var/lib/sage/venv-python3.10/share/jupyter
Whatever is there will get picked up by sage's jupyter but, naturally, not 
by your standard jupyter.
So the kernels that live there could be copied to a location that is 
accessed by your system jupyter:
$HOME/.local/share/jupyter
or something like that.

Note that the files there might need some surgery, because starting those 
kernels probably needs to happen through sage's python (or at least its 
venv); similar to how to get the sage kernel working in a system jupyter.


The Sage binary installer for macOS optionally installs the Sage Jupyter 
kernels in a location that an arbitrary Jupyter will search by default, and 
in that case the JSON kernel file just looks like:

{"argv": ["/var/tmp/sage-10.3-current/venv/bin/sage", "--python", "-m", 
  "sage.repl.ipython_kernel", "-f", "{connection_file}"], 
 "display_name": "SageMath 10.3",
 "language": "sage"}

I think it will work as long as your have the full path to Sage in the venv 
as part of argv.

Best,

Nathan

​

-- 
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/5954ddb3-092c-4c69-af61-b00956eff28cn%40googlegroups.com.


[sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-08 Thread Nils Bruin
If you run `jupyter --paths` and  `sage -sh <<<"jupyter --paths"` you see 
the difference in paths. The relevant ones for you are probably the 
sage-specific ones
$SAGE-LOCAL/var/lib/sage/venv-python3.10/share/jupyter
Whatever is there will get picked up by sage's jupyter but, naturally, not 
by your standard jupyter.
So the kernels that live there could be copied to a location that is 
accessed by your system jupyter:
$HOME/.local/share/jupyter
or something like that.

Note that the files there might need some surgery, because starting those 
kernels probably needs to happen through sage's python (or at least its 
venv); similar to how to get the sage kernel working in a system jupyter.

On Monday 8 April 2024 at 11:16:45 UTC-7 Emmanuel Charpentier wrote:

> Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in Windows 
> 11 (don’t get me started…). I also installed emacs and its juyter 
>  package, which is able to use 
> Sage-installed kernels … when emacs is started from the Sage shell. [ Yes, 
> there is a point to this…]
>
> What I want to do is to be able to use these Sage-installed kernels from 
> outside the Sage shell environment, thus avoiding to duplicate the Sage 
> Jupyter installation. In other words, I want a jupyter command that is 
> able to finfd the Sage-instaled kernels in their correct environment.
>
> Is there any way to do that ?
> ​
>

-- 
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/92d5f86e-6ab1-40f6-9211-ce2e4c1fbc1en%40googlegroups.com.


Re: [sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-03 Thread Henri Girard
I upgraded to noble 24.04 few months ago it's fine. I just read they
had a problem with bug and it will be out later , but on wsl2 it works
and I will update in time.
What I find good is sage 10.4.beta 1 build fine too !
So on windows I mostly works with sage-9.2 (windows-installer-sagemath-
9.2 ) usefull because I can use code as an interface too...
best

Le mercredi 03 avril 2024 à 03:19 -0700, Emmanuel Charpentier a écrit :
> Le mardi 2 avril 2024 à 21:13:50 UTC+2, kcrisman a écrit :
> > On Monday, April 1, 2024 at 3:31:44 PM UTC-4 Emmanuel Charpentier
> > wrote:
> > > I just had to install Sage on a Windows machine (long story…)
> > > which has to be connected to a corporate VPN, whose an annoying
> > > side effect is to deprive Linux apps of network connectivity
> > > (don’t get me started…). Therefore, the Linux browser couldn’t
> > > use Mathjax.
> > I guess I didn't know how to use the Linux browser in the first
> > place on Windows.
> 
> 
> Just run `wsl firefox`. But in my specific case (amv VPN...), using
> the Windows berwser (alse Firefox) is better. 
> >  
> > > Using your utilities works perfectly. 
> > Haha, they are not "mine" :-) 
> 
> 
> Huh ? You did the Wiki post, no ?
>  
> > but I'm glad they work for someone, we would definitely want to get
> > some information in the user manual and not just the wiki about
> > that.
> 
> 
> Suggestion : an interim solution is to leave a note in the
> (installation|user) manual with a link to the wiki...
>  
> > I'm not sure which version of Ubuntu it uses - whatever the current
> > default for WSL is.
> 
> 
> Currently, it's 22.04LTS, probably to be replaced bu 24.04LTS when
> the latter is released.
>  
> > I can safely guarantee my son has zero interest in Ubuntu, or Linux
> > for that matter.
> 
> 
> Condolences... ;_-)
> 
> HTH, 
> -- 
> 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/28e852ce-05fa-47a5-ac58-56e0d7ea7d93n%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/8b09348777ae33aefa2451cf7e61c3e3c590a560.camel%40gmail.com.


[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-03 Thread Emmanuel Charpentier
Le mardi 2 avril 2024 à 21:13:50 UTC+2, kcrisman a écrit :

On Monday, April 1, 2024 at 3:31:44 PM UTC-4 Emmanuel Charpentier wrote:

I just had to install Sage on a Windows machine (long story…) which has to 
be connected to a corporate VPN, whose an annoying side effect is to 
deprive Linux apps of network connectivity (don’t get me started…). 
Therefore, the Linux browser couldn’t use Mathjax.

I guess I didn't know how to use the Linux browser in the first place on 
Windows.


Just run `wsl firefox`. But in my specific case (amv VPN...), using the 
Windows berwser (alse Firefox) is better. 

 

Using your utilities works perfectly. 

Haha, they are not "mine" :-) 


Huh ? You did the Wiki post, no ?
 

but I'm glad they work for someone, we would definitely want to get some 
information in the user manual and not just the wiki about that.


Suggestion : an interim solution is to leave a note in the 
(installation|user) manual with a link to the wiki...
 

I'm not sure which version of Ubuntu it uses - whatever the current default 
for WSL is.


Currently, it's 22.04LTS, probably to be replaced bu 24.04LTS when the 
latter is released.
 

I can safely guarantee my son has zero interest in Ubuntu, or Linux for 
that matter.


Condolences... ;_-)

HTH, 

-- 
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/28e852ce-05fa-47a5-ac58-56e0d7ea7d93n%40googlegroups.com.


Re: [sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-02 Thread Henri Girard
windows-sage-installer can't be installed ? it's version sagemath-9.2 
but works fine, i use too wls and build sage-dev-10-4 beta on it


Le 02/04/2024 à 21:13, kcrisman a écrit :



On Monday, April 1, 2024 at 3:31:44 PM UTC-4 Emmanuel Charpentier wrote:

I just had to install Sage on a Windows machine (long story…)
which has to be connected to a corporate VPN, whose an annoying
side effect is to deprive Linux apps of network connectivity
(don’t get me started…). Therefore, the Linux browser couldn’t use
Mathjax.

I guess I didn't know how to use the Linux browser in the first place 
on Windows.


Using your utilities works perfectly.

Haha, they are not "mine" :-) but I'm glad they work for someone, we 
would definitely want to get some information in the user manual and 
not just the wiki about that.  I'm not sure which version of Ubuntu it 
uses - whatever the current default for WSL is.   I can safely 
guarantee my son has zero interest in Ubuntu, or Linux for that matter.

--
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/3c606592-ad46-4698-9b2b-734eee35908en%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/2b0edd47-d7ea-4cdb-86ae-90ec11bef175%40gmail.com.


[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-02 Thread kcrisman


On Monday, April 1, 2024 at 3:31:44 PM UTC-4 Emmanuel Charpentier wrote:

I just had to install Sage on a Windows machine (long story…) which has to 
be connected to a corporate VPN, whose an annoying side effect is to 
deprive Linux apps of network connectivity (don’t get me started…). 
Therefore, the Linux browser couldn’t use Mathjax.

I guess I didn't know how to use the Linux browser in the first place on 
Windows.
 

Using your utilities works perfectly. 

Haha, they are not "mine" :-) but I'm glad they work for someone, we would 
definitely want to get some information in the user manual and not just the 
wiki about that.  I'm not sure which version of Ubuntu it uses - whatever 
the current default for WSL is.   I can safely guarantee my son has zero 
interest in Ubuntu, or Linux for that matter.

-- 
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/3c606592-ad46-4698-9b2b-734eee35908en%40googlegroups.com.


[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-02 Thread Marc Culler
Evidently it is possible to install Firefox on Ubuntu 22.04 from the 
Mozilla PPA instead of using the snap.

https://askubuntu.com/questions/1399383/how-to-install-firefox-as-a-traditional-deb-package-without-snap-in-ubuntu-22

- Marc
On Tuesday, April 2, 2024 at 7:14:47 AM UTC-5 Marc Culler wrote:

> Actually the firefox snap can access files on the local disk, but only if 
> they are in the user's home directory.  It cannot access files in /tmp.  
> Does the  plot viewer use the ubuntu system's /tmp?
>
> - Marc
> On Monday, April 1, 2024 at 2:31:44 PM UTC-5 Emmanuel Charpentier wrote:
>
>> I just had to install Sage on a Windows machine (long story…) which has 
>> to be connected to a corporate VPN, whose an annoying side effect is to 
>> deprive Linux apps of network connectivity (don’t get me started…). 
>> Therefore, the Linux browser couldn’t use Mathjax.
>>
>> Using your utilities works perfectly. I checked that one can display both 
>> 2D and 3D graphics from both commandine and Jupyter/Jupyterlab notebooks.
>>
>> BTW, does your son run Ubuntu 22.04 ? If so, it might explain why display 
>> is problematic : this distribution uses a “snap” version of firefox, which 
>> asininely insists to run in its own sandbox, *with no access to local 
>> files :* (‘G…).
>>
>> HTH,
>> ​
>> Le lundi 4 mars 2024 à 23:23:17 UTC+1, kcrisman a écrit :
>>
>>> Has anyone successfully used the instructions at 
>>> https://wiki.sagemath.org/SageWindows lately for plots?  I'm reviewing 
>>> https://github.com/sagemath/sage/pull/37184 and it would be nice to 
>>> have that information actually in the installation guide, but for some 
>>> reason it didn't work for me.  (Maybe because it's my son's computer ... 
>>> some sort of Murphy's Law?)
>>>
>>> Thanks for any info.
>>>
>>

-- 
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/49e06dad-ddf4-47fe-ac62-aceeb215f752n%40googlegroups.com.


[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-02 Thread Marc Culler
Actually the firefox snap can access files on the local disk, but only if 
they are in the user's home directory.  It cannot access files in /tmp.  
Does the  plot viewer use the ubuntu system's /tmp?

- Marc
On Monday, April 1, 2024 at 2:31:44 PM UTC-5 Emmanuel Charpentier wrote:

> I just had to install Sage on a Windows machine (long story…) which has to 
> be connected to a corporate VPN, whose an annoying side effect is to 
> deprive Linux apps of network connectivity (don’t get me started…). 
> Therefore, the Linux browser couldn’t use Mathjax.
>
> Using your utilities works perfectly. I checked that one can display both 
> 2D and 3D graphics from both commandine and Jupyter/Jupyterlab notebooks.
>
> BTW, does your son run Ubuntu 22.04 ? If so, it might explain why display 
> is problematic : this distribution uses a “snap” version of firefox, which 
> asininely insists to run in its own sandbox, *with no access to local 
> files :* (‘G…).
>
> HTH,
> ​
> Le lundi 4 mars 2024 à 23:23:17 UTC+1, kcrisman a écrit :
>
>> Has anyone successfully used the instructions at 
>> https://wiki.sagemath.org/SageWindows lately for plots?  I'm reviewing 
>> https://github.com/sagemath/sage/pull/37184 and it would be nice to have 
>> that information actually in the installation guide, but for some reason it 
>> didn't work for me.  (Maybe because it's my son's computer ... some sort of 
>> Murphy's Law?)
>>
>> Thanks for any info.
>>
>

-- 
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/05ba1455-1407-427a-83de-3e2c3054eb47n%40googlegroups.com.


[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-01 Thread Emmanuel Charpentier


I just had to install Sage on a Windows machine (long story…) which has to 
be connected to a corporate VPN, whose an annoying side effect is to 
deprive Linux apps of network connectivity (don’t get me started…). 
Therefore, the Linux browser couldn’t use Mathjax.

Using your utilities works perfectly. I checked that one can display both 
2D and 3D graphics from both commandine and Jupyter/Jupyterlab notebooks.

BTW, does your son run Ubuntu 22.04 ? If so, it might explain why display 
is problematic : this distribution uses a “snap” version of firefox, which 
asininely insists to run in its own sandbox, *with no access to local files 
:* (‘G…).

HTH,
​
Le lundi 4 mars 2024 à 23:23:17 UTC+1, kcrisman a écrit :

> Has anyone successfully used the instructions at 
> https://wiki.sagemath.org/SageWindows lately for plots?  I'm reviewing 
> https://github.com/sagemath/sage/pull/37184 and it would be nice to have 
> that information actually in the installation guide, but for some reason it 
> didn't work for me.  (Maybe because it's my son's computer ... some sort of 
> Murphy's Law?)
>
> Thanks for any info.
>

-- 
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/6a2a1f61-2745-4f5b-938a-3517f9af9481n%40googlegroups.com.


[sage-support] Re: xz/liblzma has been compromised

2024-03-29 Thread Dima Pasechnik
and Homebrew.
Please upgrade your Homebrew. It should do a downgrade:

`brew upgrade` now "upgrades" xz from 5.6.1 -> 5.4.6

On Fri, Mar 29, 2024 at 7:36 PM Dima Pasechnik  wrote:
>
> aand Conda: https://anaconda.org/anaconda/xz shows version 5.6.1
>
> On Fri, Mar 29, 2024 at 7:18 PM Dima Pasechnik  wrote:
> >
> > https://www.openwall.com/lists/oss-security/2024/03/29/4
> >
> > if your have xz 5.6.0 or 5.6.1 installed (e.g. Debian testing/unstable)
> > you have a backdoored xz.

-- 
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/CAAWYfq3%3DOQprCMf%3Dv2ubAoZVhFEHBSjf52LT9XHAR8nRiOR3GA%40mail.gmail.com.


[sage-support] Re: xz/liblzma has been compromised

2024-03-29 Thread Dima Pasechnik
aand Conda: https://anaconda.org/anaconda/xz shows version 5.6.1

On Fri, Mar 29, 2024 at 7:18 PM Dima Pasechnik  wrote:
>
> https://www.openwall.com/lists/oss-security/2024/03/29/4
>
> if your have xz 5.6.0 or 5.6.1 installed (e.g. Debian testing/unstable)
> you have a backdoored xz.

-- 
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/CAAWYfq3TfwUtW%2B4ZV0GMr4egCUsrgjHTrTtzuVeKi5ARj4tuUA%40mail.gmail.com.


[sage-support] Re: init.sage not running anymore

2024-03-04 Thread David Ayotte
I am still confused, but I'm not "stillconfused" :-)

I forgot to mention, but, like the user in AskSageMath, I'm also running 
sage under WSL2 Ubuntu 22.04.4 LTS, so it might be related. Moreover, I 
just upgraded sage to 10.3.rc2 and still have the same problem. I will open 
a GH issue.

Thanks for your replies!

David A.

Le lundi 4 mars 2024 à 17:04:28 UTC-5, kcrisman a écrit :

>
> Hello,
>
> Since I upgraded my SageMath to version 10.3.beta8, the init.sage script 
> located at ~/.sage/init.sage stopped running when I start sage. I also get 
> the following message right after the SageMath banner:
>
> /home/user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
>  
> DeprecationWarning: There is no current event loop
>   loop = asyncio.get_event_loop()
>
>
> I haven't noticed about init.sage (didn't really check), but I am also 
> seeing this with a recent upgrade. (On Mac M1 chip running Ventura, for 
> what it's worth.)  Any opinions on whether this should be a blocker if the 
> init.sage is confirmed?   I think Volker already started rcs.
>

-- 
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/02a69c4b-d8a4-4689-8536-35c7e9613adan%40googlegroups.com.


[sage-support] Re: init.sage not running anymore

2024-03-04 Thread David Ayotte
I opened the following issue: #37539 


Best,

David A.

Le lundi 4 mars 2024 à 17:04:28 UTC-5, kcrisman a écrit :

>
> Hello,
>
> Since I upgraded my SageMath to version 10.3.beta8, the init.sage script 
> located at ~/.sage/init.sage stopped running when I start sage. I also get 
> the following message right after the SageMath banner:
>
> /home/user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
>  
> DeprecationWarning: There is no current event loop
>   loop = asyncio.get_event_loop()
>
>
> I haven't noticed about init.sage (didn't really check), but I am also 
> seeing this with a recent upgrade. (On Mac M1 chip running Ventura, for 
> what it's worth.)  Any opinions on whether this should be a blocker if the 
> init.sage is confirmed?   I think Volker already started rcs.
>

-- 
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/ea303878-2f3a-46ab-9c98-0ff56964681en%40googlegroups.com.


[sage-support] Re: init.sage not running anymore

2024-03-04 Thread kcrisman



Hello,

Since I upgraded my SageMath to version 10.3.beta8, the init.sage script 
located at ~/.sage/init.sage stopped running when I start sage. I also get 
the following message right after the SageMath banner:

/home/user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
 
DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()


I haven't noticed about init.sage (didn't really check), but I am also 
seeing this with a recent upgrade. (On Mac M1 chip running Ventura, for 
what it's worth.)  Any opinions on whether this should be a blocker if the 
init.sage is confirmed?   I think Volker already started rcs.

-- 
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/789b5069-613f-4c94-8e5c-790b77ca8c3bn%40googlegroups.com.


[sage-support] Re: init.sage not running anymore

2024-03-04 Thread Emmanuel Charpentier


FWIW, Someone going under the nickname of stillconfused posted alpost 
exactly the same problem 
 
on ask.sagemath.org. Is that you ?
​
Le dimanche 3 mars 2024 à 21:40:50 UTC+1, David Ayotte a écrit :

> Hello,
>
> Since I upgraded my SageMath to version 10.3.beta8, the init.sage script 
> located at ~/.sage/init.sage stopped running when I start sage. I also get 
> the following message right after the SageMath banner:
>
> /home/user/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
>  
> DeprecationWarning: There is no current event loop
>   loop = asyncio.get_event_loop()
>
> Do anybody know what happened here? I like to use this script for defining 
> some frequently used variables.
>
> Best,
>
> David A.
>
>
>

-- 
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/4a601786-fc56-482e-a2fa-d35a58258057n%40googlegroups.com.


[sage-support] Re: Failure to compile Sage 10.3.rc0

2024-02-26 Thread Antonio Rojas
Sage doesn't currently support flint 3.1. Either build with the bundled 
flint or patch [1] sagelib

[1] https://aur.archlinux.org/cgit/aur.git/tree/flint-3.1.patch?h=sagemath-git

El lunes, 26 de febrero de 2024 a las 15:50:40 UTC+1, Peter Mueller 
escribió:

> Installation of Sage 10.3.rc0 from source on an up-to-date Arch Linux 
> machine fails. I'm not sure if the following snippet of the log file hints 
> to the problem:
>
> [sagelib-10.3.rc0] In file included from 
> sage/symbolic/ginac/pseries.cpp:26:
> [sagelib-10.3.rc0] sage/symbolic/ginac/useries-flint.h:31:11: error: 
> 'fmpq_init_set_mpz_frac_readonly' is deprecated.
> [sagelib-10.3.rc0]31 | extern "C" void 
> fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q);
> [sagelib-10.3.rc0]   |   
> ^~
> [sagelib-10.3.rc0] sage/symbolic/ginac/useries-flint.h:31:55: error: 
> expected ')' before 'z'
> [sagelib-10.3.rc0]31 | extern "C" void 
> fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q);
> [sagelib-10.3.rc0]   | 
>~  ^~
> [sagelib-10.3.rc0]   | 
>   )
>

-- 
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/3c1404e0-20ac-4fc2-b761-0918c870543cn%40googlegroups.com.


Re: [sage-support] Re: Why cant this limit be evaluated?

2024-02-20 Thread dimpase
On Mon, Feb 19, 2024 at 11:40:13PM -0800, Emmanuel Charpentier wrote:
> 
> Indeed. That’s probably an oversight :
> sage: elliptic_kc(x).limit(x=0) 1/2*pi sage: elliptic_ec(x).limit(x=0) 
> limit(elliptic_ec(x), x, 0) 
> 

this looks like a maxima bug:

(%i17) elliptic_ec(0);
  %pi
(%o17)---
   2
(%i18) limit(elliptic_ec(x),x,0);
(%o18)   limit  elliptic_ec(x)
 x -> 0
(%i19) elliptic_kc(0);
  %pi
(%o19)---
   2
(%i20) limit(elliptic_kc(x),x,0);
  %pi
(%o20)---
   2

No idea why limit(elliptic_ec(x),x,0) is a problem for Maxima.


> Curioisly :
> sage: elliptic_ec(0) 1/2*pi 
> 
> FWIW :
> sage: D(r)._mathematica_().Limit(mathematica.Rule(r, 0)) -1/8 
> 
> HTH,
> ​
> Le lundi 19 février 2024 à 21:25:51 UTC+1, Mark “Essa King” Sukaiti a 
> écrit :
> 
> > D(r)=-1/2*((3*r^2 - 1)*elliptic_ec((4*r/(r^2 + 2*r + 1)))^2 + (r^2 - 2*r + 
> > 1)*elliptic_ec((4*r/(r^2 + 2*r + 1)))*elliptic_kc((4*r/(r^2 + 2*r + 
> > 1/(pi^2*r^8 - 2*pi^2*r^7 - pi^2*r^6 + 4*pi^2*r^5 - pi^2*r^4 - 
> > 2*pi^2*r^3 + pi^2*r^2)
> >
> > D(r).limit(r=0)
> >
> > The limit should be -0.125 (or -1/8) but it seems maxima doesnt know the 
> > limit of elliptic_ec(x) for x->0
> > [image: 2024-02-20_00-22.png]
> > Sympy also fails giving -5/8.
> >
> > The other algorithms cant evaluate it either.
> >
> 
> -- 
> 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/25c243ea-fa2c-489e-93c8-ec9c946d3779n%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/ZdSbEPoHwdpzjIZr%40hilbert.


signature.asc
Description: PGP signature


[sage-support] Re: Why cant this limit be evaluated?

2024-02-19 Thread Emmanuel Charpentier


Indeed. That’s probably an oversight :
sage: elliptic_kc(x).limit(x=0) 1/2*pi sage: elliptic_ec(x).limit(x=0) 
limit(elliptic_ec(x), x, 0) 

Curioisly :
sage: elliptic_ec(0) 1/2*pi 

FWIW :
sage: D(r)._mathematica_().Limit(mathematica.Rule(r, 0)) -1/8 

HTH,
​
Le lundi 19 février 2024 à 21:25:51 UTC+1, Mark “Essa King” Sukaiti a 
écrit :

> D(r)=-1/2*((3*r^2 - 1)*elliptic_ec((4*r/(r^2 + 2*r + 1)))^2 + (r^2 - 2*r + 
> 1)*elliptic_ec((4*r/(r^2 + 2*r + 1)))*elliptic_kc((4*r/(r^2 + 2*r + 
> 1/(pi^2*r^8 - 2*pi^2*r^7 - pi^2*r^6 + 4*pi^2*r^5 - pi^2*r^4 - 
> 2*pi^2*r^3 + pi^2*r^2)
>
> D(r).limit(r=0)
>
> The limit should be -0.125 (or -1/8) but it seems maxima doesnt know the 
> limit of elliptic_ec(x) for x->0
> [image: 2024-02-20_00-22.png]
> Sympy also fails giving -5/8.
>
> The other algorithms cant evaluate it either.
>

-- 
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/25c243ea-fa2c-489e-93c8-ec9c946d3779n%40googlegroups.com.


Re: [sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-08 Thread Eric Gourgoulhon
Le jeudi 8 février 2024 à 13:45:18 UTC+1, Dominic Steinitz a écrit :

Sorry about posting the same thing twice.


No problem.
Just for reference, in case someone reads this thread: the answer about the 
connection forms is here:
https://ask.sagemath.org/question/75256/connection-forms-not-anti-symmetric/

-- 
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/fda2d459-24d2-47f4-8cec-6cf8033ca9fbn%40googlegroups.com.


Re: [sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-08 Thread Dominic Steinitz
Sorry about posting the same thing twice.

On Wednesday 7 February 2024 at 19:26:32 UTC G. M.-S. wrote:

>
> Just to say that
> https://ask.sagemath.org
> gives me
> 502 Bad Gateway
>
> Guillermo
>
> On Wed, 7 Feb 2024 at 19:35, Eric Gourgoulhon  wrote:
>
>> Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :
>>
>> The example here https://sagemanifolds.obspm.fr/examples.html of 
>>
>>
>>- Electromagnetism in Minkowski spacetime 
>>
>> 
>> [ipynb 
>>
>> ]
>>  
>>(Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
>>current, Lorentz force, Poynting vector)
>>
>> Fails with the error in the title and in more detail below. 
>>
>>
>> For reference: this is discussed in the new thread 
>> https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ
>>
>> Besides, the question about the connection forms has been answered on   
>> https://ask.sagemath.org/
>>
>> Eric.
>>
>
>

-- 
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/232226b6-6609-40d6-a63c-ff74dfe18cbbn%40googlegroups.com.


Re: [sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-07 Thread G. M.-S.
Just to say that
https://ask.sagemath.org
gives me
502 Bad Gateway

Guillermo

On Wed, 7 Feb 2024 at 19:35, Eric Gourgoulhon 
wrote:

> Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :
>
> The example here https://sagemanifolds.obspm.fr/examples.html of
>
>
>- Electromagnetism in Minkowski spacetime
>
> 
> [ipynb
>
> ]
>(Electromagnetic field 2-form from E and B, Maxwell equations, conserved
>current, Lorentz force, Poynting vector)
>
> Fails with the error in the title and in more detail below.
>
>
> For reference: this is discussed in the new thread
> https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ
>
> Besides, the question about the connection forms has been answered on
> https://ask.sagemath.org/
>
> Eric.
>

-- 
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/CANnG18-Hv7Q4Wf0vqFD4epzQ1VXqq_q6c4YL9hDcXTZu5nHxCw%40mail.gmail.com.


[sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-07 Thread Eric Gourgoulhon
Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :

The example here https://sagemanifolds.obspm.fr/examples.html of 


   - Electromagnetism in Minkowski spacetime 
   

[ipynb 
   
] 
   (Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
   current, Lorentz force, Poynting vector)
   

Fails with the error in the title and in more detail below. 


For reference: this is discussed in the new 
thread https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ

Besides, the question about the connection forms has been answered on  
 https://ask.sagemath.org/

Eric.

-- 
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/6673df0f-7d05-43a8-a391-8d2a33866c01n%40googlegroups.com.


[sage-support] Re: Developer's guide and configure : the list of packages needs some updating

2024-01-23 Thread Matthias Koeppe
By the way, a further improvement to this section in the installation guide 
is waiting for review in https://github.com/sagemath/sage/pull/37056

On Tuesday, January 23, 2024 at 10:13:08 AM UTC-8 Matthias Koeppe wrote:

> Many of these packages appeared in the 10.2 developer's guide only because 
> of a bug in the script that generates this list.
>
> This is already fixed in the current beta; see 
> https://deploy-livedoc--sagemath.netlify.app/html/en/installation/source#debian-ubuntu-package-installation
>
> Nevertheless, the package names should be corrected in build/pkgs/ name>/distros/debian.txt, as Dima explained.
> They only affect the experimental configuration explained in 
> https://github.com/sagemath/sage/wiki/Sage-10.2-Release-Tour#configure---enable-system-site-packages-experimental
>  
> and are otherwise just documentation.
>
>
>
> On Monday, January 22, 2024 at 11:44:43 PM UTC-8 Emmanuel Charpentier 
> wrote:
>
>> For installation from source on Debian, a few packages have incorrect 
>> names in the Developer’s guide (and possibly in the configuration process 
>> files) :
>> | Replace | with | 
>> ++--| | 
>> beautifulsoup4 | python3-bs4 | | cython | cython3 | | hatch-vcs | 
>> python3-hatch-vcs | | importlib-resources | python3-importlib-resources | | 
>> ipykernel | python3-ipykernel | | meson-python | python3-mesonpy (?) | | 
>> python-fastjsonschema | python3-fastjsonschema | | 
>> python-hatch-fancy-pypi-readme | python3-hatch-fancy-pypi-readme | | 
>> python-tinycss2 | python3-tinycss2 | | rpy2 | python3-rpy2 | | 
>> setuptools-scm | python3-setuptools-scm | | sphinxcontrib-websupport | 
>> python3-sphinxcontrib.websupport | 
>>
>> A question : are clang and clang-relatedpackages necessary or a “simple 
>> recommendation” ? In the latter case, what is the rationale ?
>>
>> Another couple of questions :
>>
>>- 
>>
>>How to report such problems efficiently ?
>>- 
>>
>>What to fix in the source in order to fix them ?
>>
>> HTH,
>> ​
>>
>

-- 
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/52dc6746-d826-4b3a-91da-cb1a3fc36af8n%40googlegroups.com.


[sage-support] Re: Developer's guide and configure : the list of packages needs some updating

2024-01-23 Thread Matthias Koeppe
Many of these packages appeared in the 10.2 developer's guide only because 
of a bug in the script that generates this list.

This is already fixed in the current beta; 
see 
https://deploy-livedoc--sagemath.netlify.app/html/en/installation/source#debian-ubuntu-package-installation

Nevertheless, the package names should be corrected in build/pkgs//distros/debian.txt, as Dima explained.
They only affect the experimental configuration explained 
in 
https://github.com/sagemath/sage/wiki/Sage-10.2-Release-Tour#configure---enable-system-site-packages-experimental
 
and are otherwise just documentation.



On Monday, January 22, 2024 at 11:44:43 PM UTC-8 Emmanuel Charpentier wrote:

> For installation from source on Debian, a few packages have incorrect 
> names in the Developer’s guide (and possibly in the configuration process 
> files) :
> | Replace | with | 
> ++--| | 
> beautifulsoup4 | python3-bs4 | | cython | cython3 | | hatch-vcs | 
> python3-hatch-vcs | | importlib-resources | python3-importlib-resources | | 
> ipykernel | python3-ipykernel | | meson-python | python3-mesonpy (?) | | 
> python-fastjsonschema | python3-fastjsonschema | | 
> python-hatch-fancy-pypi-readme | python3-hatch-fancy-pypi-readme | | 
> python-tinycss2 | python3-tinycss2 | | rpy2 | python3-rpy2 | | 
> setuptools-scm | python3-setuptools-scm | | sphinxcontrib-websupport | 
> python3-sphinxcontrib.websupport | 
>
> A question : are clang and clang-relatedpackages necessary or a “simple 
> recommendation” ? In the latter case, what is the rationale ?
>
> Another couple of questions :
>
>- 
>
>How to report such problems efficiently ?
>- 
>
>What to fix in the source in order to fix them ?
>
> HTH,
> ​
>

-- 
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/af485425-18b3-4c72-b54d-077dd3a85603n%40googlegroups.com.


Re: [sage-support] Re: Question related to Sagemath permission on Github

2024-01-22 Thread Jan Groenewald
https://docs.github.com/en/organizations/managing-organization-settings/setting-permissions-for-deleting-or-transferring-repositories

On Mon, 22 Jan 2024 at 18:57, Nils Bruin  wrote:

> On Sunday 21 January 2024 at 04:25:42 UTC-8 Juan Grados wrote:
>
> To protect the repo from arbitrary deletion, I need to know if Github
> allows adding a rule to avoid a repository being deleted by a single
> person.
>
> If you encourage a workflow with forks and pull requests then everybody
> will have their own copy anyway. Then the question is more: is there a way
> to reinstate a repo after it is deleted? Then it will be recovering from an
> admin mistake, just as any misjudged commit will be (if you have to worry
> about your admins inadvertently deleting your repo then you'll have to
> worry about wrong merges even more). And if you expect that your admins are
> prone to making mistakes, people will probably be much happier living
> mainly in their own repo and only interacting with the central one if they
> have to (for pull requests). It of course does add a level of indirection
> to staying up-to-date, but I think the sage github documentation has some
> tips on minimizing the pain in that (and otherwise other projects will).
>
> --
> 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/0663f1c7-fc7b-4252-8bb9-07b3f48de6fcn%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/CAAg%3Dp_39pG-9J5rheqs8EuMHimfY3HaFwodk-OML3LXyR2Qq%2BQ%40mail.gmail.com.


[sage-support] Re: Question related to Sagemath permission on Github

2024-01-22 Thread Nils Bruin
On Sunday 21 January 2024 at 04:25:42 UTC-8 Juan Grados wrote:

To protect the repo from arbitrary deletion, I need to know if Github 
allows adding a rule to avoid a repository being deleted by a single 
person. 

If you encourage a workflow with forks and pull requests then everybody 
will have their own copy anyway. Then the question is more: is there a way 
to reinstate a repo after it is deleted? Then it will be recovering from an 
admin mistake, just as any misjudged commit will be (if you have to worry 
about your admins inadvertently deleting your repo then you'll have to 
worry about wrong merges even more). And if you expect that your admins are 
prone to making mistakes, people will probably be much happier living 
mainly in their own repo and only interacting with the central one if they 
have to (for pull requests). It of course does add a level of indirection 
to staying up-to-date, but I think the sage github documentation has some 
tips on minimizing the pain in that (and otherwise other projects will). 

-- 
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/0663f1c7-fc7b-4252-8bb9-07b3f48de6fcn%40googlegroups.com.


Re: [sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Dima Pasechnik



On 4 January 2024 12:15:07 WET, Emmanuel Charpentier 
 wrote:
>
>
>Indeed :
>(%i29) domain:complex; (%o29) complex (%i30) Sol1C:solve(Sys1, Unks); 
>(%o30) [[x = 8,y = -40/3,l = (2*25^(1/3))/(3*9^(1/3))]] (%i31) 
>Sol2C:solve(Sys2, Unks); (%o31) [] (%i32) map(lambda([w], map(lambda([v], 
>subst(w, v)), map(lambda([u], ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1C); 
>(%o32) [[((8*(-1)^(2/3)*5^(5/3))/3^(2/3)-(40*25^(1/3))/9^(1/3))/12, 
>((8*(-1)^(1/3)*3^(2/3)*5^(1/3)*25^(1/3))/9^(1/3)+40) 
>/(2*(-1)^(1/3)*3^(2/3)*5^(1/3)),0]] (%i33) %, numer; (%o33) 
>[[0.08333*(56.22884435344994 
>*(0.8660254037844387*%i-0.4998) -56.22884435344994), 
>0.1405721108836249*(39.99 
>*(0.8660254037844386*%i+0.5001) 
>+40)*(0.5001-0.8660254037844386*%i), 0]] (%i34) map(lambda([w], 
>map(lambda([v], subst(w, v)), map(lambda([u], ratsimp(lhs(u)-rhs(u))), 
>Sys2))), Sol2C); (%o34) [] (%i35) %, numer; (%o35) [] 
>
>But this does not explain whiy Sage is uneble o check (numericalmlmy or 
>otherwise) the solutions given by Sympy or Mathematica, which check in 
>Sympy (I didn’t yet try to check them in Mathematica, the limitations of 
>the current Mathematica interface make this bothersome…).
>
>IMHO, this would deserve a critiocal ticket (possibly a blocker one), but I 
>do not know how to report this efficiently. Suggestions welcome…

open an issue with this data there

>
>HTH,
>​
>Le jeudi 4 janvier 2024 à 12:04:14 UTC+1, Dima Pasechnik a écrit :
>
>> You can get the same errors from pure Maxima if you set domain to 
>> "complex",
>> no? 
>>
>> On Thursday, January 4, 2024 at 10:29:56 AM UTC Emmanuel Charpentier wrote:
>>
>>> The problem seems Sage-specific : the same systems solve correctly (up to 
>>> numerical noise) in “pure” Maxima :
>>> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas" 
>>> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sockets.fas" Maxima 
>>> 5.46.0 https://maxima.sourceforge.io using Lisp ECL 21.2.1 Distributed 
>>> under the GNU Public License. See the file COPYING. Dedicated to the memory 
>>> of William Schelter. The function bug_report() provides bug reporting 
>>> information. (%i1) display2d:false; (%o1) false (%i2) Unks:[x,y,l]; (%o2) 
>>> [x,y,l] (%i3) f:10*x^(1/3)*y^(2/3); (%o3) 10*x^(1/3)*y^(2/3) (%i4) g:5*x - 
>>> 6*y; (%o4) 5*x-6*y (%i5) h:5*x^2 + 6*y; (%o5) 6*y+5*x^2 (%i6) fx:diff(f,x); 
>>> (%o6) (10*y^(2/3))/(3*x^(2/3)) (%i7) fy:diff(f, y); (%o7) 
>>> (20*x^(1/3))/(3*y^(1/3)) (%i8) gx:diff(g, x); (%o8) 5 (%i9) gy:diff(g, y); 
>>> (%o9) -6 (%i10) hx:diff(h, x); (%o10) 10*x (%i11) hy:diff(h, y); (%o11) 6 
>>> (%i12) Sys1:[fx=l*gx,fy=l*gy,g=120]; (%o12) [(10*y^(2/3))/(3*x^(2/3)) = 
>>> 5*l,(20*x^(1/3))/(3*y^(1/3)) = -6*l, 5*x-6*y = 120] (%i13) 
>>> Sys2:[fx=l*hx,fy=l*hy,h=120]; (%o13) [(10*y^(2/3))/(3*x^(2/3)) = 
>>> 10*l*x,(20*x^(1/3))/(3*y^(1/3)) = 6*l, 6*y+5*x^2 = 120] (%i14) 
>>> Sol1:solve(Sys1, Unks); (%o14) [[x = 8,y = -40/3,l = (2*5^(2/3))/3^(5/3)]] 
>>> (%i15) Sol2:solve(Sys2, Unks); (%o15) [[x = (2*sqrt(6))/sqrt(5),y = 16,l = 
>>> 18750^(1/6)/9], [x = -(2*sqrt(6))/sqrt(5),y = 16,l = -18750^(1/6)/9]] 
>>> (%i16) map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
>>> ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1); (%o16) [[0,0,0]] (%i17) 
>>> map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
>>> ratsimp(lhs(u)-rhs(u))), Sys2))), Sol2); (%o17) 
>>> [[(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
>>> /(3*2^(2/3)*6^(1/3)), 
>>> -(2^(7/3)*18750^(1/6)-2^(7/3)*5^(5/6)*6^(1/6))/(3*2^(4/3)),0], 
>>> [(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
>>> /(3*2^(2/3)*6^(1/3)), 
>>> -(2^(7/3)*5^(5/6)*6^(1/6)-2^(7/3)*18750^(1/6))/(3*2^(4/3)),0]] (%i18) %, 
>>> numer; (%o18) [[1.404069277432862e-15,0.0,0],[1.404069277432862e-15,0.0,0]] 
>>>
>>> HTH,
>>> ​
>>> Le jeudi 4 janvier 2024 à 10:21:31 UTC+1, Emmanuel Charpentier a écrit :
>>>
 Motivation : see [this post], which shows a case where Sage fails to 
 find the roots of a three equations system.

 I signalled in this thread that Sympy was able to find these roots. But 
 I stumbled on a difficulty checking these solutions.

 Set up the systems :
 # Pretext : https://groups.google.com/g/sage-support/c/Nw12vYR0L0U 
 Unks=var('x,y,l 
 ') 
 f(x, y) = 10*x^(1/3)*y^(2/3) g(x, y) = 5*x - 6*y h(x, y) = 5*x^2 + 6*y fx 
 = 
 diff(f,x) fy = diff(f, y) gx = diff(g, x) gy = diff(g, y) hx = diff(h, x) 
 hy = diff(h, y) Sys1 = [fx(x, y)==l*gx(x, y),fy(x, y)==l*gy(x, y),g(x, 
 y)==120] Sys2 = [fx(x, y)==l*hx(x, y),fy(x, y)==l*hy(x, y),h(x, y)==120] 

 Sage’s (default) solution of the first system
 DSol1 = solve(Sys1, Unks, solution_dict=True) 

 As already shown in the original thread, Sage (slowly) fails to solve 
 the second system. Sympy can solve it (anfd the first one too…) 

Re: [sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Oscar Benjamin
On Thu, 4 Jan 2024 at 12:15, Emmanuel Charpentier
 wrote:
>
> But this does not explain whiy Sage is uneble o check (numericalmlmy or 
> otherwise) the solutions given by Sympy or Mathematica, which check in Sympy 
> (I didn’t yet try to check them in Mathematica, the limitations of the 
> current Mathematica interface make this bothersome…).

The problem is with Sage's subs method:

sage: e1 = (-40/3)**(2/3)
sage: e2 = (y**(2/3)).subs({y:-40/3})
sage: e1
4*(-5/3)^(2/3)
sage: e2
4*(5/3)^(2/3)
sage: e1.n()
-2.81144221767250 + 4.86956076355288*I
sage: e2.n()
5.62288443534499

When the number to be substituted has an exact cube factor subs loses
the sign under the radical:

sage: (y^(2/3)).subs({y:-12})
(-12)^(2/3)
sage: (y^(2/3)).subs({y:-24})
4*3^(2/3)

This is most likely due to confusing y^(n/m) as (y^n)^(1/m) when it
should be (y^(1/m))^n. These are not equivalent if y^(1/m) means the
principal mth root.

--
Oscar

-- 
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/CAHVvXxQg7XDM93_ZWf26kWfxWY3D1RorGewiG33T77TfGPS-Ng%40mail.gmail.com.


[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier


Indeed :
(%i29) domain:complex; (%o29) complex (%i30) Sol1C:solve(Sys1, Unks); 
(%o30) [[x = 8,y = -40/3,l = (2*25^(1/3))/(3*9^(1/3))]] (%i31) 
Sol2C:solve(Sys2, Unks); (%o31) [] (%i32) map(lambda([w], map(lambda([v], 
subst(w, v)), map(lambda([u], ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1C); 
(%o32) [[((8*(-1)^(2/3)*5^(5/3))/3^(2/3)-(40*25^(1/3))/9^(1/3))/12, 
((8*(-1)^(1/3)*3^(2/3)*5^(1/3)*25^(1/3))/9^(1/3)+40) 
/(2*(-1)^(1/3)*3^(2/3)*5^(1/3)),0]] (%i33) %, numer; (%o33) 
[[0.08333*(56.22884435344994 
*(0.8660254037844387*%i-0.4998) -56.22884435344994), 
0.1405721108836249*(39.99 
*(0.8660254037844386*%i+0.5001) 
+40)*(0.5001-0.8660254037844386*%i), 0]] (%i34) map(lambda([w], 
map(lambda([v], subst(w, v)), map(lambda([u], ratsimp(lhs(u)-rhs(u))), 
Sys2))), Sol2C); (%o34) [] (%i35) %, numer; (%o35) [] 

But this does not explain whiy Sage is uneble o check (numericalmlmy or 
otherwise) the solutions given by Sympy or Mathematica, which check in 
Sympy (I didn’t yet try to check them in Mathematica, the limitations of 
the current Mathematica interface make this bothersome…).

IMHO, this would deserve a critiocal ticket (possibly a blocker one), but I 
do not know how to report this efficiently. Suggestions welcome…

HTH,
​
Le jeudi 4 janvier 2024 à 12:04:14 UTC+1, Dima Pasechnik a écrit :

> You can get the same errors from pure Maxima if you set domain to 
> "complex",
> no? 
>
> On Thursday, January 4, 2024 at 10:29:56 AM UTC Emmanuel Charpentier wrote:
>
>> The problem seems Sage-specific : the same systems solve correctly (up to 
>> numerical noise) in “pure” Maxima :
>> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas" 
>> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sockets.fas" Maxima 
>> 5.46.0 https://maxima.sourceforge.io using Lisp ECL 21.2.1 Distributed 
>> under the GNU Public License. See the file COPYING. Dedicated to the memory 
>> of William Schelter. The function bug_report() provides bug reporting 
>> information. (%i1) display2d:false; (%o1) false (%i2) Unks:[x,y,l]; (%o2) 
>> [x,y,l] (%i3) f:10*x^(1/3)*y^(2/3); (%o3) 10*x^(1/3)*y^(2/3) (%i4) g:5*x - 
>> 6*y; (%o4) 5*x-6*y (%i5) h:5*x^2 + 6*y; (%o5) 6*y+5*x^2 (%i6) fx:diff(f,x); 
>> (%o6) (10*y^(2/3))/(3*x^(2/3)) (%i7) fy:diff(f, y); (%o7) 
>> (20*x^(1/3))/(3*y^(1/3)) (%i8) gx:diff(g, x); (%o8) 5 (%i9) gy:diff(g, y); 
>> (%o9) -6 (%i10) hx:diff(h, x); (%o10) 10*x (%i11) hy:diff(h, y); (%o11) 6 
>> (%i12) Sys1:[fx=l*gx,fy=l*gy,g=120]; (%o12) [(10*y^(2/3))/(3*x^(2/3)) = 
>> 5*l,(20*x^(1/3))/(3*y^(1/3)) = -6*l, 5*x-6*y = 120] (%i13) 
>> Sys2:[fx=l*hx,fy=l*hy,h=120]; (%o13) [(10*y^(2/3))/(3*x^(2/3)) = 
>> 10*l*x,(20*x^(1/3))/(3*y^(1/3)) = 6*l, 6*y+5*x^2 = 120] (%i14) 
>> Sol1:solve(Sys1, Unks); (%o14) [[x = 8,y = -40/3,l = (2*5^(2/3))/3^(5/3)]] 
>> (%i15) Sol2:solve(Sys2, Unks); (%o15) [[x = (2*sqrt(6))/sqrt(5),y = 16,l = 
>> 18750^(1/6)/9], [x = -(2*sqrt(6))/sqrt(5),y = 16,l = -18750^(1/6)/9]] 
>> (%i16) map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
>> ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1); (%o16) [[0,0,0]] (%i17) 
>> map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
>> ratsimp(lhs(u)-rhs(u))), Sys2))), Sol2); (%o17) 
>> [[(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
>> /(3*2^(2/3)*6^(1/3)), 
>> -(2^(7/3)*18750^(1/6)-2^(7/3)*5^(5/6)*6^(1/6))/(3*2^(4/3)),0], 
>> [(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
>> /(3*2^(2/3)*6^(1/3)), 
>> -(2^(7/3)*5^(5/6)*6^(1/6)-2^(7/3)*18750^(1/6))/(3*2^(4/3)),0]] (%i18) %, 
>> numer; (%o18) [[1.404069277432862e-15,0.0,0],[1.404069277432862e-15,0.0,0]] 
>>
>> HTH,
>> ​
>> Le jeudi 4 janvier 2024 à 10:21:31 UTC+1, Emmanuel Charpentier a écrit :
>>
>>> Motivation : see [this post], which shows a case where Sage fails to 
>>> find the roots of a three equations system.
>>>
>>> I signalled in this thread that Sympy was able to find these roots. But 
>>> I stumbled on a difficulty checking these solutions.
>>>
>>> Set up the systems :
>>> # Pretext : https://groups.google.com/g/sage-support/c/Nw12vYR0L0U 
>>> Unks=var('x,y,l 
>>> ') 
>>> f(x, y) = 10*x^(1/3)*y^(2/3) g(x, y) = 5*x - 6*y h(x, y) = 5*x^2 + 6*y fx = 
>>> diff(f,x) fy = diff(f, y) gx = diff(g, x) gy = diff(g, y) hx = diff(h, x) 
>>> hy = diff(h, y) Sys1 = [fx(x, y)==l*gx(x, y),fy(x, y)==l*gy(x, y),g(x, 
>>> y)==120] Sys2 = [fx(x, y)==l*hx(x, y),fy(x, y)==l*hy(x, y),h(x, y)==120] 
>>>
>>> Sage’s (default) solution of the first system
>>> DSol1 = solve(Sys1, Unks, solution_dict=True) 
>>>
>>> As already shown in the original thread, Sage (slowly) fails to solve 
>>> the second system. Sympy can solve it (anfd the first one too…) :
>>> SSol1 = solve(Sys1, Unks, algorithm="sympy") SSol2 = solve(Sys2, Unks, 
>>> algorithm="sympy") 
>>>
>>> For what it’s worth, chech the “competition” :
>>> MSol1 = [{u[1].sage():u[2].sage() for u 

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Dima Pasechnik
You can get the same errors from pure Maxima if you set domain to "complex",
no? 

On Thursday, January 4, 2024 at 10:29:56 AM UTC Emmanuel Charpentier wrote:

> The problem seems Sage-specific : the same systems solve correctly (up to 
> numerical noise) in “pure” Maxima :
> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas" 
> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sockets.fas" Maxima 
> 5.46.0 https://maxima.sourceforge.io using Lisp ECL 21.2.1 Distributed 
> under the GNU Public License. See the file COPYING. Dedicated to the memory 
> of William Schelter. The function bug_report() provides bug reporting 
> information. (%i1) display2d:false; (%o1) false (%i2) Unks:[x,y,l]; (%o2) 
> [x,y,l] (%i3) f:10*x^(1/3)*y^(2/3); (%o3) 10*x^(1/3)*y^(2/3) (%i4) g:5*x - 
> 6*y; (%o4) 5*x-6*y (%i5) h:5*x^2 + 6*y; (%o5) 6*y+5*x^2 (%i6) fx:diff(f,x); 
> (%o6) (10*y^(2/3))/(3*x^(2/3)) (%i7) fy:diff(f, y); (%o7) 
> (20*x^(1/3))/(3*y^(1/3)) (%i8) gx:diff(g, x); (%o8) 5 (%i9) gy:diff(g, y); 
> (%o9) -6 (%i10) hx:diff(h, x); (%o10) 10*x (%i11) hy:diff(h, y); (%o11) 6 
> (%i12) Sys1:[fx=l*gx,fy=l*gy,g=120]; (%o12) [(10*y^(2/3))/(3*x^(2/3)) = 
> 5*l,(20*x^(1/3))/(3*y^(1/3)) = -6*l, 5*x-6*y = 120] (%i13) 
> Sys2:[fx=l*hx,fy=l*hy,h=120]; (%o13) [(10*y^(2/3))/(3*x^(2/3)) = 
> 10*l*x,(20*x^(1/3))/(3*y^(1/3)) = 6*l, 6*y+5*x^2 = 120] (%i14) 
> Sol1:solve(Sys1, Unks); (%o14) [[x = 8,y = -40/3,l = (2*5^(2/3))/3^(5/3)]] 
> (%i15) Sol2:solve(Sys2, Unks); (%o15) [[x = (2*sqrt(6))/sqrt(5),y = 16,l = 
> 18750^(1/6)/9], [x = -(2*sqrt(6))/sqrt(5),y = 16,l = -18750^(1/6)/9]] 
> (%i16) map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
> ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1); (%o16) [[0,0,0]] (%i17) 
> map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
> ratsimp(lhs(u)-rhs(u))), Sys2))), Sol2); (%o17) 
> [[(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
> /(3*2^(2/3)*6^(1/3)), 
> -(2^(7/3)*18750^(1/6)-2^(7/3)*5^(5/6)*6^(1/6))/(3*2^(4/3)),0], 
> [(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
> /(3*2^(2/3)*6^(1/3)), 
> -(2^(7/3)*5^(5/6)*6^(1/6)-2^(7/3)*18750^(1/6))/(3*2^(4/3)),0]] (%i18) %, 
> numer; (%o18) [[1.404069277432862e-15,0.0,0],[1.404069277432862e-15,0.0,0]] 
>
> HTH,
> ​
> Le jeudi 4 janvier 2024 à 10:21:31 UTC+1, Emmanuel Charpentier a écrit :
>
>> Motivation : see [this post], which shows a case where Sage fails to find 
>> the roots of a three equations system.
>>
>> I signalled in this thread that Sympy was able to find these roots. But I 
>> stumbled on a difficulty checking these solutions.
>>
>> Set up the systems :
>> # Pretext : https://groups.google.com/g/sage-support/c/Nw12vYR0L0U 
>> Unks=var('x,y,l 
>> ') 
>> f(x, y) = 10*x^(1/3)*y^(2/3) g(x, y) = 5*x - 6*y h(x, y) = 5*x^2 + 6*y fx = 
>> diff(f,x) fy = diff(f, y) gx = diff(g, x) gy = diff(g, y) hx = diff(h, x) 
>> hy = diff(h, y) Sys1 = [fx(x, y)==l*gx(x, y),fy(x, y)==l*gy(x, y),g(x, 
>> y)==120] Sys2 = [fx(x, y)==l*hx(x, y),fy(x, y)==l*hy(x, y),h(x, y)==120] 
>>
>> Sage’s (default) solution of the first system
>> DSol1 = solve(Sys1, Unks, solution_dict=True) 
>>
>> As already shown in the original thread, Sage (slowly) fails to solve the 
>> second system. Sympy can solve it (anfd the first one too…) :
>> SSol1 = solve(Sys1, Unks, algorithm="sympy") SSol2 = solve(Sys2, Unks, 
>> algorithm="sympy") 
>>
>> For what it’s worth, chech the “competition” :
>> MSol1 = [{u[1].sage():u[2].sage() for u in s} for s in 
>> mathematica(Sys1).Solve(Unks)] MSol2 = [{u[1].sage():u[2].sage() for u in 
>> s} for s in mathematica(Sys2).Solve(Unks)] 
>>
>> Both Sympy and Mathematica find one solution to the first system and two 
>> for the second. These solutions have different ex^pressins, but that is not 
>> problematic. The fly in the ointment is that Sage has trouble checking 
>> these solutions. A simple numerical check of these solutions is :
>> sage: [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s in 
>> DSol1] [[-0.000977, 8.44 - 4.87*I, 0.000]] sage: 
>> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s in SSol1] 
>> [[7.03 - 4.06*I, 0.000488*I, 0.000]] sage: 
>> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys2] for s in SSol2] 
>> [[0.000977, 0.000, 0.000], [-0.000977 + 0.00195*I, 0.000122 - 0.000244*I, 
>> 0.000]] sage: [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s 
>> in MSol1] [[7.03 - 4.06*I, 0.000, 0.000]] sage: 
>> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys2] for s in MSol2] 
>> [[-0.00146 - 0.000977*I, 0.000122 + 0.000244*I, 0.000], [0.00195, 0.000244, 
>> 0.000]] 
>>
>> None of these solutions seems to check. Uh oh…
>>
>> However, using sympy to compute the same numerical checks gives different 
>> results :
>> sage: 
>> [[(e.lhs()-e.rhs())._sympy_().subs(sympy.sympify(s)).simplify().n(3) for e 
>> in Sys1] for s in DSol1] [[-7.03 + 4.06*I, 8.43 - 4.87*I, 

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier


The problem seems Sage-specific : the same systems solve correctly (up to 
numerical noise) in “pure” Maxima :
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas" ;;; 
Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sockets.fas" Maxima 5.46.0 
https://maxima.sourceforge.io using Lisp ECL 21.2.1 Distributed under the 
GNU Public License. See the file COPYING. Dedicated to the memory of 
William Schelter. The function bug_report() provides bug reporting 
information. (%i1) display2d:false; (%o1) false (%i2) Unks:[x,y,l]; (%o2) 
[x,y,l] (%i3) f:10*x^(1/3)*y^(2/3); (%o3) 10*x^(1/3)*y^(2/3) (%i4) g:5*x - 
6*y; (%o4) 5*x-6*y (%i5) h:5*x^2 + 6*y; (%o5) 6*y+5*x^2 (%i6) fx:diff(f,x); 
(%o6) (10*y^(2/3))/(3*x^(2/3)) (%i7) fy:diff(f, y); (%o7) 
(20*x^(1/3))/(3*y^(1/3)) (%i8) gx:diff(g, x); (%o8) 5 (%i9) gy:diff(g, y); 
(%o9) -6 (%i10) hx:diff(h, x); (%o10) 10*x (%i11) hy:diff(h, y); (%o11) 6 
(%i12) Sys1:[fx=l*gx,fy=l*gy,g=120]; (%o12) [(10*y^(2/3))/(3*x^(2/3)) = 
5*l,(20*x^(1/3))/(3*y^(1/3)) = -6*l, 5*x-6*y = 120] (%i13) 
Sys2:[fx=l*hx,fy=l*hy,h=120]; (%o13) [(10*y^(2/3))/(3*x^(2/3)) = 
10*l*x,(20*x^(1/3))/(3*y^(1/3)) = 6*l, 6*y+5*x^2 = 120] (%i14) 
Sol1:solve(Sys1, Unks); (%o14) [[x = 8,y = -40/3,l = (2*5^(2/3))/3^(5/3)]] 
(%i15) Sol2:solve(Sys2, Unks); (%o15) [[x = (2*sqrt(6))/sqrt(5),y = 16,l = 
18750^(1/6)/9], [x = -(2*sqrt(6))/sqrt(5),y = 16,l = -18750^(1/6)/9]] 
(%i16) map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1); (%o16) [[0,0,0]] (%i17) 
map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], 
ratsimp(lhs(u)-rhs(u))), Sys2))), Sol2); (%o17) 
[[(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
/(3*2^(2/3)*6^(1/3)), 
-(2^(7/3)*18750^(1/6)-2^(7/3)*5^(5/6)*6^(1/6))/(3*2^(4/3)),0], 
[(5^(1/3)*(5*2^(11/3)-(2^(8/3)*5^(1/6)*6^(5/6)*18750^(1/6))/3)) 
/(3*2^(2/3)*6^(1/3)), 
-(2^(7/3)*5^(5/6)*6^(1/6)-2^(7/3)*18750^(1/6))/(3*2^(4/3)),0]] (%i18) %, 
numer; (%o18) [[1.404069277432862e-15,0.0,0],[1.404069277432862e-15,0.0,0]] 

HTH,
​
Le jeudi 4 janvier 2024 à 10:21:31 UTC+1, Emmanuel Charpentier a écrit :

> Motivation : see [this post], which shows a case where Sage fails to find 
> the roots of a three equations system.
>
> I signalled in this thread that Sympy was able to find these roots. But I 
> stumbled on a difficulty checking these solutions.
>
> Set up the systems :
> # Pretext : https://groups.google.com/g/sage-support/c/Nw12vYR0L0U 
> Unks=var('x,y,l 
> ') 
> f(x, y) = 10*x^(1/3)*y^(2/3) g(x, y) = 5*x - 6*y h(x, y) = 5*x^2 + 6*y fx = 
> diff(f,x) fy = diff(f, y) gx = diff(g, x) gy = diff(g, y) hx = diff(h, x) 
> hy = diff(h, y) Sys1 = [fx(x, y)==l*gx(x, y),fy(x, y)==l*gy(x, y),g(x, 
> y)==120] Sys2 = [fx(x, y)==l*hx(x, y),fy(x, y)==l*hy(x, y),h(x, y)==120] 
>
> Sage’s (default) solution of the first system
> DSol1 = solve(Sys1, Unks, solution_dict=True) 
>
> As already shown in the original thread, Sage (slowly) fails to solve the 
> second system. Sympy can solve it (anfd the first one too…) :
> SSol1 = solve(Sys1, Unks, algorithm="sympy") SSol2 = solve(Sys2, Unks, 
> algorithm="sympy") 
>
> For what it’s worth, chech the “competition” :
> MSol1 = [{u[1].sage():u[2].sage() for u in s} for s in 
> mathematica(Sys1).Solve(Unks)] MSol2 = [{u[1].sage():u[2].sage() for u in 
> s} for s in mathematica(Sys2).Solve(Unks)] 
>
> Both Sympy and Mathematica find one solution to the first system and two 
> for the second. These solutions have different ex^pressins, but that is not 
> problematic. The fly in the ointment is that Sage has trouble checking 
> these solutions. A simple numerical check of these solutions is :
> sage: [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s in 
> DSol1] [[-0.000977, 8.44 - 4.87*I, 0.000]] sage: 
> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s in SSol1] 
> [[7.03 - 4.06*I, 0.000488*I, 0.000]] sage: 
> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys2] for s in SSol2] 
> [[0.000977, 0.000, 0.000], [-0.000977 + 0.00195*I, 0.000122 - 0.000244*I, 
> 0.000]] sage: [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys1] for s 
> in MSol1] [[7.03 - 4.06*I, 0.000, 0.000]] sage: 
> [[(e.lhs()-e.rhs()).subs(s).n(digits=3) for e in Sys2] for s in MSol2] 
> [[-0.00146 - 0.000977*I, 0.000122 + 0.000244*I, 0.000], [0.00195, 0.000244, 
> 0.000]] 
>
> None of these solutions seems to check. Uh oh…
>
> However, using sympy to compute the same numerical checks gives different 
> results :
> sage: [[(e.lhs()-e.rhs())._sympy_().subs(sympy.sympify(s)).simplify().n(3) 
> for e in Sys1] for s in DSol1] [[-7.03 + 4.06*I, 8.43 - 4.87*I, 0]] sage: 
> [[(e.lhs()-e.rhs())._sympy_().subs(sympy.sympify(s)).simplify().n(3) for e 
> in Sys1] for s in SSol1] [[0, 0, 0]] sage: 
> [[(e.lhs()-e.rhs())._sympy_().subs(sympy.sympify(s)).simplify().n(3) for e 
> in Sys2] for s in SSol2] [[0, 0, 0], [0, 0, 0]] sage: 
> 

[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier


These systems and Sage’s “solutions” exhibit some *serious* problems. See 
there …
​
Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit :

> FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use 
> sympy, as demonstrated here 
> 
> .
>
> HTH,
> ​
> Le mardi 28 novembre 2023 à 16:36:30 UTC+1, Fernando Q. Gouvea a écrit :
>
>> Yesterday I was demonstrating to my calculus class Sage's ability to 
>> implement the method of Lagrange multipliers. I used a standard example, 
>> putting the following code into SageMath Cell: 
>>
>> var('x,y,l') 
>> f(x,y)=10*x^(1/3)*y^(2/3) 
>> g(x,y)=5*x-6*y 
>> fx=diff(f,x) 
>> fy=diff(f,y) 
>> gx=diff(g,x) 
>> gy=diff(g,y) 
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l)) 
>>
>> That works beautifully. Then I decided to show off Sage's powers by 
>> making a little change: 
>>
>> var('x,y,l') 
>> f(x,y)=10*x^(1/3)*y^(2/3) 
>> g(x,y)=5*x^2+6*y 
>> fx=diff(f,x) 
>> fy=diff(f,y) 
>> gx=diff(g,x) 
>> gy=diff(g,y) 
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l)) 
>>
>> SageCell now gives me a spinning symbol ("I'm working") for a while, 
>> then seems to exit without any result. On my local installation (Sage 
>> 9.2 on Windows) it returns an empty list, []. 
>>
>> What is curious is that the constraint equation 5x^2 + 6y=120 is easily 
>> solved for y... 
>>
>> Questions: 
>>
>> 1) Shouldn't SageCell output an empty list here? 
>>
>> 2) Is this a known limitation of "solve"? 
>>
>> Fernando 
>>
>> PS: It seems that if I add "algorithm='sympy'" then solutions are found. 
>>
>> -- 
>> == 
>> Fernando Q. Gouvea 
>> Carter Professor of Mathematics 
>> Colby College 
>> Mayflower Hill 5836 
>> Waterville, ME 04901 
>> fqgo...@colby.edu http://www.colby.edu/~fqgouvea 
>>
>>
>>
>>

-- 
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/7558fee6-11fa-4557-b38e-42b8267029b7n%40googlegroups.com.


[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier
These systems and Sage's "solutions" exhibit some *serious* problems. See 
[there](https://groups.google.com/g/sage-support/c/gGssS_15jxE)...

Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit :

> FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use 
> sympy, as demonstrated here 
> 
> .
>
> HTH,
> ​
> Le mardi 28 novembre 2023 à 16:36:30 UTC+1, Fernando Q. Gouvea a écrit :
>
>> Yesterday I was demonstrating to my calculus class Sage's ability to 
>> implement the method of Lagrange multipliers. I used a standard example, 
>> putting the following code into SageMath Cell: 
>>
>> var('x,y,l') 
>> f(x,y)=10*x^(1/3)*y^(2/3) 
>> g(x,y)=5*x-6*y 
>> fx=diff(f,x) 
>> fy=diff(f,y) 
>> gx=diff(g,x) 
>> gy=diff(g,y) 
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l)) 
>>
>> That works beautifully. Then I decided to show off Sage's powers by 
>> making a little change: 
>>
>> var('x,y,l') 
>> f(x,y)=10*x^(1/3)*y^(2/3) 
>> g(x,y)=5*x^2+6*y 
>> fx=diff(f,x) 
>> fy=diff(f,y) 
>> gx=diff(g,x) 
>> gy=diff(g,y) 
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l)) 
>>
>> SageCell now gives me a spinning symbol ("I'm working") for a while, 
>> then seems to exit without any result. On my local installation (Sage 
>> 9.2 on Windows) it returns an empty list, []. 
>>
>> What is curious is that the constraint equation 5x^2 + 6y=120 is easily 
>> solved for y... 
>>
>> Questions: 
>>
>> 1) Shouldn't SageCell output an empty list here? 
>>
>> 2) Is this a known limitation of "solve"? 
>>
>> Fernando 
>>
>> PS: It seems that if I add "algorithm='sympy'" then solutions are found. 
>>
>> -- 
>> == 
>> Fernando Q. Gouvea 
>> Carter Professor of Mathematics 
>> Colby College 
>> Mayflower Hill 5836 
>> Waterville, ME 04901 
>> fqgo...@colby.edu http://www.colby.edu/~fqgouvea 
>>
>>
>>
>>

-- 
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/633463b4-c2c9-4d8c-add0-1a691a16e948n%40googlegroups.com.


[sage-support] Re: Connection Forms not Anti-Symmetric

2024-01-03 Thread Dominic Steinitz
It seems I should have specified the frame in the connection form as well 
as in the display (object? - I have no idea about OOP having been a 
functional programmer for the last 30 years).

In [13]:
omega(0,0,e).display(e), omega(0,1,e).display(e)
Out [13]:
(nabla_g connection 1-form (0,0) = 0,
 nabla_g connection 1-form (0,1) = y e^0 - x e^1)

In [14]:
omega(1,0,e).display(e), omega(1,1,e).display(e)
Out [14]:
(nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
 nabla_g connection 1-form (1,1) = 0)

On Tuesday 2 January 2024 at 17:28:43 UTC Dominic Steinitz wrote:

> Well apparently I should *not* be using `connection_form` but instead 
>
> `gam_e = nabla.coef(e)`
> `gam_e[:]`
>
> > [[[0, 0], [y, -x]], [[-y, x], [0, 0]]]
>
> Which is what I would have expected. I'm still confused by what 
> `connection_form` does if it doesn't calculate the connection forms.
> On Monday 1 January 2024 at 17:43:12 UTC Dominic Steinitz wrote:
>
>> That should be
>>
>> `omega(1,1).display(e)`
>>
>> > nabla_g connection 1-form (1,1) = x e^0 + y e^1)
>>
>> On Sunday 31 December 2023 at 16:43:16 UTC Dominic Steinitz wrote:
>>
>>> I am calculating the connection forms for the case of a Poincaré Disk 
>>> but the diagonal elements appear to be non-zero
>>>
>>> `M = Manifold(2, 'M', r'\mathcal{M}')`
>>>
>>> `c_xy. = M.chart('x:(-1,1) y:(-1,1)', coord_restrictions=lambda 
>>> x,y: x^2+y^2<1)`
>>>
>>> `g = M.riemannian_metric('g')`
>>>
>>> `g[0,0], g[1,1] = 4/(1 - x^2 - y^2)^2, 4/(1 - x^2 - y^2)^2`
>>>
>>> `e1 = M.vector_field((1 - x^2 - y^2) / 2, 0)`
>>>
>>> `e2 = M.vector_field(0, (1 - x^2 - y^2) / 2)`
>>>
>>> `e = M.vector_frame('e', (e1, e2), non_coordinate_basis=True)`
>>>
>>> `nabla = g.connection()`
>>>
>>> `omega = nabla.connection_form`
>>>
>>> `omega(0,0).display(e), omega(0,1).display(e)`
>>>
>>> > (nabla_g connection 1-form (0,0) = x e^0 + y e^1,
>>> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>>>
>>> `omega(1,0).display(e), omega(0,1).display(e)`
>>>
>>> > (nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
>>> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>>>
>>>

-- 
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/790bc2d1-221c-4413-80c6-1e5fda28d63dn%40googlegroups.com.


[sage-support] Re: Connection Forms not Anti-Symmetric

2024-01-02 Thread Dominic Steinitz
Well apparently I should *not* be using `connection_form` but instead 

`gam_e = nabla.coef(e)`
`gam_e[:]`

> [[[0, 0], [y, -x]], [[-y, x], [0, 0]]]

Which is what I would have expected. I'm still confused by what 
`connection_form` does if it doesn't calculate the connection forms.
On Monday 1 January 2024 at 17:43:12 UTC Dominic Steinitz wrote:

> That should be
>
> `omega(1,1).display(e)`
>
> > nabla_g connection 1-form (1,1) = x e^0 + y e^1)
>
> On Sunday 31 December 2023 at 16:43:16 UTC Dominic Steinitz wrote:
>
>> I am calculating the connection forms for the case of a Poincaré Disk but 
>> the diagonal elements appear to be non-zero
>>
>> `M = Manifold(2, 'M', r'\mathcal{M}')`
>>
>> `c_xy. = M.chart('x:(-1,1) y:(-1,1)', coord_restrictions=lambda x,y: 
>> x^2+y^2<1)`
>>
>> `g = M.riemannian_metric('g')`
>>
>> `g[0,0], g[1,1] = 4/(1 - x^2 - y^2)^2, 4/(1 - x^2 - y^2)^2`
>>
>> `e1 = M.vector_field((1 - x^2 - y^2) / 2, 0)`
>>
>> `e2 = M.vector_field(0, (1 - x^2 - y^2) / 2)`
>>
>> `e = M.vector_frame('e', (e1, e2), non_coordinate_basis=True)`
>>
>> `nabla = g.connection()`
>>
>> `omega = nabla.connection_form`
>>
>> `omega(0,0).display(e), omega(0,1).display(e)`
>>
>> > (nabla_g connection 1-form (0,0) = x e^0 + y e^1,
>> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>>
>> `omega(1,0).display(e), omega(0,1).display(e)`
>>
>> > (nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
>> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>>
>>

-- 
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/b4481671-72f9-47e5-8e80-9b239e8a4ad0n%40googlegroups.com.


[sage-support] Re: limitations of "solve"?

2024-01-02 Thread Emmanuel Charpentier


FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use 
sympy, as demonstrated here 

.

HTH,
​
Le mardi 28 novembre 2023 à 16:36:30 UTC+1, Fernando Q. Gouvea a écrit :

> Yesterday I was demonstrating to my calculus class Sage's ability to 
> implement the method of Lagrange multipliers. I used a standard example, 
> putting the following code into SageMath Cell:
>
> var('x,y,l')
> f(x,y)=10*x^(1/3)*y^(2/3)
> g(x,y)=5*x-6*y
> fx=diff(f,x)
> fy=diff(f,y)
> gx=diff(g,x)
> gy=diff(g,y)
> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>
> That works beautifully. Then I decided to show off Sage's powers by 
> making a little change:
>
> var('x,y,l')
> f(x,y)=10*x^(1/3)*y^(2/3)
> g(x,y)=5*x^2+6*y
> fx=diff(f,x)
> fy=diff(f,y)
> gx=diff(g,x)
> gy=diff(g,y)
> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>
> SageCell now gives me a spinning symbol ("I'm working") for a while, 
> then seems to exit without any result. On my local installation (Sage 
> 9.2 on Windows) it returns an empty list, [].
>
> What is curious is that the constraint equation 5x^2 + 6y=120 is easily 
> solved for y...
>
> Questions:
>
> 1) Shouldn't SageCell output an empty list here?
>
> 2) Is this a known limitation of "solve"?
>
> Fernando
>
> PS: It seems that if I add "algorithm='sympy'" then solutions are found.
>
> -- 
> ==
> Fernando Q. Gouvea
> Carter Professor of Mathematics
> Colby College
> Mayflower Hill 5836
> Waterville, ME 04901 
> fqgo...@colby.edu http://www.colby.edu/~fqgouvea
>
>
>
>

-- 
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/5a3584b1-a59b-4b58-a8a2-86a2869a40b3n%40googlegroups.com.


Re: [sage-support] Re: limitations of "solve"?

2024-01-01 Thread Oscar Benjamin
I did go on to discuss this on the Maxima mailing list:
https://sourceforge.net/p/maxima/mailman/maxima-discuss/thread/CADB8Zm56axVDFXRLbJnxm7xnnbQiixBzg4VX1T91ucj%2B-tuGvA%40mail.gmail.com/#msg58347791

Apparently domain:complex as used by Sage is not a very well tested
configuration of Maxima.

There are most likely other effects besides the documented one about
sqrt(x^2) not simplifying to abs(x):

$ git grep domain src/simp.lisp
src/simp.lisp:(defmvar $limitdomain '$complex)
src/simp.lisp: (cond ((or (and $logexpand (eq $domain '$real))
src/simp.lisp:(cond ((or $numer_pbranch (eq $domain '$complex))
src/simp.lisp: (or (and (eq $domain '$real) (not
(apparently-complex-to-judge-by-$csign-p (cadr gr
src/simp.lisp: (and (eq $domain '$complex)
(apparently-real-to-judge-by-$csign-p (cadr gr)
src/simp.lisp: (or (and (eq $domain '$real) (not
(apparently-complex-to-judge-by-$csign-p (cadr gr
src/simp.lisp: (and (eq $domain '$complex)
(apparently-real-to-judge-by-$csign-p (cadr gr)
src/simp.lisp: (and (eq $domain '$real) $radexpand))
src/simp.lisp:   ((or (eq $domain '$complex) (not $radexpand)) (go up)))
src/simp.lisp:(and (eq $domain '$complex)
src/simp.lisp:(and (eq $domain '$real)
src/simp.lisp:  (eq $domain '$real))
src/simp.lisp: (eq $domain '$real)
src/simp.lisp:   ((and (eq $domain '$real)
src/simp.lisp: (eq $domain '$real)
src/simp.lisp:  (and (eq $domain '$real) (ratnump e) (oddp (caddr e)
src/simp.lisp:   ((eq $domain '$real)

--
Oscar

On Mon, 1 Jan 2024 at 21:55, Nils Bruin  wrote:
>
> The documented effect is usually of most impact:
>
> https://maxima.sourceforge.io/docs/manual/maxima_46.html#index-domain
>
> there may be other undocumented effects, but the one above tends to explain a 
> lot already.
>
> On Sunday 3 December 2023 at 06:26:20 UTC-8 Oscar Benjamin wrote:
>>
>> What does "set domain to complex" mean in terms of Maxima's settings?
>>
>> Maxima's solve seems to compute complex solutions by default:
>>
>> (%i21) solve(x^2 + 1);
>> (%o21) [x = - %i, x = %i]
>>
>> On Sun, 3 Dec 2023 at 13:37, Dima Pasechnik  wrote:
>> >
>> > Yes, Sage modifies the defaults of Maxima, in particular we set domain to 
>> > complex.
>> >
>> > On 3 December 2023 12:28:45 GMT, Oscar Benjamin  
>> > wrote:
>> > >On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  
>> > >wrote:
>> > >>
>> > >> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
>> > >>
>> > >> Yes. Maxima's attitude is that the square root of negative one is an 
>> > >> expression which might have multiple values, rather than just picking 
>> > >> one you hope might be consistent over branch points.
>> > >>
>> > >> To enforce Maxima to work in the real domain, avoiding to play too much 
>> > >> with complex square roots, one can add at the beginning of the Sage 
>> > >> session:
>> > >>
>> > >> maxima_calculus.eval("domain: real;")
>> > >>
>> > >> Then the second example in the initial message of this thread yields
>> > >>
>> > >> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
>> > >> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
>> > >>
>> > >> instead of an empty list.
>> > >
>> > >When using Maxima (5.45.1) directly I get this result with default 
>> > >settings:
>> > >
>> > >(%i1) f: 10*x^(1/3)*y^(2/3)$
>> > >
>> > >(%i2) g: 5*x^2 + 6*y$
>> > >
>> > >(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], 
>> > >[x,y,l]);
>> > > 1/6
>> > > 2 sqrt(6) 18750
>> > >(%o3) [[x = -, y = 16, l = ],
>> > > sqrt(5) 9
>> > > 1/6
>> > > 2 sqrt(6) 18750
>> > > [x = - -, y = 16, l = - ]]
>> > > sqrt(5) 9
>> > >
>> > >Does Sage modify some Maxima settings related to this or does it call
>> > >something other than solve?
>> > >
>> > >--
>> > >Oscar
>> > >
>> >
>> > --
>> > 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...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sage-support/6F4839F2-38B6-40F2-B080-EFCC1C0C3B65%40gmail.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/454c0dbc-ead3-45c4-9557-fdb2391a9ce9n%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 

Re: [sage-support] Re: limitations of "solve"?

2024-01-01 Thread Nils Bruin
The documented effect is usually of most impact:

https://maxima.sourceforge.io/docs/manual/maxima_46.html#index-domain

there may be other undocumented effects, but the one above tends to explain 
a lot already.

On Sunday 3 December 2023 at 06:26:20 UTC-8 Oscar Benjamin wrote:

> What does "set domain to complex" mean in terms of Maxima's settings?
>
> Maxima's solve seems to compute complex solutions by default:
>
> (%i21) solve(x^2 + 1);
> (%o21) [x = - %i, x = %i]
>
> On Sun, 3 Dec 2023 at 13:37, Dima Pasechnik  wrote:
> >
> > Yes, Sage modifies the defaults of Maxima, in particular we set domain 
> to complex.
> >
> > On 3 December 2023 12:28:45 GMT, Oscar Benjamin  
> wrote:
> > >On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  
> wrote:
> > >>
> > >> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
> > >>
> > >> Yes. Maxima's attitude is that the square root of negative one is an 
> expression which might have multiple values, rather than just picking one 
> you hope might be consistent over branch points.
> > >>
> > >> To enforce Maxima to work in the real domain, avoiding to play too 
> much with complex square roots, one can add at the beginning of the Sage 
> session:
> > >>
> > >> maxima_calculus.eval("domain: real;")
> > >>
> > >> Then the second example in the initial message of this thread yields
> > >>
> > >> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
> > >>
> > >> instead of an empty list.
> > >
> > >When using Maxima (5.45.1) directly I get this result with default 
> settings:
> > >
> > >(%i1) f: 10*x^(1/3)*y^(2/3)$
> > >
> > >(%i2) g: 5*x^2 + 6*y$
> > >
> > >(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], 
> [x,y,l]);
> > > 1/6
> > > 2 sqrt(6) 18750
> > >(%o3) [[x = -, y = 16, l = ],
> > > sqrt(5) 9
> > > 1/6
> > > 2 sqrt(6) 18750
> > > [x = - -, y = 16, l = - ]]
> > > sqrt(5) 9
> > >
> > >Does Sage modify some Maxima settings related to this or does it call
> > >something other than solve?
> > >
> > >--
> > >Oscar
> > >
> >
> > --
> > 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...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/6F4839F2-38B6-40F2-B080-EFCC1C0C3B65%40gmail.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/454c0dbc-ead3-45c4-9557-fdb2391a9ce9n%40googlegroups.com.


[sage-support] Re: Connection Forms not Anti-Symmetric

2024-01-01 Thread Dominic Steinitz
That should be

`omega(1,1).display(e)`

> nabla_g connection 1-form (1,1) = x e^0 + y e^1)

On Sunday 31 December 2023 at 16:43:16 UTC Dominic Steinitz wrote:

> I am calculating the connection forms for the case of a Poincaré Disk but 
> the diagonal elements appear to be non-zero
>
> `M = Manifold(2, 'M', r'\mathcal{M}')`
>
> `c_xy. = M.chart('x:(-1,1) y:(-1,1)', coord_restrictions=lambda x,y: 
> x^2+y^2<1)`
>
> `g = M.riemannian_metric('g')`
>
> `g[0,0], g[1,1] = 4/(1 - x^2 - y^2)^2, 4/(1 - x^2 - y^2)^2`
>
> `e1 = M.vector_field((1 - x^2 - y^2) / 2, 0)`
>
> `e2 = M.vector_field(0, (1 - x^2 - y^2) / 2)`
>
> `e = M.vector_frame('e', (e1, e2), non_coordinate_basis=True)`
>
> `nabla = g.connection()`
>
> `omega = nabla.connection_form`
>
> `omega(0,0).display(e), omega(0,1).display(e)`
>
> > (nabla_g connection 1-form (0,0) = x e^0 + y e^1,
> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>
> `omega(1,0).display(e), omega(0,1).display(e)`
>
> > (nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
> >  nabla_g connection 1-form (0,1) = y e^0 - x e^1)
>
>

-- 
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/e117c3a4-7786-40ee-a261-5274de63031bn%40googlegroups.com.


[sage-support] Re: A nice (minor ?) bug ?

2023-12-24 Thread Emmanuel Charpentier


Never ming : this has been reported 
 six months ago…

Sorry for the noise…
​
Le vendredi 22 décembre 2023 à 06:51:59 UTC+1, Emmanuel Charpentier a 
écrit :

> Seen in 10.3.beta3 :
> sage: show_identifiers() :1: 
> DeprecationWarning: Importing Euler_Phi from here is deprecated; please use 
> "from sage.arith.misc import Euler_Phi" instead. See 
> https://github.com/sagemath/sage/issues/30322 for details. 
> show_identifiers() 
> --- 
> RuntimeError Traceback (most recent call last) Cell In[1], line 1 > 1 
> show_identifiers() File /usr/local/sage-10/src/sage/misc/session.pyx:232, 
> in sage.misc.session.show_identifiers() 230 return val == 
> DocTestTask.extra_globals.get(name, _none) 231 --> 232 return sorted([x for 
> x, v in state.items() if _is_new_var(x, v, hidden) 233 and not 
> _in_extra_globals(x, v)]) 234 RuntimeError: dictionary changed size during 
> iteration 
>
> How to report it efficiently ?
> ​
>

-- 
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/4d6c6d6c-12be-48c0-be90-4408061dff33n%40googlegroups.com.


Re: [sage-support] Re: sage 10.3.b2 build problem on OSX 12.7.1

2023-12-16 Thread John H Palmieri
Another quick solution (cherry-picked from the PR I mentioned) would be to 
change the first line of build/pkgs/editables/dependencies from 

 | $(PYTHON_TOOLCHAIN) $(PYTHON)

to 

 | flit_core $(PYTHON)


On Saturday, December 16, 2023 at 6:45:44 AM UTC-8 Heiko Knospe wrote:

> Hi, 
>
> same build problem with flit_core for sage 10.3.b2 on Debian 11:
>
> [editables-0.5] Thread model: posix
>
> [editables-0.5] Supported LTO compression algorithms: zlib zstd
>
> [editables-0.5] gcc version 10.2.1 20210110 (Debian 10.2.1-6) 
>
> [editables-0.5] 
>
> [editables-0.5] Package 'editables' is currently not installed
>
> [editables-0.5] No legacy uninstaller found for 'editables'; nothing to do
>
> [editables-0.5] Installing editables-0.5
>
> [editables-0.5] Looking in links: 
> /home/xxx/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels
>
> [editables-0.5] Processing 
> /home/xxx/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/editables-0.5/src
>
> [editables-0.5]   Installing build dependencies: started
>
> [editables-0.5]   Running command pip subprocess to install build 
> dependencies
>
> [editables-0.5]   Looking in links: 
> /home/xxx/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels
>
> [editables-0.5]   ERROR: Could not find a version that satisfies the 
> requirement flit_core>=3.3 (from versions: none)
>
> [editables-0.5]   ERROR: No matching distribution found for flit_core>=3.3
>
> [editables-0.5]   error: subprocess-exited-with-error
>
> [editables-0.5]   
>
> [editables-0.5]   × pip subprocess to install build dependencies did not 
> run successfully.
>
> [editables-0.5]   │ exit code: 1
>
> [editables-0.5]   ╰─> See above for output.
>
> My (quick and dirty) workaround was to copy 
> flit_core-3.9.0-py3-none-any.whl 
> 
>  from https://www.piwheels.org/project/flit-core/ to 
> local/var/lib/sage/venv-python3.9/var/lib/sage/wheels. Then compiling sage 
> works and flit_core-3.9.0 is installed.
>
> - Heiko
>
> David Joyner schrieb am Samstag, 16. Dezember 2023 um 12:40:00 UTC+1:
>
>> On Fri, Dec 15, 2023 at 3:04 PM John H Palmieri  
>> wrote:
>>
>>> In sage-release, Matthias pointed to missing dependencies for editables, 
>>> fixed in https://github.com/sagemath/sage/pull/36885. Maybe you can 
>>> just do "make flit_core" (to build the missing dependency) and then "make".
>>>
>>
>> That works, thanks!!
>>
>> BTW, on startup I got this:
>>
>> ./sage
>>
>> ┌┐
>>
>> │ SageMath version 10.3.beta2, Release Date: 2023-12-13  │
>>
>> │ Using Python 3.11.1. Type "help()" for help.   │
>>
>> └┘
>>
>> ┏┓
>>
>> ┃ Warning: this is a prerelease version, and it may be unstable. ┃
>>
>> ┗┛
>>
>> /Users/davidjoyner/sagefiles/sage-10.3.beta2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
>>  
>> DeprecationWarning: There is no current event loop
>>   loop = asyncio.get_event_loop()
>>
>> Seems to be working fine though.
>>
>> Thanks again, John.
>>  
>>
>>>
>>>
>>> On Friday, December 15, 2023 at 10:52:10 AM UTC-8 David Joyner wrote:
>>>
 Hi:

 I tried to compile sage and got this:

 The following package(s) may have failed to build (not necessarily

 during this run of 'make all-start'):


 * package: editables-0.5

   last build time: Dec 15 10:48

   log file:
 /Users/davidjoyner/sagefiles/sage-10.3.beta2/logs/pkgs/editables-0.5.log


 The corresponding log is attached.


 Does anyone have any suggestions on how to fix this?

 - David


 -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-support/ce30cd4c-f431-4eb8-ac35-f4ab5e941e49n%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 

[sage-support] Re: Problem with rebuilding Sage

2023-12-16 Thread Ruchit Jagodara
File 


On Saturday, December 16, 2023 at 1:46:44 AM UTC+5:30 David Ayotte wrote:

> Can you post the following log file:
>
> /home/ruchitjagodara/sage/sage/logs/pkgs/sagelib-10.3.beta0.log
>
> here? There might be some error message that would help us find the 
> problem.
>
> Best,
>
> David A.
>
> Le vendredi 15 décembre 2023 à 14:00:02 UTC-5, Ruchit Jagodara a écrit :
>
>> I am trying to rebuild sage using ./sage -br but it is failing for some 
>> reason ( I don't know exactly what is the reason.) This is happening to me 
>> since yesterday when I pulled developer branch from sage to get the most 
>> updated branch but after that whenever I am trying to rebuild sage it is 
>> giving some errors below are few lines of error message that I am getting. 
>> I am working on Linux and using 10.2 Sage version.
>>
>> ***
>> Error building Sage.
>>
>> The following package(s) may have failed to build (not necessarily
>> during this run of 'make sagelib-no-deps'):
>>
>> * package: sagelib-10.3.beta0
>>   last build time: Dec 15 22:20
>>   log file:   
>>  /home/ruchitjagodara/sage/sage/logs/pkgs/sagelib-10.3.beta0.log
>>
>> It is safe to delete any log files and build directories, but they
>> contain information that is helpful for debugging build problems.
>> WARNING: If you now run 'make' again, the build directory of the
>> same version of the package will, by default, be deleted. Set the
>> environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
>>
>

-- 
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/41df1c57-9f3e-41af-862a-bcead9aa7743n%40googlegroups.com.


Re: [sage-support] Re: sage 10.3.b2 build problem on OSX 12.7.1

2023-12-16 Thread 'Heiko Knospe' via sage-support
Hi, 

same build problem with flit_core for sage 10.3.b2 on Debian 11:

[editables-0.5] Thread model: posix

[editables-0.5] Supported LTO compression algorithms: zlib zstd

[editables-0.5] gcc version 10.2.1 20210110 (Debian 10.2.1-6) 

[editables-0.5] 

[editables-0.5] Package 'editables' is currently not installed

[editables-0.5] No legacy uninstaller found for 'editables'; nothing to do

[editables-0.5] Installing editables-0.5

[editables-0.5] Looking in links: 
/home/xxx/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels

[editables-0.5] Processing 
/home/xxx/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/editables-0.5/src

[editables-0.5]   Installing build dependencies: started

[editables-0.5]   Running command pip subprocess to install build 
dependencies

[editables-0.5]   Looking in links: 
/home/xxx/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels

[editables-0.5]   ERROR: Could not find a version that satisfies the 
requirement flit_core>=3.3 (from versions: none)

[editables-0.5]   ERROR: No matching distribution found for flit_core>=3.3

[editables-0.5]   error: subprocess-exited-with-error

[editables-0.5]   

[editables-0.5]   × pip subprocess to install build dependencies did not 
run successfully.

[editables-0.5]   │ exit code: 1

[editables-0.5]   ╰─> See above for output.

My (quick and dirty) workaround was to copy flit_core-3.9.0-py3-none-any.whl 

 from https://www.piwheels.org/project/flit-core/ to 
local/var/lib/sage/venv-python3.9/var/lib/sage/wheels. Then compiling sage 
works and flit_core-3.9.0 is installed.

- Heiko

David Joyner schrieb am Samstag, 16. Dezember 2023 um 12:40:00 UTC+1:

> On Fri, Dec 15, 2023 at 3:04 PM John H Palmieri  
> wrote:
>
>> In sage-release, Matthias pointed to missing dependencies for editables, 
>> fixed in https://github.com/sagemath/sage/pull/36885. Maybe you can just 
>> do "make flit_core" (to build the missing dependency) and then "make".
>>
>
> That works, thanks!!
>
> BTW, on startup I got this:
>
> ./sage
>
> ┌┐
>
> │ SageMath version 10.3.beta2, Release Date: 2023-12-13  │
>
> │ Using Python 3.11.1. Type "help()" for help.   │
>
> └┘
>
> ┏┓
>
> ┃ Warning: this is a prerelease version, and it may be unstable. ┃
>
> ┗┛
>
> /Users/davidjoyner/sagefiles/sage-10.3.beta2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
>  
> DeprecationWarning: There is no current event loop
>   loop = asyncio.get_event_loop()
>
> Seems to be working fine though.
>
> Thanks again, John.
>  
>
>>
>>
>> On Friday, December 15, 2023 at 10:52:10 AM UTC-8 David Joyner wrote:
>>
>>> Hi:
>>>
>>> I tried to compile sage and got this:
>>>
>>> The following package(s) may have failed to build (not necessarily
>>>
>>> during this run of 'make all-start'):
>>>
>>>
>>> * package: editables-0.5
>>>
>>>   last build time: Dec 15 10:48
>>>
>>>   log file:
>>> /Users/davidjoyner/sagefiles/sage-10.3.beta2/logs/pkgs/editables-0.5.log
>>>
>>>
>>> The corresponding log is attached.
>>>
>>>
>>> Does anyone have any suggestions on how to fix this?
>>>
>>> - David
>>>
>>>
>>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/ce30cd4c-f431-4eb8-ac35-f4ab5e941e49n%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/6dd64921-8a78-4107-9af0-817bf2f5e26bn%40googlegroups.com.


Re: [sage-support] Re: Problem with plot

2023-12-16 Thread Dima Pasechnik
It's probably just a build error. I'd try something like

make sage_conf && make

On Sat, Dec 16, 2023 at 9:36 AM Emmanuel Charpentier
 wrote:
>
> Le mercredi 13 décembre 2023 à 12:35:42 UTC+1, Philippe Delavalade a écrit :
>
> Hi.
>
> I'm using sage-10.2 with linux (slint-15.0 based on slackware 15.0) on the
> console.
>
> When I run
> p=plot(x^2); p
> there is no graphics on the screen, just the line
> Launched png viewer for Graphics object consisting of 1 graphics primitive
>
> Is something missing in my configuration ?
>
> Maybe : WorksForMe(TM) on Debian testing installed from source. How did you 
> obtain your installation ?
>
> Moreover, in help(plot), the command sphinx_plot is often used but on my
> machine I obtain
> NameError: name 'sphinx_plot' is not defined
>
> Googling sagemath sphinx_plot leads you to the General conventions chapter of 
> the Sage developer Guide, where it appears that this function is part of the 
> Sphinx system of documentation (especially the mechanisms extracting 
> viewable/printable documentation from Python docstrings).
>
> This function appears to trigger the output of (some relevant form of) 
> graphics in the desired documentation. Since help gives you a text form of 
> the docstring, which does not have any useful form of graphics, what you get 
> in the output is the (unexecuted) function call.
>
> A complete explanation probably exists in the Sphinx documentation, which I’m 
> currently too lazy to chase on the ‘Net…
>
> HTH,
>
>
>
> Thanks for help.
>
> --
> Philippe
>
> --
> 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/5f5cf9f2-4bf5-4558-8417-6e31c50858d7n%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/CAAWYfq3NvSybt5QQ7jdH1S3rt28jCnPp2yXHSuq186LwNN_aYA%40mail.gmail.com.


Re: [sage-support] Re: sage 10.3.b2 build problem on OSX 12.7.1

2023-12-16 Thread David Joyner
On Fri, Dec 15, 2023 at 3:04 PM John H Palmieri 
wrote:

> In sage-release, Matthias pointed to missing dependencies for editables,
> fixed in https://github.com/sagemath/sage/pull/36885. Maybe you can just
> do "make flit_core" (to build the missing dependency) and then "make".
>

That works, thanks!!

BTW, on startup I got this:

./sage

┌┐

│ SageMath version 10.3.beta2, Release Date: 2023-12-13  │

│ Using Python 3.11.1. Type "help()" for help.   │

└┘

┏┓

┃ Warning: this is a prerelease version, and it may be unstable. ┃

┗┛

/Users/davidjoyner/sagefiles/sage-10.3.beta2/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py:988:
DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()

Seems to be working fine though.

Thanks again, John.


>
>
> On Friday, December 15, 2023 at 10:52:10 AM UTC-8 David Joyner wrote:
>
>> Hi:
>>
>> I tried to compile sage and got this:
>>
>> The following package(s) may have failed to build (not necessarily
>>
>> during this run of 'make all-start'):
>>
>>
>> * package: editables-0.5
>>
>>   last build time: Dec 15 10:48
>>
>>   log file:
>> /Users/davidjoyner/sagefiles/sage-10.3.beta2/logs/pkgs/editables-0.5.log
>>
>>
>> The corresponding log is attached.
>>
>>
>> Does anyone have any suggestions on how to fix this?
>>
>> - David
>>
>>
>> --
> 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/ce30cd4c-f431-4eb8-ac35-f4ab5e941e49n%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/CAEQuuAVnCueYBMNQWXYrcE5kvmYJvfaifKq-nz6UAkOsNUEkyw%40mail.gmail.com.


[sage-support] Re: Problem with plot

2023-12-16 Thread Emmanuel Charpentier


Le mercredi 13 décembre 2023 à 12:35:42 UTC+1, Philippe Delavalade a écrit :

Hi. 

I'm using sage-10.2 with linux (slint-15.0 based on slackware 15.0) on the 
console. 

When I run 
p=plot(x^2); p 
there is no graphics on the screen, just the line 
Launched png viewer for Graphics object consisting of 1 graphics primitive 

Is something missing in my configuration ?

Maybe : WorksForMe(TM) on Debian testing installed from source. How did you 
obtain your installation ?

Moreover, in help(plot), the command sphinx_plot is often used but on my 
machine I obtain 
NameError: name 'sphinx_plot' is not defined

Googling sagemath sphinx_plot leads you to the General conventions 
 chapter of 
the Sage developer Guide 
, where it appears 
that this function is part of the Sphinx system of documentation 
(especially the mechanisms extracting viewable/printable documentation from 
Python docstrings).

This function appears to trigger the output of (some relevant form of) 
graphics in the desired documentation. Since help gives you a *text* form 
of the docstring, which does not have any useful form of graphics, what you 
get in the output is the (unexecuted) function call.

A complete explanation probably exists in the Sphinx documentation, which 
I’m currently too lazy to chase on the ‘Net…

HTH,



Thanks for help. 

-- 
Philippe 

​

-- 
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/5f5cf9f2-4bf5-4558-8417-6e31c50858d7n%40googlegroups.com.


[sage-support] Re: Problem with rebuilding Sage

2023-12-15 Thread David Ayotte
Can you post the following log file:

/home/ruchitjagodara/sage/sage/logs/pkgs/sagelib-10.3.beta0.log

here? There might be some error message that would help us find the problem.

Best,

David A.

Le vendredi 15 décembre 2023 à 14:00:02 UTC-5, Ruchit Jagodara a écrit :

> I am trying to rebuild sage using ./sage -br but it is failing for some 
> reason ( I don't know exactly what is the reason.) This is happening to me 
> since yesterday when I pulled developer branch from sage to get the most 
> updated branch but after that whenever I am trying to rebuild sage it is 
> giving some errors below are few lines of error message that I am getting. 
> I am working on Linux and using 10.2 Sage version.
>
> ***
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make sagelib-no-deps'):
>
> * package: sagelib-10.3.beta0
>   last build time: Dec 15 22:20
>   log file:   
>  /home/ruchitjagodara/sage/sage/logs/pkgs/sagelib-10.3.beta0.log
>
> It is safe to delete any log files and build directories, but they
> contain information that is helpful for debugging build problems.
> WARNING: If you now run 'make' again, the build directory of the
> same version of the package will, by default, be deleted. Set the
> environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
>

-- 
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/ec9b6fc9-671e-473f-a323-da21e89634a8n%40googlegroups.com.


[sage-support] Re: sage 10.3.b2 build problem on OSX 12.7.1

2023-12-15 Thread John H Palmieri
In sage-release, Matthias pointed to missing dependencies for editables, 
fixed in https://github.com/sagemath/sage/pull/36885. Maybe you can just do 
"make flit_core" (to build the missing dependency) and then "make".


On Friday, December 15, 2023 at 10:52:10 AM UTC-8 David Joyner wrote:

> Hi:
>
> I tried to compile sage and got this:
>
> The following package(s) may have failed to build (not necessarily
>
> during this run of 'make all-start'):
>
>
> * package: editables-0.5
>
>   last build time: Dec 15 10:48
>
>   log file:
> /Users/davidjoyner/sagefiles/sage-10.3.beta2/logs/pkgs/editables-0.5.log
>
>
> The corresponding log is attached.
>
>
> Does anyone have any suggestions on how to fix this?
>
> - David
>
>
>

-- 
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/ce30cd4c-f431-4eb8-ac35-f4ab5e941e49n%40googlegroups.com.


[sage-support] Re: Problems viewing crystals from sage

2023-12-12 Thread John H Palmieri
Please add comments to that ticket.

On Tuesday, December 12, 2023 at 6:15:31 PM UTC-8 Andrew wrote:

> Thanks John. 
>
> Yes, I think you are right because this PR is about exactly this issue 
> and, more importantly, it adds the code that I want to brutalise. I missed 
> this when used git blame to look for recent changes to sage.misc.latex. 
> This fits as view() was working without issues for me a month or so ago and 
> this was only merged at the end of October.
>
> Since https://github.com/sagemath/sage/pull/36529 is already merged is it 
> too late to add a comment on the ticket?
>
> Andrew
>
>
> On Wednesday 13 December 2023 at 12:30:03 pm UTC+11 John H Palmieri wrote:
>
>> Could this be related to https://github.com/sagemath/sage/pull/36529?
>>
>>
>> On Tuesday, December 12, 2023 at 3:50:55 PM UTC-8 Andrew wrote:
>>
>>> Playing around with this a little more, I think that this is a 
>>> bug/timing issue in sage.misc.latex.py (or in subprocess.run, or a mac 
>>> oddity since it only started happening recently). 
>>>
>>> What seems to be happening is that the generated PDF file, output_file, 
>>> is being deleted before the viewer is able to open it. Specifically, if I 
>>> add time.sleep(2) before the tmp.cleanup  then the viewer opens as expected.
>>>
>>> def run_viewer():
>>> run([viewer, output_file], capture_output=True)
>>> time.sleep(1)## adding this, together with import time, 
>>> fixes the problem
>>> tmp.cleanup()
>>>
>>> (This around line 1957 of latex.py.) Certainly this explains my 
>>> experience of the command working sometimes and failing at other times. On 
>>> the other hand, it is a little strange because subprocess.run is supposed 
>>> to wait for the process to finish. A shorter example that exhibits the 
>>> problem, at least on the two macs that I have available, is
>>>
>>> sage: view(crystals.LSPaths( 
>>> RootSystem(['A',4]).weight_space().basis()[1] ) )
>>>
>>> If people agree that this is a bug then I am happy to post a fix.
>>>
>>> Andrew
>>>
>>>
>>> On Monday 11 December 2023 at 4:35:59 pm UTC+11 Andrew wrote:
>>>
 I am trying to view crystal graphs from inside sage, and I am going a 
 little nuts. Sometimes view(...) works as I expect but most of the time it 
 doesn't, and I see the error message:

 The document “sage.pdf” could not be opened. The file doesn’t exist.

 (my emphasis). I compiled sage from source and I am running:

 SageMath version 10.3.beta1
 Release Date: 2023-12-10 
 Using Python 3.11.6.

 on a 2022 macbook pro (M1 max), running Sonoma 14.1.2. I installed 
 dot2tex using:
 sage -i dot2tex, which 
 which installed without errors. Running
 sage: from sage.graphs.graph_latex import check_tkz_graph
 sage: check_tkz_graph() 
 does not report any problems with my set up.

 I get the error message above using the the sage commands:

 sage: L=RootSystem(['A',4]).weight_space().basis()
 sage: G=crystals.LSPaths(['A',4], L[1])
 sage: G
 The crystal of LS paths of type ['A', 4] and weight Lambda[2]
 sage: view(G)

 I get the same error if I try the examples from the "Classical 
 crystals" thematic tutorial, 
 
  
 such as:

 sage: B = crystals.Tableaux(['A',2], shape=[2,1])
 sage: view(B, tightpage=True) 

 When it does work, a nice tikz generated pdf file pops up. Am I missing 
 some steps? Can anyone tell me what I am doing wrong?

 Andrew




-- 
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/7227e438-d87f-4ec7-8511-8be2413a68d1n%40googlegroups.com.


[sage-support] Re: Problems viewing crystals from sage

2023-12-12 Thread 'Andrew' via sage-support
Thanks John. 

Yes, I think you are right because this PR is about exactly this issue and, 
more importantly, it adds the code that I want to brutalise. I missed this 
when used git blame to look for recent changes to sage.misc.latex. This 
fits as view() was working without issues for me a month or so ago and this 
was only merged at the end of October.

Since https://github.com/sagemath/sage/pull/36529 is already merged is it 
too late to add a comment on the ticket?

Andrew


On Wednesday 13 December 2023 at 12:30:03 pm UTC+11 John H Palmieri wrote:

> Could this be related to https://github.com/sagemath/sage/pull/36529?
>
>
> On Tuesday, December 12, 2023 at 3:50:55 PM UTC-8 Andrew wrote:
>
>> Playing around with this a little more, I think that this is a bug/timing 
>> issue in sage.misc.latex.py (or in subprocess.run, or a mac oddity since 
>> it only started happening recently). 
>>
>> What seems to be happening is that the generated PDF file, output_file, 
>> is being deleted before the viewer is able to open it. Specifically, if I 
>> add time.sleep(2) before the tmp.cleanup  then the viewer opens as expected.
>>
>> def run_viewer():
>> run([viewer, output_file], capture_output=True)
>> time.sleep(1)## adding this, together with import time, fixes 
>> the problem
>> tmp.cleanup()
>>
>> (This around line 1957 of latex.py.) Certainly this explains my 
>> experience of the command working sometimes and failing at other times. On 
>> the other hand, it is a little strange because subprocess.run is supposed 
>> to wait for the process to finish. A shorter example that exhibits the 
>> problem, at least on the two macs that I have available, is
>>
>> sage: view(crystals.LSPaths( 
>> RootSystem(['A',4]).weight_space().basis()[1] ) )
>>
>> If people agree that this is a bug then I am happy to post a fix.
>>
>> Andrew
>>
>>
>> On Monday 11 December 2023 at 4:35:59 pm UTC+11 Andrew wrote:
>>
>>> I am trying to view crystal graphs from inside sage, and I am going a 
>>> little nuts. Sometimes view(...) works as I expect but most of the time it 
>>> doesn't, and I see the error message:
>>>
>>> The document “sage.pdf” could not be opened. The file doesn’t exist.
>>>
>>> (my emphasis). I compiled sage from source and I am running:
>>>
>>> SageMath version 10.3.beta1
>>> Release Date: 2023-12-10 
>>> Using Python 3.11.6.
>>>
>>> on a 2022 macbook pro (M1 max), running Sonoma 14.1.2. I installed 
>>> dot2tex using:
>>> sage -i dot2tex, which 
>>> which installed without errors. Running
>>> sage: from sage.graphs.graph_latex import check_tkz_graph
>>> sage: check_tkz_graph() 
>>> does not report any problems with my set up.
>>>
>>> I get the error message above using the the sage commands:
>>>
>>> sage: L=RootSystem(['A',4]).weight_space().basis()
>>> sage: G=crystals.LSPaths(['A',4], L[1])
>>> sage: G
>>> The crystal of LS paths of type ['A', 4] and weight Lambda[2]
>>> sage: view(G)
>>>
>>> I get the same error if I try the examples from the "Classical 
>>> crystals" thematic tutorial, 
>>> 
>>>  
>>> such as:
>>>
>>> sage: B = crystals.Tableaux(['A',2], shape=[2,1])
>>> sage: view(B, tightpage=True) 
>>>
>>> When it does work, a nice tikz generated pdf file pops up. Am I missing 
>>> some steps? Can anyone tell me what I am doing wrong?
>>>
>>> Andrew
>>>
>>>
>>>

-- 
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/0d2d733b-430c-46f6-bf8e-6821d51b11f0n%40googlegroups.com.


[sage-support] Re: Problems viewing crystals from sage

2023-12-12 Thread John H Palmieri
Could this be related to https://github.com/sagemath/sage/pull/36529?


On Tuesday, December 12, 2023 at 3:50:55 PM UTC-8 Andrew wrote:

> Playing around with this a little more, I think that this is a bug/timing 
> issue in sage.misc.latex.py (or in subprocess.run, or a mac oddity since 
> it only started happening recently). 
>
> What seems to be happening is that the generated PDF file, output_file, is 
> being deleted before the viewer is able to open it. Specifically, if I add 
> time.sleep(2) before the tmp.cleanup  then the viewer opens as expected.
>
> def run_viewer():
> run([viewer, output_file], capture_output=True)
> time.sleep(1)## adding this, together with import time, fixes 
> the problem
> tmp.cleanup()
>
> (This around line 1957 of latex.py.) Certainly this explains my experience 
> of the command working sometimes and failing at other times. On the other 
> hand, it is a little strange because subprocess.run is supposed to wait for 
> the process to finish. A shorter example that exhibits the problem, at 
> least on the two macs that I have available, is
>
> sage: view(crystals.LSPaths( 
> RootSystem(['A',4]).weight_space().basis()[1] ) )
>
> If people agree that this is a bug then I am happy to post a fix.
>
> Andrew
>
>
> On Monday 11 December 2023 at 4:35:59 pm UTC+11 Andrew wrote:
>
>> I am trying to view crystal graphs from inside sage, and I am going a 
>> little nuts. Sometimes view(...) works as I expect but most of the time it 
>> doesn't, and I see the error message:
>>
>> The document “sage.pdf” could not be opened. The file doesn’t exist.
>>
>> (my emphasis). I compiled sage from source and I am running:
>>
>> SageMath version 10.3.beta1
>> Release Date: 2023-12-10 
>> Using Python 3.11.6.
>>
>> on a 2022 macbook pro (M1 max), running Sonoma 14.1.2. I installed 
>> dot2tex using:
>> sage -i dot2tex, which 
>> which installed without errors. Running
>> sage: from sage.graphs.graph_latex import check_tkz_graph
>> sage: check_tkz_graph() 
>> does not report any problems with my set up.
>>
>> I get the error message above using the the sage commands:
>>
>> sage: L=RootSystem(['A',4]).weight_space().basis()
>> sage: G=crystals.LSPaths(['A',4], L[1])
>> sage: G
>> The crystal of LS paths of type ['A', 4] and weight Lambda[2]
>> sage: view(G)
>>
>> I get the same error if I try the examples from the "Classical crystals" 
>> thematic tutorial, 
>> 
>>  
>> such as:
>>
>> sage: B = crystals.Tableaux(['A',2], shape=[2,1])
>> sage: view(B, tightpage=True) 
>>
>> When it does work, a nice tikz generated pdf file pops up. Am I missing 
>> some steps? Can anyone tell me what I am doing wrong?
>>
>> Andrew
>>
>>
>>

-- 
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/c47fda1e-16dc-4a87-a17b-dc5393aca1afn%40googlegroups.com.


[sage-support] Re: Problems viewing crystals from sage

2023-12-12 Thread Andrew at Large
Playing around with this a little more, I think that this is a bug/timing 
issue in sage.misc.latex.py (or in subprocess.run, or a mac oddity since it 
only started happening recently). 

What seems to be happening is that the generated PDF file, output_file, is 
being deleted before the viewer is able to open it. Specifically, if I add 
time.sleep(2) before the tmp.cleanup  then the viewer opens as expected.

def run_viewer():
run([viewer, output_file], capture_output=True)
time.sleep(1)## adding this, together with import time, fixes 
the problem
tmp.cleanup()

(This around line 1957 of latex.py.) Certainly this explains my experience 
of the command working sometimes and failing at other times. On the other 
hand, it is a little strange because subprocess.run is supposed to wait for 
the process to finish. A shorter example that exhibits the problem, at 
least on the two macs that I have available, is

sage: view(crystals.LSPaths( 
RootSystem(['A',4]).weight_space().basis()[1] ) )

If people agree that this is a bug then I am happy to post a fix.

Andrew


On Monday 11 December 2023 at 16:35:59 UTC+11 Andrew wrote:

> I am trying to view crystal graphs from inside sage, and I am going a 
> little nuts. Sometimes view(...) works as I expect but most of the time it 
> doesn't, and I see the error message:
>
> The document “sage.pdf” could not be opened. The file doesn’t exist.
>
> (my emphasis). I compiled sage from source and I am running:
>
> SageMath version 10.3.beta1
> Release Date: 2023-12-10 
> Using Python 3.11.6.
>
> on a 2022 macbook pro (M1 max), running Sonoma 14.1.2. I installed dot2tex 
> using:
> sage -i dot2tex, which 
> which installed without errors. Running
> sage: from sage.graphs.graph_latex import check_tkz_graph
> sage: check_tkz_graph() 
> does not report any problems with my set up.
>
> I get the error message above using the the sage commands:
>
> sage: L=RootSystem(['A',4]).weight_space().basis()
> sage: G=crystals.LSPaths(['A',4], L[1])
> sage: G
> The crystal of LS paths of type ['A', 4] and weight Lambda[2]
> sage: view(G)
>
> I get the same error if I try the examples from the "Classical crystals" 
> thematic tutorial, 
> 
>  
> such as:
>
> sage: B = crystals.Tableaux(['A',2], shape=[2,1])
> sage: view(B, tightpage=True) 
>
> When it does work, a nice tikz generated pdf file pops up. Am I missing 
> some steps? Can anyone tell me what I am doing wrong?
>
> Andrew
>
>
>

-- 
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/76845499-1d98-45bb-ab22-8bf113504af8n%40googlegroups.com.


[sage-support] Re: Problems viewing crystals from sage

2023-12-12 Thread 'Andrew' via sage-support
Playing around with this a little more, I think that this is a bug/timing 
issue in sage.misc.latex.py (or in subprocess.run, or a mac oddity since it 
only started happening recently). 

What seems to be happening is that the generated PDF file, output_file, is 
being deleted before the viewer is able to open it. Specifically, if I add 
time.sleep(2) before the tmp.cleanup  then the viewer opens as expected.

def run_viewer():
run([viewer, output_file], capture_output=True)
time.sleep(1)## adding this, together with import time, fixes 
the problem
tmp.cleanup()

(This around line 1957 of latex.py.) Certainly this explains my experience 
of the command working sometimes and failing at other times. On the other 
hand, it is a little strange because subprocess.run is supposed to wait for 
the process to finish. A shorter example that exhibits the problem, at 
least on the two macs that I have available, is

sage: view(crystals.LSPaths( 
RootSystem(['A',4]).weight_space().basis()[1] ) )

If people agree that this is a bug then I am happy to post a fix.

Andrew


On Monday 11 December 2023 at 4:35:59 pm UTC+11 Andrew wrote:

> I am trying to view crystal graphs from inside sage, and I am going a 
> little nuts. Sometimes view(...) works as I expect but most of the time it 
> doesn't, and I see the error message:
>
> The document “sage.pdf” could not be opened. The file doesn’t exist.
>
> (my emphasis). I compiled sage from source and I am running:
>
> SageMath version 10.3.beta1
> Release Date: 2023-12-10 
> Using Python 3.11.6.
>
> on a 2022 macbook pro (M1 max), running Sonoma 14.1.2. I installed dot2tex 
> using:
> sage -i dot2tex, which 
> which installed without errors. Running
> sage: from sage.graphs.graph_latex import check_tkz_graph
> sage: check_tkz_graph() 
> does not report any problems with my set up.
>
> I get the error message above using the the sage commands:
>
> sage: L=RootSystem(['A',4]).weight_space().basis()
> sage: G=crystals.LSPaths(['A',4], L[1])
> sage: G
> The crystal of LS paths of type ['A', 4] and weight Lambda[2]
> sage: view(G)
>
> I get the same error if I try the examples from the "Classical crystals" 
> thematic tutorial, 
> 
>  
> such as:
>
> sage: B = crystals.Tableaux(['A',2], shape=[2,1])
> sage: view(B, tightpage=True) 
>
> When it does work, a nice tikz generated pdf file pops up. Am I missing 
> some steps? Can anyone tell me what I am doing wrong?
>
> Andrew
>
>
>

-- 
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/83f01624-6560-4c04-b760-0601d2b71f45n%40googlegroups.com.


[sage-support] Re: [sage-edu] This site can't be reached localhost refused to connect.

2023-12-08 Thread David Joyner
You should email sage-support (cc'd). This list is for teaching with sage.

On Fri, Dec 8, 2023, 2:37 PM Taylors SC  wrote:

> When I would open the Sage app, it would open an Jupyter notebook in a
> Chrome window. Now when I open the Sage app, it opens a browser window, but
> it has the message "This site can't be reached localhost refused to
> connect." My internet connection seems fine otherwise. I've tried using
> Safari and Firefox instead of Chrome, but get the same result. I've also
> reinstalled Sage and made sure I have the latest version.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-edu/26d07b10-8962-4104-b6fd-c52a3fd70de4n%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/CAEQuuAVSjTz8aBtVChCGeBCR%3DMeZhef8-9p35-ifecuSigK-8A%40mail.gmail.com.


Re: [sage-support] Re: Newer than Sage 10.0 conda release?

2023-12-05 Thread oscar bg
thanks for your support julian..
will test once merged..

On Tue, Dec 5, 2023 at 8:21 PM julian...@gmail.com 
wrote:

> Hi oscar,
>
> It seems that nobody has worked on 10.1 or 10.2 yet for conda-forge. I
> started https://github.com/conda-forge/sage-feedstock/pull/94 and
> https://github.com/conda-forge/sage-feedstock/pull/93. I'll add more work
> items there over the next few hours and any help with them is of course
> very welcome.
>
> julian
>
> On Tuesday, December 5, 2023 at 10:39:04 AM UTC+2 oscar bg wrote:
>
>> Hi,
>> asking for a Sagemath 10.1 and/or 10.2 conda release..
>> conda releases are stuck for 6 months without new release..
>> sad as it's default method..
>> thanks..
>>
> --
> 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/JhMlcdSXGz8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/c0b325e2-bded-494b-bd4d-7a71fca413e1n%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/CAM26bSXesvqSX-bxekd76yS1QQVAwEc4L093ZHb9m8NDVhBk0w%40mail.gmail.com.


[sage-support] Re: Newer than Sage 10.0 conda release?

2023-12-05 Thread julian...@gmail.com
Hi oscar,

It seems that nobody has worked on 10.1 or 10.2 yet for conda-forge. I 
started https://github.com/conda-forge/sage-feedstock/pull/94 and 
https://github.com/conda-forge/sage-feedstock/pull/93. I'll add more work 
items there over the next few hours and any help with them is of course 
very welcome.

julian

On Tuesday, December 5, 2023 at 10:39:04 AM UTC+2 oscar bg wrote:

> Hi,
> asking for a Sagemath 10.1 and/or 10.2 conda release..
> conda releases are stuck for 6 months without new release..
> sad as it's default method..
> thanks..
>

-- 
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/c0b325e2-bded-494b-bd4d-7a71fca413e1n%40googlegroups.com.


Re: [sage-support] Re: Calling Sage on Windows from external scripts

2023-12-03 Thread Dima Pasechnik
We are actually removing Cygwin support in Sage, so yes, going forward it will 
be WSL only.

On 3 December 2023 14:21:13 GMT, Sean Fitzpatrick  
wrote:
>Thanks David.
>
>It sounds like that will require some changes in PreTeXt itself.
>
>I was experimenting because I got a new Windows computer at work, to know
>how well PreTeXt is currently supported on Windows.
>
>I think the answer might be that everything works locally, as long as your
>book doesn't have Sage graphics.
>If it does, PreTeXt needs to be installed inside WSL rather than locally.
>Then one can follow instructions to connect vscode with the WSL.
>
>I had also tried using the older 9.3 Windows installer, but I couldn't get
>that to work either, and if Sage will be WSL only moving forward, it is
>probably not worth the effort to figure it out.
>
>On Sun, Dec 3, 2023, 12:58 a.m. David Ayotte 
>wrote:
>
>> If you have Python script running locally on Windows, you could call the
>> sage script by doing something like:
>>
>> import os
>> os.system('wsl sage your-sage-script.sage')
>>
>> See this page:
>>
>> https://learn.microsoft.com/en-us/windows/wsl/filesystems
>>
>> for more about Windows-Linux interoperability.
>>
>> David A.
>>
>>
>> Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :
>>
>>> I am wondering if anyone has experience installing Sage on Windows via
>>> WSL, and calling Sage as an executable from another program that's
>>> installed locally on Windows.
>>>
>>> My particular use case is processing Sage plot images in a PreTeXt
>>> document.
>>>
>>> I could install everything for PreTeXt via WSL but I already have most
>>> things locally installed: LaTeX, Python, VScode, etc.
>>> Sage is the only missing piece.
>>>
>>> For a PreTeXt book with Sage graphics, there's a Python script that
>>> extracts the Sage code, sends it to the Sage exectuable, and saves the
>>> resulting image.
>>>
>>> I'm not sure how to have a Python script running locally on Windows call
>>> an executable in WSL.
>>>
>> --
>> 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/Nol-n_kYRAw/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/a4cf8723-1376-49a6-babe-3bc910423cb4n%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/CAH%2BNcPaRecpjKXyL7C1s06mV2YyroUbWVJOqtDD0hWtZ_Cgp8Q%40mail.gmail.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/56A75FDF-8021-47F4-B9B7-FADDE8F5CD1B%40gmail.com.


Re: [sage-support] Re: limitations of "solve"?

2023-12-03 Thread Oscar Benjamin
What does "set domain to complex" mean in terms of Maxima's settings?

Maxima's solve seems to compute complex solutions by default:

(%i21) solve(x^2 + 1);
(%o21)[x = - %i, x = %i]

On Sun, 3 Dec 2023 at 13:37, Dima Pasechnik  wrote:
>
> Yes, Sage modifies the defaults of Maxima, in particular we set domain to 
> complex.
>
> On 3 December 2023 12:28:45 GMT, Oscar Benjamin  
> wrote:
> >On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  
> >wrote:
> >>
> >> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
> >>
> >> Yes.  Maxima's attitude is that the square root of negative one is an 
> >> expression which might have multiple values, rather than just picking one 
> >> you hope might be consistent over branch points.
> >>
> >> To enforce Maxima to work in the real domain, avoiding to play too much 
> >> with complex square roots, one can add at the beginning of the Sage 
> >> session:
> >>
> >> maxima_calculus.eval("domain: real;")
> >>
> >> Then the second example in the initial message of this thread yields
> >>
> >> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
> >> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
> >>
> >> instead of an empty list.
> >
> >When using Maxima (5.45.1) directly I get this result with default settings:
> >
> >(%i1) f: 10*x^(1/3)*y^(2/3)$
> >
> >(%i2) g: 5*x^2 + 6*y$
> >
> >(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], [x,y,l]);
> >1/6
> >2 sqrt(6)  18750
> >(%o3) [[x = -, y = 16, l = ],
> > sqrt(5)  9
> >  1/6
> >2 sqrt(6)18750
> > [x = - -, y = 16, l = - 
> > ]]
> > sqrt(5)9
> >
> >Does Sage modify some Maxima settings related to this or does it call
> >something other than solve?
> >
> >--
> >Oscar
> >
>
> --
> 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/6F4839F2-38B6-40F2-B080-EFCC1C0C3B65%40gmail.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/CAHVvXxQpSk-UpbgHEZ0dVaPFRcZ79SV0_vgC1Y%3DdGM_32T2KgA%40mail.gmail.com.


Re: [sage-support] Re: limitations of "solve"?

2023-12-03 Thread Oscar Benjamin
Oh, I see:

(%i23) domain: complex
;
(%o23)  complex
(%i24) f: 10*x^(1/3)*y^(2/3)$

(%i25) g: 5*x^2 + 6*y$

(%i26) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], [x,y,l]);
(%o26)[]

On Sun, 3 Dec 2023 at 14:20, Oscar Benjamin  wrote:
>
> What does "set domain to complex" mean in terms of Maxima's settings?
>
> Maxima's solve seems to compute complex solutions by default:
>
> (%i21) solve(x^2 + 1);
> (%o21)[x = - %i, x = %i]
>
> On Sun, 3 Dec 2023 at 13:37, Dima Pasechnik  wrote:
> >
> > Yes, Sage modifies the defaults of Maxima, in particular we set domain to 
> > complex.
> >
> > On 3 December 2023 12:28:45 GMT, Oscar Benjamin 
> >  wrote:
> > >On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  
> > >wrote:
> > >>
> > >> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
> > >>
> > >> Yes.  Maxima's attitude is that the square root of negative one is an 
> > >> expression which might have multiple values, rather than just picking 
> > >> one you hope might be consistent over branch points.
> > >>
> > >> To enforce Maxima to work in the real domain, avoiding to play too much 
> > >> with complex square roots, one can add at the beginning of the Sage 
> > >> session:
> > >>
> > >> maxima_calculus.eval("domain: real;")
> > >>
> > >> Then the second example in the initial message of this thread yields
> > >>
> > >> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
> > >> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
> > >>
> > >> instead of an empty list.
> > >
> > >When using Maxima (5.45.1) directly I get this result with default 
> > >settings:
> > >
> > >(%i1) f: 10*x^(1/3)*y^(2/3)$
> > >
> > >(%i2) g: 5*x^2 + 6*y$
> > >
> > >(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], 
> > >[x,y,l]);
> > >1/6
> > >2 sqrt(6)  18750
> > >(%o3) [[x = -, y = 16, l = ],
> > > sqrt(5)  9
> > >  
> > > 1/6
> > >2 sqrt(6)18750
> > > [x = - -, y = 16, l = - 
> > > ]]
> > > sqrt(5)9
> > >
> > >Does Sage modify some Maxima settings related to this or does it call
> > >something other than solve?
> > >
> > >--
> > >Oscar
> > >
> >
> > --
> > 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/6F4839F2-38B6-40F2-B080-EFCC1C0C3B65%40gmail.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/CAHVvXxRL812Rsnw-OnOH8n%2B5tDJXy8%3DsuOepRar9tBUnEtm27A%40mail.gmail.com.


Re: [sage-support] Re: Calling Sage on Windows from external scripts

2023-12-03 Thread Sean Fitzpatrick
Thanks David.

It sounds like that will require some changes in PreTeXt itself.

I was experimenting because I got a new Windows computer at work, to know
how well PreTeXt is currently supported on Windows.

I think the answer might be that everything works locally, as long as your
book doesn't have Sage graphics.
If it does, PreTeXt needs to be installed inside WSL rather than locally.
Then one can follow instructions to connect vscode with the WSL.

I had also tried using the older 9.3 Windows installer, but I couldn't get
that to work either, and if Sage will be WSL only moving forward, it is
probably not worth the effort to figure it out.

On Sun, Dec 3, 2023, 12:58 a.m. David Ayotte 
wrote:

> If you have Python script running locally on Windows, you could call the
> sage script by doing something like:
>
> import os
> os.system('wsl sage your-sage-script.sage')
>
> See this page:
>
> https://learn.microsoft.com/en-us/windows/wsl/filesystems
>
> for more about Windows-Linux interoperability.
>
> David A.
>
>
> Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :
>
>> I am wondering if anyone has experience installing Sage on Windows via
>> WSL, and calling Sage as an executable from another program that's
>> installed locally on Windows.
>>
>> My particular use case is processing Sage plot images in a PreTeXt
>> document.
>>
>> I could install everything for PreTeXt via WSL but I already have most
>> things locally installed: LaTeX, Python, VScode, etc.
>> Sage is the only missing piece.
>>
>> For a PreTeXt book with Sage graphics, there's a Python script that
>> extracts the Sage code, sends it to the Sage exectuable, and saves the
>> resulting image.
>>
>> I'm not sure how to have a Python script running locally on Windows call
>> an executable in WSL.
>>
> --
> 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/Nol-n_kYRAw/unsubscribe.
> To unsubscribe from this group and all its topics, 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/a4cf8723-1376-49a6-babe-3bc910423cb4n%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/CAH%2BNcPaRecpjKXyL7C1s06mV2YyroUbWVJOqtDD0hWtZ_Cgp8Q%40mail.gmail.com.


Re: [sage-support] Re: limitations of "solve"?

2023-12-03 Thread Fernando Gouvea

Is there a way to change the default when calling "solve"?

Fernando

On 12/3/2023 8:37 AM, Dima Pasechnik wrote:

Yes, Sage modifies the defaults of Maxima, in particular we set domain to 
complex.

On 3 December 2023 12:28:45 GMT, Oscar Benjamin  
wrote:

On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  wrote:

Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :

Yes.  Maxima's attitude is that the square root of negative one is an 
expression which might have multiple values, rather than just picking one you 
hope might be consistent over branch points.

To enforce Maxima to work in the real domain, avoiding to play too much with 
complex square roots, one can add at the beginning of the Sage session:

maxima_calculus.eval("domain: real;")

Then the second example in the initial message of this thread yields

[[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
-2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]

instead of an empty list.

When using Maxima (5.45.1) directly I get this result with default settings:

(%i1) f: 10*x^(1/3)*y^(2/3)$

(%i2) g: 5*x^2 + 6*y$

(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], [x,y,l]);
1/6
2 sqrt(6)  18750
(%o3) [[x = -, y = 16, l = ],
 sqrt(5)  9
  1/6
2 sqrt(6)18750
 [x = - -, y = 16, l = - ]]
 sqrt(5)9

Does Sage modify some Maxima settings related to this or does it call
something other than solve?

--
Oscar


--
=
Fernando Q. Gouveahttp://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of Mathematics
Colby College
5836 Mayflower Hill
Waterville, ME 04901

Mother Nature -- unlike Ivy League admissions committees --
doesn't like suck-ups.
  -- David Brooks, The New York Times, 4/24/2005

--
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/b2e8c972-3127-47a4-8187-a5a16cf3f712%40colby.edu.


Re: [sage-support] Re: limitations of "solve"?

2023-12-03 Thread Dima Pasechnik
Yes, Sage modifies the defaults of Maxima, in particular we set domain to 
complex.

On 3 December 2023 12:28:45 GMT, Oscar Benjamin  
wrote:
>On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  wrote:
>>
>> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
>>
>> Yes.  Maxima's attitude is that the square root of negative one is an 
>> expression which might have multiple values, rather than just picking one 
>> you hope might be consistent over branch points.
>>
>> To enforce Maxima to work in the real domain, avoiding to play too much with 
>> complex square roots, one can add at the beginning of the Sage session:
>>
>> maxima_calculus.eval("domain: real;")
>>
>> Then the second example in the initial message of this thread yields
>>
>> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
>> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
>>
>> instead of an empty list.
>
>When using Maxima (5.45.1) directly I get this result with default settings:
>
>(%i1) f: 10*x^(1/3)*y^(2/3)$
>
>(%i2) g: 5*x^2 + 6*y$
>
>(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], [x,y,l]);
>1/6
>2 sqrt(6)  18750
>(%o3) [[x = -, y = 16, l = ],
> sqrt(5)  9
>  1/6
>2 sqrt(6)18750
> [x = - -, y = 16, l = - ]]
> sqrt(5)9
>
>Does Sage modify some Maxima settings related to this or does it call
>something other than solve?
>
>--
>Oscar
>

-- 
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/6F4839F2-38B6-40F2-B080-EFCC1C0C3B65%40gmail.com.


Re: [sage-support] Re: limitations of "solve"?

2023-12-03 Thread Oscar Benjamin
On Wed, 29 Nov 2023 at 12:40, Eric Gourgoulhon  wrote:
>
> Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :
>
> Yes.  Maxima's attitude is that the square root of negative one is an 
> expression which might have multiple values, rather than just picking one you 
> hope might be consistent over branch points.
>
> To enforce Maxima to work in the real domain, avoiding to play too much with 
> complex square roots, one can add at the beginning of the Sage session:
>
> maxima_calculus.eval("domain: real;")
>
> Then the second example in the initial message of this thread yields
>
> [[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
> -2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]
>
> instead of an empty list.

When using Maxima (5.45.1) directly I get this result with default settings:

(%i1) f: 10*x^(1/3)*y^(2/3)$

(%i2) g: 5*x^2 + 6*y$

(%i3) solve([diff(f,x)=l*diff(g,x), diff(f,y)=l*diff(g,y), g=120], [x,y,l]);
1/6
2 sqrt(6)  18750
(%o3) [[x = -, y = 16, l = ],
 sqrt(5)  9
  1/6
2 sqrt(6)18750
 [x = - -, y = 16, l = - ]]
 sqrt(5)9

Does Sage modify some Maxima settings related to this or does it call
something other than solve?

--
Oscar

-- 
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/CAHVvXxToSwyc4iY3tnrXaMd1T8mp%3D5%2BOFW95kyAe5YEkM-PGrA%40mail.gmail.com.


[sage-support] Re: Calling Sage on Windows from external scripts

2023-12-02 Thread David Ayotte
If you have Python script running locally on Windows, you could call the 
sage script by doing something like:

import os
os.system('wsl sage your-sage-script.sage')

See this page:

https://learn.microsoft.com/en-us/windows/wsl/filesystems

for more about Windows-Linux interoperability.

David A.


Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :

> I am wondering if anyone has experience installing Sage on Windows via 
> WSL, and calling Sage as an executable from another program that's 
> installed locally on Windows.
>
> My particular use case is processing Sage plot images in a PreTeXt 
> document.
>
> I could install everything for PreTeXt via WSL but I already have most 
> things locally installed: LaTeX, Python, VScode, etc.
> Sage is the only missing piece.
>
> For a PreTeXt book with Sage graphics, there's a Python script that 
> extracts the Sage code, sends it to the Sage exectuable, and saves the 
> resulting image.
>
> I'm not sure how to have a Python script running locally on Windows call 
> an executable in WSL.
>

-- 
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/a4cf8723-1376-49a6-babe-3bc910423cb4n%40googlegroups.com.


Re: [sage-support] Re: limitations of "solve"?

2023-11-29 Thread kcrisman


I wouldn't mind seeing those discussions if you have a link to send 
(perhaps only to me). 


A relatively recent one (mentioning Eric's workaround) is 
https://groups.google.com/g/sage-devel/c/h50LZVLVQI4/m/AieyOKHVAQAJ  

(Note that there were at times separate problems with the "abs_integrate" 
and "to_poly_solve" Maxima packages, though these sometimes overlapped. 
 And sometimes we may have used them not as intended.)

-- 
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/d1a26eb0-93ec-4032-8278-cb0f60637bcen%40googlegroups.com.


[sage-support] Re: limitations of "solve"?

2023-11-29 Thread Eric Gourgoulhon
Hi, 

Le mardi 28 novembre 2023 à 18:25:04 UTC+1, kcrisman a écrit :

Yes.  Maxima's attitude is that the square root of negative one is an 
expression which might have multiple values, rather than just picking one 
you hope might be consistent over branch points.   


To enforce Maxima to work in the real domain, avoiding to play too much 
with complex square roots, one can add at the beginning of the Sage session:

maxima_calculus.eval("domain: real;")

Then the second example in the initial message of this thread yields

[[x == 2/5*sqrt(6)*sqrt(5), y == 16, l == 1/9*18750^(1/6)], [x == 
-2/5*sqrt(6)*sqrt(5), y == 16, l == -1/9*18750^(1/6)]]

instead of an empty list.

Eric. 

-- 
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/11caaed1-e48a-4d0f-a29a-a529cc4019c1n%40googlegroups.com.


Re: [sage-support] Re: limitations of "solve"?

2023-11-28 Thread Oscar Benjamin
On Tue, 28 Nov 2023 at 17:25, kcrisman  wrote:
>
> Answering part of my question: it seems that sympy and maxima have
> different attitudes towards fractional powers of negative numbers, which
> may be the source of the problem.
>
> Yes.  Maxima's attitude is that the square root of negative one is an 
> expression which might have multiple values, rather than just picking one you 
> hope might be consistent over branch points.   (There are very long 
> discussions on this list about this from years ago, which I will spare you by 
> not linking to any of them.)  I would not be surprised if that came up here.

I wouldn't mind seeing those discussions if you have a link to send
(perhaps only to me).

--
Oscar

-- 
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/CAHVvXxQKe1HvcD%2BYL3CHTpyH7s2K_LeEEq6Z-wJKjAmYjw5jGQ%40mail.gmail.com.


[sage-support] Re: limitations of "solve"?

2023-11-28 Thread kcrisman



Answering part of my question: it seems that sympy and maxima have 
different attitudes towards fractional powers of negative numbers, which 
may be the source of the problem. 


Yes.  Maxima's attitude is that the square root of negative one is an 
expression which might have multiple values, rather than just picking one 
you hope might be consistent over branch points.   (There are very long 
discussions on this list about this from years ago, which I will spare you 
by not linking to any of them.)  I would not be surprised if that came up 
here.

-- 
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/aeb940db-60ee-4718-b995-274dbed3cfcen%40googlegroups.com.


Re: [sage-support] Re: limitations of "solve"?

2023-11-28 Thread Dima Pasechnik
one should not be using sagecell.sagemath.org server for teaching, it's not 
scaling well (compared to cocalc.com, say) under load.

unleashing undergraduates to compute on it surely gets things very slow there 

On 28 November 2023 15:45:33 GMT, Eric Gourgoulhon  
wrote:
>Hi, 
>
>I've also noticed two days ago that https://sagecell.sagemath.org/ is very 
>slow (actually does not terminate) even on elementary operations. 
>Maybe there is a problem with the server at the moment...
>
>Eric. 
>
>Le mardi 28 novembre 2023 à 16:36:30 UTC+1, Fernando Q. Gouvea a écrit :
>
>> Yesterday I was demonstrating to my calculus class Sage's ability to 
>> implement the method of Lagrange multipliers. I used a standard example, 
>> putting the following code into SageMath Cell:
>>
>> var('x,y,l')
>> f(x,y)=10*x^(1/3)*y^(2/3)
>> g(x,y)=5*x-6*y
>> fx=diff(f,x)
>> fy=diff(f,y)
>> gx=diff(g,x)
>> gy=diff(g,y)
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>>
>> That works beautifully. Then I decided to show off Sage's powers by 
>> making a little change:
>>
>> var('x,y,l')
>> f(x,y)=10*x^(1/3)*y^(2/3)
>> g(x,y)=5*x^2+6*y
>> fx=diff(f,x)
>> fy=diff(f,y)
>> gx=diff(g,x)
>> gy=diff(g,y)
>> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>>
>> SageCell now gives me a spinning symbol ("I'm working") for a while, 
>> then seems to exit without any result. On my local installation (Sage 
>> 9.2 on Windows) it returns an empty list, [].
>>
>> What is curious is that the constraint equation 5x^2 + 6y=120 is easily 
>> solved for y...
>>
>> Questions:
>>
>> 1) Shouldn't SageCell output an empty list here?
>>
>> 2) Is this a known limitation of "solve"?
>>
>> Fernando
>>
>> PS: It seems that if I add "algorithm='sympy'" then solutions are found.
>>
>> -- 
>> ==
>> Fernando Q. Gouvea
>> Carter Professor of Mathematics
>> Colby College
>> Mayflower Hill 5836
>> Waterville, ME 04901 
>> fqgo...@colby.edu http://www.colby.edu/~fqgouvea
>>
>>
>>
>>
>
>-- 
>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/8f554c04-42d9-4765-bd3a-a82bd2758bddn%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/FA17F134-394F-46B4-814B-0A75072F01F3%40gmail.com.


[sage-support] Re: limitations of "solve"?

2023-11-28 Thread Fernando Q. Gouvea
Answering part of my question: it seems that sympy and maxima have 
different attitudes towards fractional powers of negative numbers, which 
may be the source of the problem.


If I change to g(x,y)=x^2+6*y then "solve" has no problem finding 
x=2*sqrt(6), y=16.


Fernando

On 11/28/2023 10:36 AM, Fernando Q. Gouvea wrote:
Yesterday I was demonstrating to my calculus class Sage's ability to 
implement the method of Lagrange multipliers. I used a standard 
example, putting the following code into SageMath Cell:


var('x,y,l')
f(x,y)=10*x^(1/3)*y^(2/3)
g(x,y)=5*x-6*y
fx=diff(f,x)
fy=diff(f,y)
gx=diff(g,x)
gy=diff(g,y)
solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))

That works beautifully. Then I decided to show off Sage's powers by 
making a little change:


var('x,y,l')
f(x,y)=10*x^(1/3)*y^(2/3)
g(x,y)=5*x^2+6*y
fx=diff(f,x)
fy=diff(f,y)
gx=diff(g,x)
gy=diff(g,y)
solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))

SageCell now gives me a spinning symbol ("I'm working") for a while, 
then seems to exit without any result. On my local installation (Sage 
9.2 on Windows) it returns an empty list, [].


What is curious is that the constraint equation 5x^2 + 6y=120 is 
easily solved for y...


Questions:

1) Shouldn't SageCell output an empty list here?

2) Is this a known limitation of "solve"?

Fernando

PS: It seems that if I add "algorithm='sympy'" then solutions are found.


--
==
Fernando Q. Gouvea
Carter Professor of Mathematics
Colby College
Mayflower Hill 5836
Waterville, ME 04901
fqgou...@colby.edu http://www.colby.edu/~fqgouvea

Let the majority eavesdrop if they like, but their tastes should be
firmly ignored.
  -- Dwight Macdonald, in "Masscult & Midcult"

--
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/b9576228-7687-44ca-a81e-eaa0aea02630%40colby.edu.


[sage-support] Re: limitations of "solve"?

2023-11-28 Thread Eric Gourgoulhon
Hi, 

I've also noticed two days ago that https://sagecell.sagemath.org/ is very 
slow (actually does not terminate) even on elementary operations. 
Maybe there is a problem with the server at the moment...

Eric. 

Le mardi 28 novembre 2023 à 16:36:30 UTC+1, Fernando Q. Gouvea a écrit :

> Yesterday I was demonstrating to my calculus class Sage's ability to 
> implement the method of Lagrange multipliers. I used a standard example, 
> putting the following code into SageMath Cell:
>
> var('x,y,l')
> f(x,y)=10*x^(1/3)*y^(2/3)
> g(x,y)=5*x-6*y
> fx=diff(f,x)
> fy=diff(f,y)
> gx=diff(g,x)
> gy=diff(g,y)
> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>
> That works beautifully. Then I decided to show off Sage's powers by 
> making a little change:
>
> var('x,y,l')
> f(x,y)=10*x^(1/3)*y^(2/3)
> g(x,y)=5*x^2+6*y
> fx=diff(f,x)
> fy=diff(f,y)
> gx=diff(g,x)
> gy=diff(g,y)
> solve((fx(x,y)==l*gx(x,y),fy(x,y)==l*gy(x,y),g(x,y)==120),(x,y,l))
>
> SageCell now gives me a spinning symbol ("I'm working") for a while, 
> then seems to exit without any result. On my local installation (Sage 
> 9.2 on Windows) it returns an empty list, [].
>
> What is curious is that the constraint equation 5x^2 + 6y=120 is easily 
> solved for y...
>
> Questions:
>
> 1) Shouldn't SageCell output an empty list here?
>
> 2) Is this a known limitation of "solve"?
>
> Fernando
>
> PS: It seems that if I add "algorithm='sympy'" then solutions are found.
>
> -- 
> ==
> Fernando Q. Gouvea
> Carter Professor of Mathematics
> Colby College
> Mayflower Hill 5836
> Waterville, ME 04901 
> fqgo...@colby.edu http://www.colby.edu/~fqgouvea
>
>
>
>

-- 
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/8f554c04-42d9-4765-bd3a-a82bd2758bddn%40googlegroups.com.


[sage-support] Re: Possible error: isogeny classes

2023-11-27 Thread hbetx9
Hi John,

 Thanks a bunch for the pointed reply. Glad to hear we weren't missing 
something easy and thanks a bunch for filling the bug report!

Best,
Lance

On Sunday, November 26, 2023 at 10:16:53 AM UTC-6 John Cremona wrote:

> https://github.com/sagemath/sage/issues/36780
>
> On Saturday, 25 November 2023 at 15:11:53 UTC John Cremona wrote:
>
>> Thanks for this report, which certainly indicates a bug.  I will look 
>> into it as the code here was written by me.  I note that the two curves 
>> have CM (by the order of index 5 and the maximal order in Q(sqrt(-3)) 
>> respectively), and the code to deal with isogenies is different in this 
>> case. The relevant function is isogeny_degrees_cm(), imported 
>> from sage.schemes.elliptic_curves.isogeny_class.  And for some reason that 
>> function is not including the valid isogeny prime 5.
>>
>> If you do F.isogeny_class(reducible_primes=[3,5]) you get the same as for 
>> E (but you have to so that in a fresh Sage session becauses of caching of 
>> previously computed results).
>>
>> John Cremona
>>
>> On Friday, 24 November 2023 at 03:50:54 UTC hbetx9 wrote:
>>
>>> Hi, 
>>>  
>>>  In some work on isogeny clases, my team ran across the following of two 
>>> elliptic curves which are isogenous but sage reports different isogeny 
>>> classes for them. Is there some  technicalities (j = 0) leading to 
>>> incorrect output or is this something that we should flag a bug? 
>>>
>>> sage: L5. = NumberField(x^2-5)
>>>
>>> sage: E = 
>>> EllipticCurve(L5,[287275052073119826051072\*r5-642366544675288047943680,-125329261653845158603060848774610944\*r5+280244748627855491701953075326484480])
>>>
>>> sage: F = EllipticCurve(L5,[0,-4325477943600\*r5-4195572876000])
>>>
>>> sage: E.isogeny_class().matrix()
>>> [ 1 25 75  3  5 15]
>>> [25  1  3 75  5 15]
>>> [75  3  1 25 15  5]
>>> [ 3 75 25  1 15  5]
>>> [ 5  5 15 15  1  3]
>>> [15 15  5  5  3  1]
>>>
>>> sage: F.isogeny_class().matrix()
>>> [1 3]
>>> [3 1]
>>>
>>> sage: E.is_isogenous(F)
>>> True
>>>
>>> Best,
>>> Lance
>>>
>>

-- 
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/a9f5672f-407e-4a51-8ee4-fbb5ddad3c35n%40googlegroups.com.


[sage-support] Re: Possible error: isogeny classes

2023-11-26 Thread John Cremona
https://github.com/sagemath/sage/issues/36780

On Saturday, 25 November 2023 at 15:11:53 UTC John Cremona wrote:

> Thanks for this report, which certainly indicates a bug.  I will look into 
> it as the code here was written by me.  I note that the two curves have CM 
> (by the order of index 5 and the maximal order in Q(sqrt(-3)) 
> respectively), and the code to deal with isogenies is different in this 
> case. The relevant function is isogeny_degrees_cm(), imported 
> from sage.schemes.elliptic_curves.isogeny_class.  And for some reason that 
> function is not including the valid isogeny prime 5.
>
> If you do F.isogeny_class(reducible_primes=[3,5]) you get the same as for 
> E (but you have to so that in a fresh Sage session becauses of caching of 
> previously computed results).
>
> John Cremona
>
> On Friday, 24 November 2023 at 03:50:54 UTC hbetx9 wrote:
>
>> Hi, 
>>  
>>  In some work on isogeny clases, my team ran across the following of two 
>> elliptic curves which are isogenous but sage reports different isogeny 
>> classes for them. Is there some  technicalities (j = 0) leading to 
>> incorrect output or is this something that we should flag a bug? 
>>
>> sage: L5. = NumberField(x^2-5)
>>
>> sage: E = 
>> EllipticCurve(L5,[287275052073119826051072\*r5-642366544675288047943680,-125329261653845158603060848774610944\*r5+280244748627855491701953075326484480])
>>
>> sage: F = EllipticCurve(L5,[0,-4325477943600\*r5-4195572876000])
>>
>> sage: E.isogeny_class().matrix()
>> [ 1 25 75  3  5 15]
>> [25  1  3 75  5 15]
>> [75  3  1 25 15  5]
>> [ 3 75 25  1 15  5]
>> [ 5  5 15 15  1  3]
>> [15 15  5  5  3  1]
>>
>> sage: F.isogeny_class().matrix()
>> [1 3]
>> [3 1]
>>
>> sage: E.is_isogenous(F)
>> True
>>
>> Best,
>> Lance
>>
>

-- 
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/ec0aba44-faaf-4bb0-a5d4-e6bd027131a5n%40googlegroups.com.


[sage-support] Re: Possible error: isogeny classes

2023-11-25 Thread John Cremona
Thanks for this report, which certainly indicates a bug.  I will look into 
it as the code here was written by me.  I note that the two curves have CM 
(by the order of index 5 and the maximal order in Q(sqrt(-3)) 
respectively), and the code to deal with isogenies is different in this 
case. The relevant function is isogeny_degrees_cm(), imported 
from sage.schemes.elliptic_curves.isogeny_class.  And for some reason that 
function is not including the valid isogeny prime 5.

If you do F.isogeny_class(reducible_primes=[3,5]) you get the same as for E 
(but you have to so that in a fresh Sage session becauses of caching of 
previously computed results).

John Cremona

On Friday, 24 November 2023 at 03:50:54 UTC hbetx9 wrote:

> Hi, 
>  
>  In some work on isogeny clases, my team ran across the following of two 
> elliptic curves which are isogenous but sage reports different isogeny 
> classes for them. Is there some  technicalities (j = 0) leading to 
> incorrect output or is this something that we should flag a bug? 
>
> sage: L5. = NumberField(x^2-5)
>
> sage: E = 
> EllipticCurve(L5,[287275052073119826051072\*r5-642366544675288047943680,-125329261653845158603060848774610944\*r5+280244748627855491701953075326484480])
>
> sage: F = EllipticCurve(L5,[0,-4325477943600\*r5-4195572876000])
>
> sage: E.isogeny_class().matrix()
> [ 1 25 75  3  5 15]
> [25  1  3 75  5 15]
> [75  3  1 25 15  5]
> [ 3 75 25  1 15  5]
> [ 5  5 15 15  1  3]
> [15 15  5  5  3  1]
>
> sage: F.isogeny_class().matrix()
> [1 3]
> [3 1]
>
> sage: E.is_isogenous(F)
> True
>
> Best,
> Lance
>

-- 
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/26785a33-7be4-4682-b988-ec2a4452a8a4n%40googlegroups.com.


[sage-support] Re: Odd Ricci scalar in Sagemanifolds

2023-11-20 Thread Rogerio
Thank you again, Eric!

Em segunda-feira, 20 de novembro de 2023 às 10:55:45 UTC-3, Eric 
Gourgoulhon escreveu:

> Hi, 
>
> The complicated result that you get is due to a lack of simplification in 
> Sage. More precisely, the default simplification chain automatically 
> applied in tensor calculus on manifolds, namely
>
> https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/utilities.html#sage.manifolds.utilities.simplify_chain_real
> yields overcomplicated expressions in your case. 
> To get a much simpler result, which looks much closer to Eq. (37) of the 
> paper, you have to replace the default simplification chain by a customized 
> one. In your case, it suffices to use the function factor(). 
> For this, use the manifold's method set_simplify_function() just after the 
> declaration of the chart X
>
> https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/manifold.html#sage.manifolds.manifold.TopologicalManifold.set_simplify_function
> i.e. start you notebook with
>
> N = Manifold(2,'N')
> X. = N.chart(r' M:(0,oo) J:(-oo,oo)')
> N.set_simplify_function(factor)
>
> Best wishes,
>
> Eric. 
>
> Le lundi 20 novembre 2023 à 04:44:49 UTC+1, Rogerio a écrit :
>
> Recently I encountered an odd result while using Sagemanifolds to 
> calculate the Ricci scalar for a specific 2D metric. I was trying to 
> reproduce Eq. (37) of this paper , 
> but the result was quite different. Here is the code
>  N = Manifold(2,'N')
>  X. = N.chart(r' M:(0,oo) J:(-oo,oo)')
>  ​
>  dM = X.coframe()[0]
>  dJ = X.coframe()[1]
>  g0 = 2/(1-J^2/M^4)^(3/2)*(-2*((1-J^2/M^4)^(3/2) +1-3*J^2/M^4)*dM*dM - 2*J
> /M^3*dM*dJ - 2*J/M^3*dJ*dM + dJ*dJ/M^2)
>  ​
>  g = N.metric('g')
>  g[:] = g0[:]
>  ric = g.ricci_scalar()
>
> The result is a high order rational function not resembling the paper 
> result. However, taking
>  R = 
> N.scalar_field(1/(4*M^2)*(sqrt(1-J^2/M^4)-2)/sqrt(1-J^2/M^4),name='R')
>  delta_R = ric-R
>  ​
>  delta_R == 0
>
> Results True.
>
> How to express the Ricci scalar as shown in the paper?
>
> Thanks in advance!
>
>

-- 
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/5f748bc5-742a-41a7-86d3-ddd1adc6bbe9n%40googlegroups.com.


[sage-support] Re: Odd Ricci scalar in Sagemanifolds

2023-11-20 Thread Eric Gourgoulhon
Hi, 

The complicated result that you get is due to a lack of simplification in 
Sage. More precisely, the default simplification chain automatically 
applied in tensor calculus on manifolds, namely
https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/utilities.html#sage.manifolds.utilities.simplify_chain_real
yields overcomplicated expressions in your case. 
To get a much simpler result, which looks much closer to Eq. (37) of the 
paper, you have to replace the default simplification chain by a customized 
one. In your case, it suffices to use the function factor(). 
For this, use the manifold's method set_simplify_function() just after the 
declaration of the chart X
https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/manifold.html#sage.manifolds.manifold.TopologicalManifold.set_simplify_function
i.e. start you notebook with

N = Manifold(2,'N')
X. = N.chart(r' M:(0,oo) J:(-oo,oo)')
N.set_simplify_function(factor)

Best wishes,

Eric. 

Le lundi 20 novembre 2023 à 04:44:49 UTC+1, Rogerio a écrit :

Recently I encountered an odd result while using Sagemanifolds to calculate 
the Ricci scalar for a specific 2D metric. I was trying to reproduce Eq. 
(37) of this paper , but the 
result was quite different. Here is the code
 N = Manifold(2,'N')
 X. = N.chart(r' M:(0,oo) J:(-oo,oo)')
 ​
 dM = X.coframe()[0]
 dJ = X.coframe()[1]
 g0 = 2/(1-J^2/M^4)^(3/2)*(-2*((1-J^2/M^4)^(3/2) +1-3*J^2/M^4)*dM*dM - 2*J/M
^3*dM*dJ - 2*J/M^3*dJ*dM + dJ*dJ/M^2)
 ​
 g = N.metric('g')
 g[:] = g0[:]
 ric = g.ricci_scalar()

The result is a high order rational function not resembling the paper 
result. However, taking
 R = N.scalar_field(1/(4*M^2)*(sqrt(1-J^2/M^4)-2)/sqrt(1-J^2/M^4),name='R')
 delta_R = ric-R
 ​
 delta_R == 0

Results True.

How to express the Ricci scalar as shown in the paper?

Thanks in advance!

-- 
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/b01ced68-390f-4a1f-ae64-0b5b4617f806n%40googlegroups.com.


Re: [sage-support] Re: Integral result differ from Wolfram|Alpha

2023-11-13 Thread Bùi Gia Nghĩa
Oh that's why! Thank you because that is exactly the problem!

On Tue, Nov 14, 2023, 4:54 AM John H Palmieri 
wrote:

> Isn't log(log(x)^2) = 2 * log(log(x))? Is this your concern, or is it the
> absolute value?
>
> On Monday, November 13, 2023 at 1:32:11 PM UTC-8 Bùi Gia Nghĩa wrote:
>
>> Hi!
>> I have used Sage Cell Server to integrate the function (ln(x)^2 - 1) / (x
>> * ln(x)). It should resulted in (ln(x)^2) / 2 - |ln(ln(x))| + C, as noted
>> by my textbook and Wolfram|Alpha, but instead resulted in 1/2*log(x)^2 -
>> 1/2*log(log(x)^2).
>> (I do notice that SageMath use log(a) to denote natural logarithm, so
>> that's not the question here).
>> Anyone knows why it happen? I think that this is a bug from some system
>> SageMath use to calculate this, but I am new to SageMath so have zero
>> knowledge about the system.
>> Here is the exact code I input:
>> var("x")
>> f = (log(x)**2 - 1) / (x * log(x))
>> integral(f, x)
>>
>> Thanks in advance!
>>
> --
> 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/cdc2eaeb-3201-46e3-a37e-c90e747756c1n%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/CAOnGMLeESB%2BUteYm7t0MMqgLma-y0_xaxg%3D3%2B5zdKG2W888sMA%40mail.gmail.com.


[sage-support] Re: Integral result differ from Wolfram|Alpha

2023-11-13 Thread John H Palmieri
Isn't log(log(x)^2) = 2 * log(log(x))? Is this your concern, or is it the 
absolute value?

On Monday, November 13, 2023 at 1:32:11 PM UTC-8 Bùi Gia Nghĩa wrote:

> Hi!
> I have used Sage Cell Server to integrate the function (ln(x)^2 - 1) / (x 
> * ln(x)). It should resulted in (ln(x)^2) / 2 - |ln(ln(x))| + C, as noted 
> by my textbook and Wolfram|Alpha, but instead resulted in 1/2*log(x)^2 - 
> 1/2*log(log(x)^2). 
> (I do notice that SageMath use log(a) to denote natural logarithm, so 
> that's not the question here).
> Anyone knows why it happen? I think that this is a bug from some system 
> SageMath use to calculate this, but I am new to SageMath so have zero 
> knowledge about the system.
> Here is the exact code I input:
> var("x")
> f = (log(x)**2 - 1) / (x * log(x))
> integral(f, x)
>
> Thanks in advance!
>

-- 
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/cdc2eaeb-3201-46e3-a37e-c90e747756c1n%40googlegroups.com.


  1   2   3   4   5   6   7   8   9   10   >