[sage-support] Re: Sagetex version ?

2022-08-20 Thread slelievre
This Sage Trac query for tickets whose summary contains "sagetex":

  https://trac.sagemath.org/query?order=id=1=~sagetex

reveals in particular this ticket:

- Sage Trac ticket 32887: update sagetex to version 3.6
  https://trac.sagemath.org/ticket/32887

where a discussion on what should be done is taking place.

-- 
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/d12eb830-4dbd-42c9-8ed9-8da104b314d2n%40googlegroups.com.


Re: [sage-support] problem with building sage

2022-08-12 Thread slelievre
Alternatively, run
```
make configure
./configure
make
```

-- 
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/0d1609fc-c1c8-4440-bfa0-7153733aec1an%40googlegroups.com.


[sage-support] Re: Sage build form source giac giac-1.6.0.47p3 failed to build, help with external packages

2022-07-08 Thread slelievre
Try building the latest development release of Sage,
currently Sage 9.7.beta4, instead of Sage 9.5.

-- 
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/29a32aae-b750-47e5-a361-122b0f67b1e1n%40googlegroups.com.


[sage-support] Re: nbserver-133-open.html file not found

2022-07-05 Thread slelievre
Thanks for the report.
I would install a more recent Ubuntu (say 22.04) to get a more recent Sage.
Or build Sage from source.

-- 
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/a01fd23e-f039-4fcd-a9ce-983536e5798cn%40googlegroups.com.


[sage-support] Re: PATH in OS X Jupyter notebook

2022-06-24 Thread slelievre
2022-06-22 16:37:11 UTC, John H Palmieri:
>
> How do I set the PATH in the OS X Jupyter notebook,
> if I'm using the 3-manifolds binary app? I mean, I know
> how to do it in an individual notebook, but how do I set
> the default PATH for every notebook? For example,
> how do I add /usr/local/bin so that it's in the PATH
> every time I open a new notebook?

Hi John,

Good job with your comments at

- Ask Sage question 62873
  https://ask.sagemath.org/question/62873
  Animating plots in Jupyter/Sagemath

Here is a possibility for the missing bit, after reading

- discussion at [Stack Overflow question 
34976803](https://stackoverflow.com/q/34976803)
- [Lucy Park: When Python imports but IPython does 
not](https://www.lucypark.kr/blog/2013/02/10/when-python-imports-and-ipython-does-not/)

To define some code to be run at the start of each
Sage session, and/or each time the Sage Jupyter
kernel starts, edit one or both of the files

- `$HOME/.sage/ipython-5.0.0/profile_default/ipython_config.py`
- `$HOME/.sage/ipython-5.0.0/profile_default/ipython_kernel_config.py`

in which you should find a section like this:

## lines of code to run at IPython startup.
#  Default: []
# c.InteractiveShellApp.exec_lines = []

Uncomment the last line in that section and add
any code to run. For example:

## lines of code to run at IPython startup.
#  Default: []
c.InteractiveShellApp.exec_lines = [
import sys; sys.path.append('/usr/local/bin')
]
 
Feel free to consolidate your comments and this idea
into an answer to the Ask Sage question.   --Samuel

-- 
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/03f13895-2d3b-4d64-ade6-d626a931307fn%40googlegroups.com.


[sage-support] Re: factoring in Gaussian integers

2022-06-24 Thread slelievre
2022-06-24 16:14:10 UTC, Michael Beeson:
>
> The following seems fishy:
> ```
> sage: K. = QuadraticField(-1) 
   
> sage: K.factor(13)   
 
> (Fractional ideal (-3*a - 2)) * (Fractional ideal (2*a + 3))
> ```

>From the documentation for `K.factor`:

   Ideal factorization of the principal ideal generated by n.

Is this closer to what you wanted?
```
sage: K(13).factor()
(a) * (-3*a - 2) * (2*a + 3)
```


-- 
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/e8ecc822-8274-45c6-b717-a5e21201b249n%40googlegroups.com.


[sage-support] Re: customization of sage docker

2022-03-28 Thread slelievre
2022-03-27 16:12:49 UTC, pong:

> I am switching to running sage docker image since the latest
> binaries for linux is no longer available. But can I make any
> customization, say in init.sage survive the quitting of docker?
> If yes, may I get some help on how?
>

On Linux, installing via Conda works really well.
Maybe that would work better for you? It would
definitely take your `init.sage` into account.

-- 
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/868604bb-c693-4105-bf97-d29c88158c81n%40googlegroups.com.


[sage-support] Re: search_def(), search_src() are not working in Sage

2022-03-23 Thread slelievre
So you installed two versions of Sage, one via
the Ubuntu package manager, the other one
built from source.

When you start Sage, it probably starts the one
installed via the package manager, likely Sage 9.0.

The one you built from source is likely either Sage 9.5
(the latest stable version) or Sage 9.6.beta5 (the latest
development version) if you used the develop branch.

If you want the Sage built from source to be started
rather than the system one, run this command,
assuming you cloned Sage in your home folder
using the default name `sage`:
```
sudo ln -sf $HOME/sage/sage /usr/local/bin
```

-- 
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/2ddd158f-0e0e-4014-afaf-22606d0f328dn%40googlegroups.com.


[sage-support] Re: search_def(), search_src() are not working in Sage

2022-03-23 Thread slelievre
>From the screenshot it looks like Ubuntu?

In which case, did you install Sage as an Ubuntu package?
or by building it from source? or via Conda? or in some
other way?

If you installed Sage using Ubuntu's package manager,
by selecting the package `sagemath`, you may also
want to install `sagemath-doc` (and maybe also, though
unrelated to your question here, `sagemath-jupyter`).

If you built Sage from source, the documentation should
have been built, but if it was not, try to build it by running
```
make sagemath_doc_html
```
from the root folder of your Sage installation.

-- 
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/7b836993-910d-4a5d-9c8e-bd7256cf39fdn%40googlegroups.com.


Re: [sage-support] Re: 2 questions on var

2022-03-07 Thread slelievre
Even more practical, I find, is to name the tuple of indexed variables:
```
sage: v = SR.var('v', n=8)
sage: v
(v0, v1, v2, v3, v4, v5, v6, v7)
```
and to use index notation `v[k]` instead of `vk` to use the variables.
```
sage: v[0]
v0
sage: v[7]
v7
```

That does not assign the variables to the names `v0` to `v7`:
```
sage: v2
Traceback (most recent call last)=
...
NameError: name 'v2' is not defined
```

If you really want to use `v0` to `v7` instead of `v[0]` to `v[7]`,
follow the implementation in `var` (accessed with `var??`),
which simply amounts to:
```
G = globals()
for vk in v:
G[repr(vk)] = vk
```

After that:
```
sage: v2
v2
```

-- 
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/89696796-8ead-479e-9b28-1155b998b2ean%40googlegroups.com.


[sage-support] Re: SageMath on Microsoft Windows

2022-02-27 Thread slelievre
The Cygwin-based Sage-Windows installer has not been released
for SageMath 9.4 or SageMath 9.5 yet.

To get the latest version of Sage running on Windows, one option
is to activate Windows Subsystem for Linux (also known as WSL),
select WSL2, and install any Linux distribution there, then follow
the Linux installation guide.

-- 
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/1b7cd011-8b2c-4d15-baad-4060964d849en%40googlegroups.com.


[sage-support] Re: Compiling Sage on Ubuntu 20.05

2022-02-27 Thread slelievre
2022-02-27 13:08:36 UTC+1, Saksham:
>
> CC=gcc-7 CXX=g++ FC=gfortran-7 ./configure

What do the following give?
```
$ which gcc-7
$ which g++
$ which gfortran-7
$ gcc-7 --version
$ g++ --version
$ gfortran-7 --version
```

-- 
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/35d3e4b6-7a6d-4bc1-b67e-78ef7a50a88en%40googlegroups.com.


[sage-support] Re: Compiling Sage 9.5 on M1 Max Macbook Pro

2022-02-22 Thread slelievre
You could try with dependencies from Conda:

https://wiki.sagemath.org/Conda

-- 
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/49268074-afec-4a88-a48f-4771d00ab690n%40googlegroups.com.


[sage-support] Re: Sage Crash Report. -- help please !

2022-02-16 Thread slelievre
2022-02-16, 02:43:20 UTC, Bharathwaj Palvannan:

> I had already sent a crash report some weeks ago
> but I received no response.

This question of yours from 2017 was not answered:

  https://groups.google.com/g/sage-support/c/0dgWgFGxYQU

(hopefully you managed to solve that problem since then?)
but for your recent crash report there were two responses:

https://groups.google.com/g/sage-support/c/BadgRDXNSbY 

To install Sage on your Mac, I suggest using the
"sagemath-forge" Conda distribution, following
the steps described here:

https://groups.google.com/g/sage-devel/c/NiP5jIfHusI/m/JDODj8lfAgAJ

-- 
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/a57c5f3c-5197-4bcf-aad2-431bd9acd77bn%40googlegroups.com.


Re: [sage-support] Re: No module named extern error

2022-02-12 Thread slelievre


Le samedi 12 février 2022 à 11:36:49 UTC+1, W D Joyner:

>
> Also, you can use the version command: 
>
> sage: version() 
> 'SageMath version 9.3.rc0, Release Date: 2021-03-23' 
>


Or to also get the Python version:
```
sage: print('{}, Python {}.{}.{}'.format(version(), *sys.version_info[:3]))
SageMath version 9.6.beta0, Release Date: 2022-02-06, Python 3.9.10
```

More elaborate command for more concise output:
```
sage: print("SageMath {}, released {}. Python {}.{}.{}."
:   .format(sage.version.version, sage.version.date, 
*sys.version_info[:3]))
SageMath 9.6.beta0, released 2022-02-06. Python 3.9.10.
```

-- 
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/ff11d2b6-afd0-4e34-9d7e-8dc9e4ee927dn%40googlegroups.com.


[sage-support] Re: No module named extern error

2022-02-12 Thread slelievre
What SageMath versions do you have at home and at work?
To get the version information, print the Sage banner:

sage: sage.misc.banner.SAGE_BANNER = ''
sage: banner()

-- 
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/be175aab-15be-4c5e-a671-dd1f3298563dn%40googlegroups.com.


[sage-support] Re: type problem, I think

2022-02-11 Thread slelievre
Please provide complete code to reproduce. The following works for me.
```
sage: x = vector((4.00810430656697, 19.9617665490168, -4.87852077236756))
sage: f(s) = x[0] * s^0 + x[1] * s^1 + x[2] * s^2
sage: plot(f(s), (s, 0, 2))
Launched png viewer for Graphics object consisting of 1 graphics primitive
```

-- 
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/4481387c-d04e-4f2e-a7c1-c9834fe5d84an%40googlegroups.com.


Re: [sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-02-09 Thread slelievre
Pull request to fix Sage interacts on the CoCalc side:

- https://github.com/sagemathinc/cocalc/pull/5721

-- 
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/5b4f00e2-69c1-4c84-8e14-413643caafd6n%40googlegroups.com.


Re: [sage-support] Re: Inter-versions reproducibility problem of random elements.

2022-02-06 Thread slelievre
The `random_element` method of `AA` was changed in

https://trac.sagemath.org/ticket/30875

merged in Sage 9.5.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/0bf84e97-568d-4c72-b884-71c9b0f89e18n%40googlegroups.com.


Re: [sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-06 Thread slelievre
The `random_element` method of `AA` was changed in

https://trac.sagemath.org/ticket/30875

-- 
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/13618d15-05a6-473f-a86e-ba4ad04653d7n%40googlegroups.com.


Re: [sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-02-01 Thread slelievre
2022-02-01 15:13:27 UTC, Marc Culler:
>
> Thanks. And I can reproduce this. I see the error shown below
> in the Firefox Console. (I include it here in case anyone might
> recognize it).


There's an FAQ entry here

https://github.com/Wuliyuanulb/ComponentSDKDoc/blob/bfe53cf2162f62134356b58d7eae07e367044602/_build/_sources/faq.md.txt

that reads

> In browser F12 window, there is `Couldn't process kernel message`
> error in Console log. WrappedError message will be like:
> ```
> Error: Class jupyter.widget not found in registry at http://xxx
> ```
> This is because ipywidgets not correctly enabled in jupyter extension
> when using pip to install. Reinstall using conda will solve this issue.
> See [more details 
here](https://ipywidgets.readthedocs.io/en/latest/user_install.html).
> ```
> conda install -c conda-forge ipywidgets
> ```

And here are some more related discussions,
hoping there's something relevant to dig from them.

https://github.com/Caltech-IPAC/firefly_widgets/issues/6
https://github.com/InsightSoftwareConsortium/itkwidgets/issues/207
https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1319
https://github.com/jupyter-widgets/ipywidgets/issues/2569
https://github.com/jupyter-widgets/ipywidgets/issues/377
https://github.com/jupyterlab/jupyterlab/issues/4398
https://github.com/maartenbreddels/ipyvolume/issues/36
https://github.com/OpenGeoscience/geonotebook/pull/51
https://github.com/twosigma/beakerx/issues/6582

Found by searching using this request

https://github.com/search?q=Class+jupyter.widget+not+found+in+registry=issues

Not sure that helps at all, sorry.  --Samuel

-- 
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/4f768286-2bfc-4606-89a7-da6747682fe9n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-19 Thread slelievre
2022-01-17 02:39:56 UTC, Kwankyu:
>
> After blizzard is gone,
>
> from sage.plot.plot3d.shapes import *
> P = Graphics()
> P += Sphere(.5, color='white')
> P += Sphere(1, color='white').translate(0,0,-1.2)
> P += Sphere(1.5, color='white').translate(0,0,-2.5)
> P += Sphere(.1, color='white').translate(.45,-.1,.15) + Sphere(.05, 
color='black').translate(.51,-.1,.17)
> P += Sphere(.1, color='white').translate(.45, .1,.15) + Sphere(.05, 
color='black').translate(.51, .1,.17)
> P += Cone(.1,.5, color='orange').rotateX(0).rotateY(-pi/2).translate(.3, 
0, 0)
> P.show()
>
> Exercise: add arms to the snowman.

Nice one. Here's my snowie (also missing arms).

from sage.plot.plot3d.shapes import Cone, Sphere

r_bot = 3
r_mid = 2.25
r_top = 1.75

z_bot = r_bot
z_mid = z_bot + r_bot + 1/2 * r_mid
z_top = z_mid + r_mid + 1/2 * r_top

# scale factors to shrink spheres along one axis

s_body = 3/4  # vertical scale for body
s_btns = 1/4  # horizontal scale for buttons
s_eyes = 3/4  # horizontal scale for eyes

z_bot_s = s_body * z_bot
z_mid_s = s_body * z_mid
z_top_s = s_body * z_top

nose_length = 3/2*r_top

r_button = 1/4
r_nose = 1/4
r_eye = 1/8

body_color = 'white'
button_color = 'red'
eye_color = 'black'
nose_color = 'orange'

body_bot = sphere((0, 0, z_bot), r_bot, color=body_color)
body_mid = sphere((0, 0, z_mid), r_mid, color=body_color)
body_top = sphere((0, 0, z_top), r_top, color=body_color)
body = (body_bot + body_mid + body_top).scale(1, 1, s_body)

button = Sphere(r_button, color=button_color).scale(s_btns, 1, 1)
button_bot = button.translate(r_bot, 0, z_bot_s)
button_mid = button.translate(r_mid, 0, z_mid_s)
buttons = button_bot + button_mid

eye_angle = pi/10
eye = Sphere(r_eye, color=eye_color).scale(s_eyes, 1, 1)
eye = eye.translate((r_top, 0, z_top_s))
eyes = sum(eye.rotateZ(t) for t in (-eye_angle, eye_angle))

nose = Cone(r_nose, nose_length, color=nose_color)
nose = nose.rotateY(-9/8*pi/2).translate(0, 0, z_top_s)

parts = [body, buttons, eyes, nose]
snowie = sum(parts)
snowie.show(frame=False)

-- 
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/8778147b-20f5-4681-ab97-e44dd80dca58n%40googlegroups.com.


Re: [sage-support] Problem in running SageMath application

2022-01-15 Thread slelievre
2022-01-15 09:05:10 UTC, Dima Pasechnik:
>
> what is "Gilbert Source"?

I would bet some auto-respelling software thought
that was a nice way to reinterpret "GitHub releases"
to make the conversation interesting.  --Samuel

-- 
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/996f0804-1343-4043-a5bd-e5000c0979cdn%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-14 Thread slelievre
2022-01-14, iva:
>
> Does anyone know how to draw a snowman?
> [...] picture how snowman has to look like...
> I started drawing with a Sphere, but I can't get it
> like in the picture. 

Hi Iva!  What a nice seasonal project, and a good way
to learn some Sage while making something fun!

For inspiration, see this head with eyeballs and a hat
in Sage's 3D plotting shapes documentation:

  
https://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/shapes.html

Feel free to ask again if you need more help!  --Samuel

-- 
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/d435faca-9660-4bf9-a960-44d4938f7db1n%40googlegroups.com.


Re: [sage-support] something seems wrong here

2022-01-02 Thread slelievre
2022-01-02 00:00:56 UTC, Michael Beeson on sage-devel:

> sage: d = 6
> sage: p = d/2
> sage: p
> 3
> sage: is_prime(p)
> False  #  Huh?!!  
> sage: is_prime(3)
> True
> sage: p==3
> True
>
> This happens in version 8.7  and also in the current version (installed 
yesterday)

William Stein answered:

> The parent of p is QQ (the rational field).
> p is not a prime number of the **rational field**.
> You should coerce p to ZZ first.

To change `p` to an integer before testing whether it is prime:

```
sage: d = 6
sage: parent(d)
Integer Ring

sage: p = d/2
sage: parent(p)
Rational Field

sage: p = ZZ(p)
sage: is_prime(p)
True
```

Or, to take quotients in the integers from the start, use

```
sage: d = 6
sage: p = d // 2
sage: parent(p)
Integer Ring
sage: is_prime(p)
True
```

The behaviour of `is_prime` for field elements is the object of

- Sage Trac ticket #17919
  Disallow is_prime() for FieldElement
  https://trac.sagemath.org/ticket/17919

- Sage Trac ticket #32321
  Make is_prime() return true for rational numbers that are prime as 
integers
  https://trac.sagemath.org/ticket/32321

See also:

- Sage Trac ticket #32340
  Document behavior of .is_prime() for number fields
  https://trac.sagemath.org/ticket/32340

- Sage Trac tickets whose summary contains is_prime
  https://trac.sagemath.org/query?order=id=1=~is_prime

-- 
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/74b4969e-5fd1-4612-9b2b-6a89d95cd1c2n%40googlegroups.com.


[sage-support] Re: regulator

2021-12-27 Thread slelievre
See also

- Ask Sage question 60455: compute regulator with more precision
  https://ask.sagemath.org/question/60455

-- 
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/9e96676d-5173-45ac-9cf5-30fb916f4258n%40googlegroups.com.


[sage-support] Re: Problem installing sage on Ubuntu.

2021-12-25 Thread slelievre
Hi Maarten,

Binaries for Sage 9.3 and Sage 9.4 were prepared taking
advantage of too modern instruction sets not available
on older processors, so they only work with recent cpus.
The upcoming Sage 9.5 should work for everyone.

In the meantime, workarounds include

- build from source
- install via Conda
- build from source using prerequisites from Conda
- use Docker
- use SageCell
- use CoCalc

Good luck with your preferred solution.   --Samuel

-- 
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/f6ea979b-3478-42df-93df-471790755975n%40googlegroups.com.


[sage-support] Re: Bug in integrals

2021-12-17 Thread slelievre
2021-12-17, Juan Luis Varona:
>
> Thanks!
>
> It is clear that it is a bug provided by Maxima.
> I have checked already in the developer trac
> the already known Maxima bugs in integrals
> and I have not found similar errors, so I have
> opened a ticket.
>
> Juan Luis

Thanks for opening a ticket about this at

- Sage Trac ticket 33034:
  Make sure integral(f(x) - f(x).expand(), (x, 0, 2*pi)) is zero
  https://trac.sagemath.org/ticket/33034
 
Hope this can get reported upstream and fixed.

-- 
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/45a52cce-1ea2-4c13-9397-23561195a0c1n%40googlegroups.com.


Re: [sage-support] Sage 9.4 installation problem on windows 10

2021-12-10 Thread slelievre
2021-12-10 19:42:32 UTC+1, mrde...@com:

> I just installed sage on win 10. I can second that there's 
>
something perhaps not intended going on. First, i'm new to sage. 
>
> I have three shortcuts that got included in my start menu
>
after installation of sage (sage 9.3/ a shell/ a notebook).
>
None of them brings up any prompt (as i see in the guides)
>
where i can input 2+2 to get 4. Infact, when i try to start sage
>
notebook,  the task manager shows that win defender gets
>
active and then the program vanishes. Is it getting killed by
>
windows? Or am i making some nooby mistake? In connection
>
to OP's post, i get shown no error messages.
>
> It'd be very helpful if someone can kindly confirm the scenario.
>

I would suggest to visit Windows Defender settings
and declare Sage as safe there. Then start Sage again.

Or uninstall Sage, reinstall it, adjust Windows Defender
settings to declare Sage as safe, then start Sage.

Hope this works for you.   --Samuel
 

-- 
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/234912d7-2263-4e4f-82ec-febc91fc716bn%40googlegroups.com.


[sage-support] Re: LatexExpr

2021-11-29 Thread slelievre
2021-11-29 18:05:58 UTC+1, Cyrille Piatecki:
>
> I often use LatexExpr(r'\text{blabla} x_i =') encapsulated
> in show(). It's very easy to use but not if I need single quotes
> as in "it's". Is there a way to escape the quotes?

LatexExpr(r"\text{there's a way} x_i =")

-- 
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/a54bf1d7-d9e8-42bf-867f-be2f577bdab0n%40googlegroups.com.


Re: [sage-support] I'm confused with symbolic fractions

2021-11-26 Thread slelievre
Or use polynomial variables rather than symbolic variables.

```
sage: R. = PolynomialRing(QQ)
sage: f = 1/(a-b) + 2/(b-c) + 3/(c-a)
sage: f
(-2*a^2 + 4*a*b - 3*b^2 + 2*b*c - c^2)/(-a^2*b + a*b^2 + a^2*c - b^2*c - 
a*c^2 + b*c^2)
sage: g = f*(a-b)*(b-c)*(c-a)
sage: g
-2*a^2 + 4*a*b - 3*b^2 + 2*b*c - c^2
sage: f.numerator()
-2*a^2 + 4*a*b - 3*b^2 + 2*b*c - c^2
```

-- 
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/25c0a3b5-8df3-40af-a056-20c9dd997007n%40googlegroups.com.


Re: [sage-support] Problem with simplify_hypergeometric().

2021-11-26 Thread slelievre
Possibly related:

- Sage Trac ticket 31890
  simplify_hypergeometric is unstable
  https://trac.sagemath.org/ticket/31890

-- 
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/ea264550-10b3-4c6e-9352-5c1fc2707a56n%40googlegroups.com.


[sage-support] Re: subs

2021-11-23 Thread slelievre
2021-11-23 19:42:12 UTC, Juan Luis Varona:
>
> In the expression (5^x)^2-7*5^x+4, I want to substitute x^5 by t.
>
> With sagemath 7.2 (or another old versions), I can do
> ((5^x)^2-7*5^x+4).subs(5^x==t)
> and I get t^2 - 5*t + 4
>
> But sagemath 9.4 does not change the first 5^x and he gives
> 5^(2*x) - 7*t + 4
>
> Why?
>
> (In both cases, var("t") has been previously used)
>
> Yours,
> Juan Luis Varona

In recent versions of Sage, defining:
```
sage: t, x = SR.var('t, x')
sage: a = (5^x)^2-7*5^x+4
```
automatically groups exponents and gives:
```
sage: a
5^(2*x) - 7*5^x + 4
```
in which `5^x` is only seen once as such (old versions
of Sage possibly did not group exponents, thus keeping
two visible occurrences of `5^x` in the resulting `a`).

This means that only one `5^x` gets replaced
by `t` when we do the following substitution:
```
sage: aa = a.subs(5^x == t)
sage: aa
5^(2*x) - 7*t + 4
```

To work around this, we can instead think of
rewriting `x` as `log(t, 5)` as in the following
substitution, which gives the expected result:
```
sage: ab = a.subs(x == log(t, 5))
sage: ab
t^2 - 7*t + 4
```

Now we have a polynomial expression in t and
we can use corresponding tools.--Samuel

-- 
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/7c160408-2c14-43c0-a22d-8fd01dbd3ec4n%40googlegroups.com.


Re: [sage-support] import

2021-09-26 Thread slelievre
A web search for [ import ipynb ]

  https://duckduckgo.com/?q=import+ipynb 

also reveals tools such as ipynb and import-ipynb,
which can be pip-installed.  --Samuel

-- 
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/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com.


[sage-support] Re: Installing Package in Systemwise Sagemath

2021-08-23 Thread slelievre

Le lundi 23 août 2021 à 15:00:49 UTC+2, egourg...:

> Le dimanche 22 août 2021 à 15:49:28 UTC+2, asd00012...:
>
>>
>> I installed Sagemath for the entire system using ``sudo apt-get install 
>> sagemath'' on my Ubuntu machine. When I tried to do something like ``sage 
>> -i kohel_database,'' it told me that it is an unknown option. As searched 
>> from the ASKSAGE etc., there's no such options within the apt installed 
>> version. So is there alternatives to install packages for this kind of 
>> sagemath environment? Or we need to start over and build a fresh local 
>> sagemath environment from scratch?
>>
>
> Unfortunately, the last option is the only way out here. So please 
> download one of the binary builds available at 
> https://www.sagemath.org/download-linux.html. The bonus is that you'll 
> get a version of SageMath newer than the system one.
>

The option you describe is less severe than building from scratch,
it only amounts to downloading a binary release for Ubuntu 20.04.

So really there are at least two options available here:

- download a binary for Ubuntu 20.04 (as suggested above)
  https://www.sagemath.org/download-linux.html

- build from source
  https://doc.sagemath.org/html/en/installation/source.html

Building from source takes some time, but is much faster
than it once was, at least if you install all recommended
prerequisite packages from your system distribution.

-- 
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/fc5026c5-ad56-4cd6-baf3-96e5aa048785n%40googlegroups.com.


[sage-support] Re: parametric_plot

2021-07-31 Thread slelievre
I was wrong! The functionality exists!

Good thing you asked the question again as

- Ask Sage question 58169
  Change the view box on a 3D graph
  https://ask.sagemath.org/question/58169

and Frédéric Chapoton answered it there,
pointing to the `add_condition` method!

Remember to accept his answer to mark your
question as solved in the list of questions.

Please ignore my previous previous post and
the less than satisfactory approach in it. 


-- 
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/158b06dc-b525-4c80-8d1c-063a3db6a4bdn%40googlegroups.com.


[sage-support] Re: parametric_plot

2021-07-29 Thread slelievre
So far, limiting the z range in 3D plots from plot3d,
parametric_plot or parametric_plot3d is missing.

Providing this feature is tracked at

- Sage Trac ticket 31264
  Allow setting zmin, zmax in plot3d and other 3d plots
  https://trac.sagemath.org/ticket/31264

Using implicit_plot3d can be a workaround,
given an equation for the surface ...which is easy
in the case of plot3d but usually not in the case
of parametric_plot3d.

To limit the x, y and z ranges in a parametric plot,
we can alternatively use auxiliary functions which
return their computed value when it is within bounds,
and return "not a number" otherwise.

Here is a way to do that for the plot in the question.
We use cached functions to save computation time.

```
z = SR.var('z')
E = EllipticCurve(QQ, [0, 0, 0, -1/4, 0])
wp = E.weierstrass_p().laurent_polynomial()
wpp = derivative(wp, z)

nan = float('nan')

@cached_function
def wpuv(u, v):
return wp(u + i*v)

@cached_function
def xuv(u, v):
return wpuv(u, v).real()

@cached_function
def yuv(u, v):
return wpuv(u, v).imag()

@cached_function
def zuv(u, v):
return wpp(u + i*v).imag()

xmin, xmax = -1, 1
ymin, ymax = -1, 1
zmin, zmax = -1, 1

@cached_function
def xok(u, v):
return xmin < xuv(u, v) < xmax

@cached_function
def yok(u, v):
return ymin < yuv(u, v) < ymax

@cached_function
def zok(u, v):
return zmin < zuv(u, v) < zmax

@cached_function
def xyzok(u, v):
return xok(u, v) and yok(u, v) and zok(u, v)

@cached_function
def xxuv(u, v):
return xuv(u, v) if xyzok(u, v) else nan

@cached_function
def yyuv(u, v):
return yuv(u, v) if xyzok(u, v) else nan

@cached_function
def zzuv(u, v):
return zuv(u, v) if xyzok(u, v) else nan

uu = (1e-3, 3.74)
vv = (1e-3, 3.74)

pp = parametric_plot3d

pp([xxuv, yyuv, zzuv], uu, vv)
```

That's already an interesting view.

To refine it, check which values of (u, v) give (x, y, z) within bounds:

```
good_uv_x = region_plot(xok, uu, vv)
good_uv_y = region_plot(yok, uu, vv)
good_uv_z = region_plot(zok, uu, vv)
good_uv_xyz = region_plot(xyzok, uu, vv)
good_uv = [good_uv_x, good_uv_y, good_uv_z, good_uv_xyz]

graphics_array(good_uv, ncols=2)
```

This reveals that values of u and v beyond 3.2 are not so useful.

Use a reduced range for u and v, and increase the number of plot points:

```
uu = (RDF(1e-3), RDF(3.2))
vv = (RDF(1e-3), RDF(3.2))
pp([xxuv, yyuv, zzuv], uu, vv, plot_points=129)
```

-- 
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/11bc75df-cbc3-4e5e-b79e-13ed67b690f9n%40googlegroups.com.


[sage-support] Re: Show() not working

2021-07-28 Thread slelievre
This got broken in Sage 9.3 but is fixed by

Sage Trac ticket 31629
Fix a regression in show(obj) for string obj
https://trac.sagemath.org/ticket/31629

It will be part of Sage 9.4, which has entered
the release candidate phase, and so is coming soon.

-- 
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/9e23165d-1a1e-4e83-a217-ee95977daf38n%40googlegroups.com.


[sage-support] Re: sage-9.3 and sage from github both fail to compile

2021-07-15 Thread slelievre
2021-07-14 19:23:24 UTC:
>
> Both sage-9.3 and sage from github both fail to compile on Fedora 34 [= 
up-to-date].
> The error message seems to indicate that whatever is wrong can easily be
> fixed, but I do not know how to do it.  Here is the error message:
>
> [gfortran-9.2.0] cp ../../src/gcc/gcc-ar.c gcc-nm.c
> [gfortran-9.2.0] make[7]: cp: Permission denied
> [gfortran-9.2.0] make[7]: *** [Makefile:2139: gcc-nm.c] Error 127
> [gfortran-9.2.0] make[6]: *** [Makefile:4300: all-gcc] Error 2
> [gfortran-9.2.0] make[5]: *** [Makefile:937: all] Error 2

See this ticket:
https://trac.sagemath.org/ticket/31786

-- 
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/baf687e4-b1e0-4ead-a90a-13f6a2c2f6a0n%40googlegroups.com.


[sage-support] Re: after upgrade to 9.3, SignalError: Illegal instruction

2021-07-02 Thread slelievre
2021-07-02 03:49:48 UTC+2, share the sage:
>
> Hi there!
>
> I've upgraded to Linux Mint 20.1 Ulyssa (kernel 5.4.0-77-generic),
> and then I've build Sage 9.3 from source.
>
> Now the issue is solved. Thanks for this amazing software!

Thanks for the news and your detailed report.

> I downloaded sources tarball for sage 9.3 via torrent. Then, before
> proceeding, I studied README.md and source.rst from the tarball
> (sage-9.3/README.md and sage-9.3/src/doc/en/installation/source.rst)
>
> I installed all the required and recommended packages for Linux Mint
> (Debian, Ubuntu) pointed at source.rst (link to debian.txt was broken
> at README.md) I took the advice to set export MAKE='make -j2'
> as I have two cores.

The broken link is fixed in Sage Trac ticket 31909
https://trac.sagemath.org/ticket/31909
which was merged in Sage 9.4.beta4.

> [dochtml] Done building the documentation!
> make --no-print-directory 'SAGE_ROOT/local/etc/sage-started.txt'
> "SAGE_ROOT/build/bin/sage-starts"
>
> Testing that Sage starts...
> [2021-06-30 21:50:55] SageMath version 9.3, Release Date: 2021-05-09
> Yes, Sage starts.
> make[2]: Leaving directory 'SAGE_ROOT/build/make'
>
> real223m53,530s  == 3 hours 40 minutes!!
> user459m24,031s
> sys17m32,635s
> Sage build/upgrade complete!
>
> And then I ran parallel testing:
>
> sage -t --long --random-seed=0 src/sage/tests/parigp.py
> [13 tests, 1166.50 s]
> --
> All tests passed!
> --
> Total time for all tests: 12934.5 seconds  == 3 hours 35 minutes!!
> cpu time: 39406.1 seconds
> cumulative wall time: 47546.7 seconds
>
> So, happy! ^_^
>
> Thank you again!
> Share_The_Sage!

Wonderful. happy Sage usage!   --Samuel

-- 
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/9a4c43ed-7070-4736-ab6f-8ce4771b8b47n%40googlegroups.com.


[sage-support] Re: Arithmetic in Jacobians of Hyperelliptic Curves

2021-06-22 Thread slelievre
For reference the ticket is

- Incorrect Arithmetic on Jacobians of Hyperelliptic Curves
  https://trac.sagemath.org/ticket/32024

-- 
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/777974c6-11be-472e-9415-5fc46bb2f5d9n%40googlegroups.com.


[sage-support] Re: having trouble entering multiline code

2021-06-10 Thread slelievre
2021-03-22, John Cremona:
>
> I have the problem reported here -- but apparently solved in ipython
> 7.1.1, but I am using sage-9.2 with ipython 7.13.0 (as reported by
> "sage -ipython").
> 
https://stackoverflow.com/questions/52947493/ipython-how-to-continue-code-on-the-next-line
>
> I start entering a loop like this
>
> sage: for n in [1..10]:
> : m=2*n
>
> where ipython automatically enters the continuation ":" and
> indentation, but after hitting return the second time, immediately
> after the n in the second line, it evaluates what I have entered so
> far (uselessly) and gives me a new Sage prompt.
>
> I know that this seems to be an ipython issue, but there is no problem
> if I use sage -ipython directly (using range() instead of [..]) *and*
> no problem in Sage if instead I do "for n in range(10):" in the first
> line. So this seems to be being caused by whatever Sage does to
> convert [1..10] into python.

Confirmed here. Now tracked at:

- Sage Trac ticket 31951
  Fix `..` ellipsis interference with REPL multiline input
  https://trac.sagemath.org/ticket/31951

-- 
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/d7083594-a0aa-49e9-86bf-84e8d279n%40googlegroups.com.


[sage-support] Re: still problems again installing Sage9.2

2021-06-08 Thread slelievre
P.S. The instructions helped Anita get kbmag working.
They also helped someone install PyNormaliz, see
https://groups.google.com/g/sage-support/c/oQhyxt7Tggc/m/y8eS0W3NAQAJ

-- 
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/969025c1-6627-4cf3-a8f9-d9010728bc0fn%40googlegroups.com.


[sage-support] Re: Matrix multiplication by symbolic vector

2021-06-06 Thread slelievre
Don't feel stupid, but learn from your mistakes.
Go beyond "this works / this doesn't work":

> [c[i] for i in range(0..2)] <-- this doesn't work

Read error messages, they contain useful information.
```
sage: [c[i] for i in range(0..2)]
---
TypeError Traceback (most recent call last)
 in 
> 1 [c[i] for i in range(ellipsis_iter(Integer(0),Ellipsis,Integer(2)))]

TypeError: 'generator' object cannot be interpreted as an integer
```
Here, you can see that
- `range(0..2)` was preparsed as
  `range(ellipsis_iter(Integer(0),Ellipsis,Integer(2)))`,
- we get a type error because something (here: range)
  expected an integer and got something else
This gives a clue of what went wrong: range wants
integer arguments: range(2), range(1, 3);  but not
range of an ellipsis iteration like `0 .. 2`.

Now, about the proposed code after fixing this range mistake.

After defining:
```
sage: R = PolynomialRing(RR, 'c', 20)
sage: c = R.gens()
sage: c = vector([c[i] for i in (0 .. 2)])
sage: Z1 = matrix([[1, 2], [3, 4]])*vector([c[1], c[2]])
```
we have:
```
sage: Z1
(c1 + 2.00*c2, 3.00*c1 + 4.00*c2)
sage: Z1[0]
c1 + 2.00*c2
```

This `Z1[0]` is a polynomial, not a symbolic expression:
```
sage: parent(Z1[0])
Multivariate Polynomial Ring in c0, c1, c2, ..., c18, c19
over Real Field with 53 bits of precision
```

So `== 0` tests whether it is zero:
```
sage: Z1[0] == 0
False
```
and does not give a symbolic equation.

To get an equation, convert `Z1[0]` to the symbolic ring:
```
sage: SR(Z1[0]) == 0
1.00*c1 + 2.00*c2 == 0
```

To use `solve`, both the equation and the variable
must be in the symbolic ring.

Converting polynomial variables over the floating-point reals `RR`
to symbolic variables is a little more tricky:
```
sage: SR(c[1])
1.00*c1
sage: SR(c[1]).variables()[0]
c1
```

>From there:
```
sage: solve(SR(Z1[0]) == 0, SR(c[1]).variables()[0])
[c1 == -2*c2]
```

Working over the integers or the rationals simplifies things a bit:
```
sage: R = PolynomialRing(QQ, 'c', 20)
sage: c = vector(R.gens())
sage: c[1:3]
(c1, c2)
sage: Z1 = matrix([[1, 2], [3, 4]])*c[1:3]
sage: Z1
(c1 + 2*c2, 3*c1 + 4*c2)
sage: Z1[0]
c1 + 2*c2
sage: SR(Z1[0])
c1 + 2*c2
sage: SR(c[1])
c1
sage: solve(SR(Z1[0]) == 0, SR(c[1]))
[c1 == -2*c2]
```

Note that for equations of the form `== 0`,
you can skip the `== 0` when calling `solve`,
feeding it only the left hand side:
```
sage: solve(SR(Z1[0]), SR(c[1]))
[c1 == -2*c2]
```

-- 
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/ef4c405c-7160-41fa-96c0-522fcde7cfa4n%40googlegroups.com.


[sage-support] Re: Matrix multiplication by symbolic vector

2021-06-06 Thread slelievre
2021-06-06 10:47:24 UTC+2, Cyrille Piatecki:
>
> [c[i] for i in range(0..2)] <-- this doesn't work

You are mixing two different options:

- range:
  [c[i] for i in range(2)]
  [c[i] for i in range(0, 2)]

- ellipsis:
  [c[i] for i in (0 .. 2)]

-- 
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/099cbcb7-2455-4b4c-982e-7214c6fa507fn%40googlegroups.com.


[sage-support] Re: Unable to install SageMath successfully

2021-06-05 Thread slelievre
In a terminal, run the following commands:
```
$ xattr -cr /Applications/SageMath
```
This will clear the extended attributes of
all the files in /Applications/SageMath
and hopefully that will allow you to run it
without Apple's Gatekeeper interfering.

-- 
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/d63c13d2-b386-42df-a9fa-7446fee12f68n%40googlegroups.com.


[sage-support] Re: still problems again installing Sage9.2

2021-05-31 Thread slelievre
The Sage shipped by the SageMath macOS app
can run Sage and install many extra packages,
but does not ship build tools that are necessary
for installing certain extra packages.

So you might want to install a fuller Sage.

Some suggested steps follow. Lines that start
with a dollar sign and space are commands to run
in a terminal (without the initial dollar sign).

A.  Visit the SageMath macOS download page:
https://www.sagemath.org/download-mac.html

B.  Select a mirror close to you

C.  Click "intel"

D.  Get the latest version for your system,
for instance if you have macOS 11, get:
`sage-9.3-OSX_11.2.3-x86_64.tar.bz2`

E.  Move the dowloaded `.tar.bz2` file to the location
of your choice, for instance `/Applications`

F.  Extract it, either by a double click or with
```
$ cd /Applications
$ tar xf sage-9.3-OSX_11.2.3-x86_64.tar.bz2
```
and get a folder called SageMath.

G.  Clear any extended attributes macOS might
have put on the files in that folder with
```
$ xattr -cr /Applications/SageMath
```

H.  Create a symlink to the Sage executable,
placing it somewhere in your path, for example:
```
$ ln -sf /Applications/SageMath/sage /usr/local/bin
```
If there is a permission problem, use sudo:
```
$ sudo ln -sf /Applications/SageMath/sage /usr/local/bin
```
(enter your admin password for that Mac when prompted).
(Note that if the version without sudo failed, you can
avoid re-typing or copy-pasting the whole ln command:
use "up-arrow" to get the last command, hit Ctrl-A
to move to the start of the line, then type `sudo`,
hit Space, hit Enter.)

I.  Now you can start Sage from any location
```
$ which sage
/usr/local/bin/sage
$ ls -halF $(which sage)
...
$ sage --version
...
$ sage
...
```
Hit Ctrl-D, or type `quit` and hit Enter, to quit.

To launch Jupyter, you can run
```
$ sage -n jupyter
```

J.  Install any extra packages you like, e.g.
```
$ sage -i fricas
$ sage -i gap_packages
$ sage -i jupyterlab_widgets
$ sage --pip install RISE
$ sage --pip install jupytext
```

K.  To install extra GAP packages, e.g. `kbmag`,
one way is to use the GAP package `PackageManager`.

This can be done in GAP. Here we start Sage's GAP
and work there (don't forget the semicolons!):
```
$ sage --gap
...
gap> LoadPackage("PackageManager");
true
gap> InstallPackage("kbmag");
true
gap> LoadPackage("kbmag");
true
```
To quit GAP, either hit Ctrl-D or type `quit;` and hit Enter.

Or this can be done in Sage using `libgap`:
```
$ sage -q
sage: libgap.eval('LoadPackage("PackageManager")')
true
sage: libgap.eval('InstallPackage("kbmag")')
true
sage: libgap.eval('LoadPackage("kbmag")')
true
```

Note: kbmag is installed once and for all. Next time
you start GAP or Sage, you can directly load it.

L.  If you want to make the SageMath Jupyter kernel
available to a system-wide Jupyter installation:
```
$ ORIG=/Applications/SageMath/local/share/jupyter/kernels
$ DEST=~/Library/Jupyter/kernels
$ ln -sf $ORIG/sagemath $DEST
```

M.  If you want the ability to double-click `.ipynb` files
to open them, install nteract from
https://nteract.io/

Hope this helps. Let us know if you got things working.

-- 
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/f8b9c0b1-29fa-4896-bc15-803a2548c3e5n%40googlegroups.com.


Re: [sage-support] version 9.3 app.dmg

2021-05-25 Thread slelievre
2021-05-25 06:49:03 UTC, Dima Pasechnik:
>
> On Tue, 25 May 2021, 04:30 egunawan:
> >
> > There are files that end with app.dmg for previous
> > SageMath Mac OS X downloads. I don't see this option
> > for the 9.3 version. Is this intentional?
>
> Yes, it is. Sage's app became unmaintained and was
> removed. A tentative replacement may be found here:
>
> https://github.com/3-manifolds/Sage_macOS/releases/tag/v1.1-beta

This will get you Sage 9.3.rc4, almost identical to Sage 9.3.
The macOS app for the final Sage 9.3 should hopefully
be available in a week or so at:

   https://github.com/3-manifolds/Sage_macOS/releases/

-- 
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/62e72e9e-6268-4391-9fa8-09ff3a6b9e69n%40googlegroups.com.


[sage-support] Re: Trouble understanding `sage -optional` answer

2021-05-05 Thread slelievre
2021-05-04 17:04:10 UTC, Matthias Koeppe:
>
> On Tuesday, May 4, 2021 at 7:00:55 AM UTC-7 Emmanuel Charpentier:
> >
> > Trying to list the installed optional packages, I innocently typed :
> >
> > $ sage -optional | grep -v not_instal
> >
> > The answer left me stimyed :
> >
> > .../sage/misc/package.py:114: UserWarning: failed
> > to fetch the version of pkg='ore_algebra' at
> >  https://pypi.org/pypi/ore_algebra/json
> > warnings.warn("failed to fetch the version of pkg={!r} at 
{}".format(pkg, url))
>
> This, I understand as the impossibility of reaching the repository of 
ore-package.
>
> "sage-optional" uses PyPI to determine available versions of pip packages 
(see
> 
https://doc.sagemath.org/html/en/developer/packaging.html#package-source-types
> for the definition).
>
> The ore-algebra project, unfortunately, does not make proper releases;
> the Sage package is keyed to a particular commit in the project's github.
>
> [ ...]
>
> You can help by convincing the project maintainers to follow
> the best practices for Python packages: making releases and
> publishing them on PyPI.

I opened an issue for that on the ore_algebra issue tracker:

  https://github.com/mkauers/ore_algebra/issues/19

Please someone expand on concrete best practice instructions
or provide links to such instructions.


-- 
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/73de3dab-cf0a-41e9-9ba3-a742dac64087n%40googlegroups.com.


Re: [sage-support] NumberFieldEmbedding gets confused with relative number fields

2021-04-29 Thread slelievre
Samuel:
>
> Ilia:
> >
> > So I guess I will now try to open a ticket. 
>
> Sounds good. --Samuel

This is now tracked at

- Sage Trac ticket 31755
  NumberFieldEmbedding does not work with relative number fields
  https://trac.sagemath.org/ticket/31755

Thanks for opening the ticket! Hope this gets solved soon!

-- 
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/8048a55a-2ef6-44ab-aee7-34d2d5053dcfn%40googlegroups.com.


[sage-support] Re: Error while installing sage

2021-04-25 Thread slelievre
Ubuntu 18.04 is from April 2018, and installing SageMath
with "apt-get install" you get the version of SageMath
packaged at the time: SageMath 8.1, released 2017-12.

Sage has made tremendous progress since 8.1,
including moving to Python 3 (instead of Python 2
which has now reached end of support).

I would recommend installing SageMath 9.2 or later.
This can be done using one of the following methods:

- download a binary for Ubuntu 18.04 from
  https://www.sagemath.org/download-linux.html
  
- install with Conda
  https://doc.sagemath.org/html/en/installation/conda.html

- build from source
  https://doc.sagemath.org/html/en/installation/source.html

- Use Docker or Podman
  (can someone point to a relevant webpage?)

Please ask any follow-up question here.   --Samuel

-- 
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/a0aed4cf-d049-4a57-8539-10a18b72bbebn%40googlegroups.com.


[sage-support] Re: NumberFieldEmbedding gets confused with relative number fields

2021-04-23 Thread slelievre

2021-03-22 14:19:09 UTC, Ilia:
>
> When defining a NumberFieldEmbedding for a relative number
> field and then applying it to the field generator, I get a result
> which is different from the specified generator image:

sage: from sage.rings.number_field.number_field_morphisms import 
NumberFieldEmbedding
sage: K. = QuadraticField(2, embedding=1.414)
sage: L. = K.extension(x^3 + (sqrt2/2 + 1/3)*x^2 + (2*sqrt2/5+3/7)*x - 1)
sage: my_embedding = NumberFieldEmbedding(L, QQbar, 
L.relative_polynomial().roots(QQbar)[0][0])
sage: my_embedding
Generic morphism:
From: Number Field in s with defining polynomial x^3 + (1/2*sqrt2 + 
1/3)*x^2 + (2/5*sqrt2 + 3/7)*x - 1 over its base field
To: Algebraic Field
Defn: s -> 0.5407496381556470?
sage: my_embedding.gen_image()
0.5407496381556470?
sage: my_embedding(L.gen())
0.01354690080260168?

> Of course, I would have expected the last two results
> to be equal. My configuration: SageMath version 9.1,
> running on Ubuntu 18.04.3 LTS (64-bit).
>
> This seems to stem from Sage somehow confusing the relative
> generator of L (over K) with the absolute generator of L (over QQ),
> even though I am not completely sure.
>
> Should I open a trac ticket for this?

Hi Ilia,

Could this have to do with one of the following existing tickets?

- Sage Trac ticket 22008
  complex_embedding on relative number fields is inconsistent with the base 
field
  https://trac.sagemath.org/ticket/22008

- Sage Trac ticket 17524
  polynomial for relative number field elements
  https://trac.sagemath.org/ticket/17524

Thanks for your report in any case.
Hope this can be solved.  --Samuel

-- 
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/7258f958-5102-493e-a574-b897dbfaf46an%40googlegroups.com.


Re: [sage-support] SageMath installation problem on macOS Catalina: _SSL module not fund

2021-03-30 Thread slelievre
Or try the new app that ships OpenSSL and Tcl/Tk
out of the box. It is currently in beta-testing; please
test and report whether installation was successful.

Sage-macOS
-  home: https://github.com/3-manifolds/Sage_macOS
- releases: https://github.com/3-manifolds/Sage_macOS/releases

-- 
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/e5b30bc3-a0e2-4240-9460-edc69442cfdfn%40googlegroups.com.


[sage-support] Re: direct product and direct sum of groups

2021-03-24 Thread slelievre
2021-03-24 14:53:06 UTC, Matt:

> How can I calculate the direct product of two groups and/or the direct sum?
> For example given:
>
> G.=FreeGroup()
> H=G.quotient([x*y])
>
> how do I calculate H+H and HxH?
>

Having defined `H`, you can type

H.

then hit the TAB key to see what methods are available.

This reveals the methods `cartesian_product`
and `direct_product`, are they what you need?

```
sage: G. = FreeGroup()
sage: H = G.quotient([x*y])

sage: H.cartesian_product(H)
The Cartesian product of
(Finitely presented group < x, y | x*y >,
 Finitely presented group < x, y | x*y >)

sage: H.direct_product(H)
Finitely presented group < a, b, c, d |
a*b, c*d, a^-1*c^-1*a*c, a^-1*d^-1*a*d,
b^-1*c^-1*b*c, b^-1*d^-1*b*d >
```

-- 
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/ec06a1f8-624a-4352-b968-ac451fa3847bn%40googlegroups.com.


[sage-support] Help requests for SageMath on Windows

2021-03-24 Thread slelievre
Two recent help requests for SageMath on Windows:

- It seems that the kernel has crashed
  https://ask.sagemath.org/question/56353

- How to load .sobj files into Jupyter Notebook
  https://ask.sagemath.org/question/56331

See also

https://ask.sagemath.org/questions/scope:all/sort:activity-desc/tags:windows/
https://ask.sagemath.org/questions/scope:all/sort:activity-desc/tags:windows7/
https://ask.sagemath.org/questions/scope:all/sort:activity-desc/tags:windows10/
https://ask.sagemath.org/questions/scope:all/sort:activity-desc/tags:sage-windows/

-- 
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/6fb6b2dd-f693-453d-8ad6-ce49d5b458bfn%40googlegroups.com.


[sage-support] Re: Is load() suddenly not working for loading files from repositories?

2021-03-23 Thread slelievre
Sadly network access from SageCell had to be removed following abuse.

See the discussion on the sage-cell mailing list:

  https://groups.google.com/g/sage-cell/c/ETeONQMYbQM

-- 
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/63fe7ea0-4bd2-4a4a-88dd-5f1cb125209cn%40googlegroups.com.


Re: [sage-support] Cannot launch SAGE on MacOS BigSur

2021-03-14 Thread slelievre
If you install Sage for macOS using the binaries from the
download pages of the SageMath website, make sure to
run the `fix_mac_sage` script from

https://github.com/3-manifolds/fix_mac_sage/

If you install via Conda, then to launch Jupyter or JupyerLab,
open a terminal, activate the desired Conda environment,
and run one of

jupyter notebook

or

jupyter lab

That's it.

-- 
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/05384e94-a27c-431b-b5f1-d1065e2bf2een%40googlegroups.com.


Re: [sage-support] Import error for lrcalc library

2021-02-04 Thread slelievre
This was reported to the Arch Linux forums:

https://bbs.archlinux.org/viewtopic.php?id=263214

-- 
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/ee417737-6ebf-43d7-a001-fcf4b426f7a2n%40googlegroups.com.


Re: [sage-support] “python3.8” cannot be opened because the developer cannot be verified.

2021-02-04 Thread slelievre
Also you can manually unquarantine SageMath
by running the appropriate command in a terminal.
```
$ THING='/Applications/SageMath'
$ xattr -rd com.apple.quarantine $THING
```

-- 
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/570c52f3-600e-4671-97dc-58a6716f86d6n%40googlegroups.com.


[sage-support] Re: Importing 3d models designed in CAD into Sage Math.

2021-01-15 Thread slelievre
2021-01-11 09:13:06 UTC, Krishna:
>
> I am Krishna from India. I recently began using SageMath.
> For purpose of FEM, I need to import 3d model into SageMath
> and mesh it and then find out the results. Can anyone tell me
> how to import 3d models into SageMath.
> [And I use SageMath on Linux bundled together with Anaconda,
> so I can use the packages from Conda.]
> Thanking You
> Krishna Sai

Hi Krishna. Can you provide a simple example of a 3d model
you want to import into SageMath. Is it an STL file?  --Samuel

-- 
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/0c3ecd96-79fc-4ce4-b1be-67fd835a1b6en%40googlegroups.com.


[sage-support] Re: I am trying to install sage on a MacBook w/Big Sur

2020-12-27 Thread slelievre
2020-12-27 01:00:42 UTC:
>
> SageMath version 9.2, Release Date: 2020-10-24
>
> Please wait while the Sage Jupyter Notebook server starts...
>
> The Jupyter notebook requires ssl, even if you do not use
> https. Install the openssl development packages in your system and
> then rebuild Python (sage -f python3).
>
> HELP! and THANKS!

Try using the "Fix mac Sage" script, which was recently adapted
to support Sage 9.2 based on Python 3.8.

- home: https://github.com/3-manifolds/fix_mac_sage
- download: https://github.com/3-manifolds/fix_mac_sage/releases/
 

-- 
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/578875c1-d7f8-4d46-b585-a6b378d0be14n%40googlegroups.com.


[sage-support] Re: i'm having trouble installing Jupyter - the log is below. I have open ssl. it it supposed to be installed or just files?

2020-12-26 Thread slelievre
Try using the "Fix mac Sage" script.

- home: https://github.com/3-manifolds/fix_mac_sage
- download: https://github.com/3-manifolds/fix_mac_sage/releases/

-- 
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/ca9d143d-c556-4136-87d4-593f87a55fd0n%40googlegroups.com.


Re: [sage-support] Re: Install of sage on macOS

2020-12-03 Thread slelievre
A ticket to track providing an app for macOS again:

- Provide macOS app again
  https://trac.sagemath.org/ticket/31000

-- 
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/c995b0fd-294b-4a38-9949-9d6487a9e022n%40googlegroups.com.


Re: [sage-support] Re: factorial

2020-11-29 Thread slelievre
2020-11-29 21:23:36 UTC, Guillermo:
>
> I wonder what would be wrong with replacing '!' → '.factorial()'

Interesting idea. Just be careful with `!=` of course.

-- 
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/7b1ec8ed-22c0-442d-be9c-332efb5c3022n%40googlegroups.com.


[sage-support] Re: packages

2020-11-13 Thread slelievre
This command will let you know what version of Sage is currently running:

sage: version()

You can use it in SageCell if you need to check what version of Sage
is installed there. You can use it on your own installation too.

-- 
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/fb650b3c-7abb-4f39-be01-5b70cfb9d4e2n%40googlegroups.com.


Re: [sage-support] Re: problem compiling sage-9.2.rc0 on big sur, xcode 12.01

2020-10-08 Thread slelievre
2020-10-08 17:38:08 UTC, David Joyner:
>
> I can log in but don't seem to have permission to add a comment to trac.

Your trac account was missing a name and an email.
I filled those in, can you try again?

-- 
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/5c02a45c-c79a-48c3-aa83-cf4b3620ff1bo%40googlegroups.com.


[sage-support] Re: Prebuilt 9.1 fails to start on Catalina with Python complaint

2020-10-08 Thread slelievre
Le jeudi 8 octobre 2020 17:40:58 UTC+2, Roger Lipsett a écrit :
>
> I just upgraded to Catalina and Sage now fails to start because
> Apple says that Python 3.7 is unverified. See below The Apple doc
> at https://support.apple.com/en-us/HT202491 is not helpful.

You need to unquarantine Sage.

The instructions there should help:

https://ask.sagemath.org/question/49572

-- 
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/de000a64-e6f4-4edd-94d7-a892e2b66595o%40googlegroups.com.


Re: [sage-support] Re: problem compiling sage-9.2.rc0 on big sur, xcode 12.01

2020-10-08 Thread slelievre
2020-10-07 21:09:18 UTC, John H Palmieri:
>
> including details of which homebrew packages you've installed.

To get your installed homebrew packages listed in a file:
```
$ brew list --versions > brew-list-versions.txt
```
Or to add the date to the filename:
```
$ brew list --versions > brew-list-versions-`date "+%Y-%m-%d"`.txt
```

-- 
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/a1ba0616-77e9-42a8-bbbf-64bb72511cc4o%40googlegroups.com.


Re: [sage-support] Re: integrating sin(t)/t

2020-09-30 Thread slelievre
2020 21:18:46 UTC, Karima Shahzad:
>
> Do you recommend Sage-9.2 for the users if they're working with Sage-9.1?

Preliminary release notes to help you decide:

  https://wiki.sagemath.org/ReleaseTours/sage-9.2

Personally I would recommend upgrading to the latest
development version, which has lots of improvements,
if you don't mind building it from source.
That's the version I use daily.

-- 
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/13b84461-f0a9-44dd-a5bf-7542eda04b4fo%40googlegroups.com.


[sage-support] Re: Unimodular transformation matrix of LLL algorithm

2020-09-27 Thread slelievre
Note: also asked on Ask Sage:

- Unimodular transformation matrix of LLL algorithm
  https://ask.sagemath.org/question/53618

-- 
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/b27dbdc8-a4db-4f08-9425-38cf01c9cb65o%40googlegroups.com.


Re: [sage-support] Triple integrals in a specific region of space

2020-09-13 Thread slelievre


Le dimanche 13 septembre 2020 12:30:09 UTC+2, Dima Pasechnik a écrit :
>
>
>
> On Sun, Sep 6, 2020 at 10:03 AM Teodoro Coluccio  > wrote:
>
>> Can I perform triple integrals in a region of space I define? I'm trying 
>> to migrate from mathematica to sage, and in mathematica I could go and 
>> define a region of space (with various limitations) and then perform the 
>> integral of a function on it. 
>
>
> in general, there are no exact algorithms known for such a task. 
> Mathematica does implement some heuristics, it's not clear which ones.
> In your example you're integrating a polynomial over a polytope, for this 
> case it's known how to do this exactly:
> triangulate the region into simplices, then use an explicit formula for 
> each simplex. Perhaps that's
> what Mathematica doing, they don't tell us.
> https://arxiv.org/abs/0809.2083
> Not implemented in Sage, but it would be a nice addition.
>  
>
>> Here is an explanatory image:
>> [image: screen.png]
>> Is there a way to easily perform this operation even in sage?
>>
>>
>>
Note: also asked on Ask Sage:

- Triple integrals in a specific region of space
  https://ask.sagemath.org/question/53419

I posted an answer there.

-- 
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/1304a60c-ea39-402a-a875-fed4437b5faao%40googlegroups.com.


Re: [sage-support] compiling fails with 'boost/preprocessor/cat.hpp' file not found

2020-09-04 Thread slelievre
I would also suggest trying to build the latest development
version (currently Sage 9.2.beta11) instead of Sage 9.1.

On macOS 10.14.6 I had trouble with a range of
Sage versions around Sage 9.1 but recent betas
have been building fine for me.

I would suggest changing to your Sage root directory
and running:
```
$ git checkout develop
$ git pull origin develop --tags
$ make configure
$ ./configure
$ make -s V=0
```

Also, you might consider switching package manager
from MacPorts to Homebrew, since Sage supports
getting many system packages from Homebrew.

I opened a ticket for also supporting MacPorts:

- Support getting system packages from MacPorts
  https://trac.sagemath.org/ticket/30504

but cannot promise whether or how soon that might happen.

-- 
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/c27a79a0-6caa-4ff9-9232-3bc737fb669bo%40googlegroups.com.


Re: [sage-support] Re: Installation fails

2020-09-01 Thread slelievre
The problem observed could be caused by interference
from some anti-virus software. See a discussion at

- Ask Sage question 48218
  Sage crash on startup on Windows 10
  https://ask.sagemath.org/question/48218

Try setting any anti-virus software on the host machine
to leave Sage alone.

-- 
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/23b1d6b0-ee2b-4e75-b11d-9aaeb62618d0o%40googlegroups.com.


[sage-support] Re: Installation fails

2020-08-31 Thread slelievre
2020-08-31 18:10:37 UTC, Krishna Ghode:
>
> I try 3-4 times.
> It starts and after some process it suddenly invisible. And did not 
install.

What operating system? What steps did you follow?

-- 
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/3b52f1fd-4637-45cf-966e-e08c83142c59o%40googlegroups.com.


[sage-support] Re: Unavailable link in online documentation

2020-08-27 Thread slelievre
2020-08-27 09:03:43 UTC, Daniel Volinski:
>
> In https://doc.sagemath.org/pdf/en/refer... 
> 
>
Section "Geometry and Topology', the first link is
>
* :doc:Euclidean Spaces and Vector Calculus
>
which does not link to any file. Please fix this.
>
 
Now tracked at

- Sage Trac ticket 30451: Fix pdf documentation table of contents
  https://trac.sagemath.org/ticket/30451

-- 
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/38f08c68-a410-4ba5-bca6-92b6c08da483o%40googlegroups.com.


[sage-support] Re: Directly saving html file of Three.js graphic

2020-08-11 Thread slelievre
2020-08-11 20:48:46 UTC, Joshua Campbell:
>
> It was implemented as part of #29194 
 (Three.js-based Animations).

Thanks! Could you contribute a list of exciting new things
in Sage graphics to the release tour for SageMath 9.2?

- https://wiki.sagemath.org/ReleaseTours/sage-9.2

-- 
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/eeb4eb2d-80dc-4002-862e-93f7b33cbd5co%40googlegroups.com.


[sage-support] Re: Directly saving html file of Three.js graphic

2020-08-11 Thread slelievre
2020-08-11 09:28:58 UTC, Joshua Campbell:
>
> The ability to save directly to an HTML file as in the snippet
> you posted will be included in the upcoming 9.2 release.

Cool! Can you say which ticket makes that possible?

-- 
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/4dd37fc1-4fb5-4b3d-9947-fdb0f9bccfbao%40googlegroups.com.


[sage-support] Re: Sage Crash Report: `TypeError` upon startup (Sage 9.0.0)

2020-08-02 Thread slelievre
Le lundi 3 août 2020 05:31:01 UTC+2, Samuel Tang a écrit :
>
> Hi team,
>
> This issue happened to me just one day ago.
>
> I am aware of https://trac.sagemath.org/ticket/18492 and
>
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1671690.html
>
as they have the same TypeError, but I think that is not my case.
>
> Thanks for the help in advance!
>

Hi Samuel,

Did you just install Sage? Probably not or you would have installed
either Sage 9.1 or Sage 9.2.beta7.

More likely, did you have Sage installed on your computer for a while,
via some package manager, and working well, and did you just upgrade
the system Python from Python 3.7.x to Python 3.8.x?

Python 3.8.x is not supported yet, we're slowly getting there, see:

- Sage Trac ticket 27754
  Upgrade: Python 3.8.5
  https://trac.sagemath.org/ticket/27754

For more support, what is your OS and how did you install Sage?

-- 
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/3db476fe-aaf3-4107-b65d-f7607467ad6bo%40googlegroups.com.


[sage-support] Re: sometimes show just display broken latex

2020-07-29 Thread slelievre
Not sure what prevents this from working.

A similar question was asked recently on Ask Sage:

How to LaTeX the graph of a permutation?
https://ask.sagemath.org/question/52649

Could you try the following workarounds below,
inspired by the answers to that question?

One solution is to use the optional package slabbe.

The other one is to define:

def graph_from_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
return DiGraph(ee, loops=True)

and then you can do:

sage: p = Permutation([3, 2])
sage: g = graph_from_permutation(p)
sage: show(g)

Or you could define

def show_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
g = DiGraph(ee, loops=True)
show(g)

and you could directly call

sage: show_permutation(Permutation([3, 2]))

-- 
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/55ea836a-f8ea-4a90-bedf-00620e36e849o%40googlegroups.com.


[sage-support] Re: Triangle plot 3d

2020-07-12 Thread slelievre
Use polygon3d for the triangle and line3d for the height.

 

-- 
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/c353da91-9c5a-41d1-81ab-794a0cd09c12o%40googlegroups.com.


[sage-support] Re: Execute Sage Code line in Keynote during presentation

2020-06-25 Thread slelievre
2020-06-24 17:51:08 UTC, Bert Henry:
>
> I want to make a Keynote presentation about
> a mathematical topic. In the presentation I want
> to include some Sage code (e.g. plot(sin(x),(x,0,4)) ).
> And I want to execute this code during the presentation. 
>
> Is it possible? How?

Use the RISE extension for Jupyter.

To install for Sage: run this once in a Jupyter notebook cell:

!pip install RISE

Some RISE links:

- repo: https://github.com/damianavila/RISE
- docs: https://rise.readthedocs.io/en/stable/
- demo: https://youtu.be/sXyFa_r1nxA

Presentations using RISE and Sage:

- Nicolas M. Thiéry: "OpenDreamKit: a debriefing"
  talk at Sage Days 109, 2020-05-28

  Visit this page, click talk title, then "video":
  
  https://researchseminars.org/seminar/SageDays109

  - skip to 00:02:00 to see start of the talk
  - skip to 00:23:00 to see running Sage code

- Nicolas M. Thiéry: "Alcove art in olive wood"

  Find the slides at

  https://wiki.sagemath.org/days107/schedule

-- 
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/68f98e16-6a03-47aa-bba8-d1ef41ca9647o%40googlegroups.com.


[sage-support] Re: Single returns with iteration in a range

2020-06-24 Thread slelievre


Le mardi 23 juin 2020 20:33:11 UTC+2, slelievre a écrit :
>
> Not sure why one would want the "first pair" each time.
>
> Below we define a function that produces an iterator
> yielding random prime pairs one after the other,
> with primes picked at random in a range ensuring
> their product will have the correct number of digits.
>
> ```
> def prime_pair_for_each_product_ndigits(nmin, nmax):
> for n in range(nmin, nmax + 1):
> lo = isqrt(10**(n-1))
> hi = isqrt(10**n)
> a = random_prime(hi, lbound=lo)
> b = random_prime(hi, lbound=lo)
> yield a, b
> ```
>

This might give a product with one digit less
in extremely rare cases. To avoid that, replace

lo = isqrt(10**(n-1))

with

lo = isqrt(10**(n-1)) + 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/701211f3-907f-4596-ad87-683df07fc485o%40googlegroups.com.


[sage-support] Re: Single returns with iteration in a range

2020-06-23 Thread slelievre
Not sure why one would want the "first pair" each time.

Below we define a function that produces an iterator
yielding random prime pairs one after the other,
with primes picked at random in a range ensuring
their product will have the correct number of digits.

```
def prime_pair_for_each_product_ndigits(nmin, nmax):
for n in range(nmin, nmax + 1):
lo = isqrt(10**(n-1))
hi = isqrt(10**n)
a = random_prime(hi, lbound=lo)
b = random_prime(hi, lbound=lo)
yield a, b
```

This might give something like the following.

```
sage: p_q_list = list(prime_pair_for_each_product_ndigits(19, 35))
sage: p_q_list
[(2257885207, 1029222697),
 (7906953709, 8831254513),
 (28123041337, 1808687),
 (59156603659, 75212477107),
 (244478980829, 297135812329),
 (878180166047, 926189502323),
 (1390098443147, 1010518243127),
 (5150835567223, 3603512345189),
 (16533079879703, 15727405198679),
 (34437803922611, 57693414719911),
 (102979771890571, 141205565889301),
 (941693653240727, 468548529571597),
 (1375078260756671, 1726461802816903),
 (8524331332200121, 4310462307066121),
 (19014345158785303, 31601933129557883),
 (92121426759262499, 64338223205154251),
 (262242817443146321, 251117727289363427)]
```

We check the number of digits of each product.

```
sage: f = lambda n: f'{n:36d} has {n.ndigits():2d} digits'
sage: print('\n'.join(f(n) for n in (p*q for p, q in p_q_list)))
 2323866702264943279 has 19 digits
69828320626688338717 has 20 digits
   508658323826826921919 has 21 digits
  4449314698430409934513 has 22 digits
 72643460565990932840741 has 23 digits
813361250941000432227181 has 24 digits
   1404719836542484333000669 has 25 digits
  18561099554526665790140147 has 26 digits
 260022446450216138134512337 has 27 digits
1986834503750174243684807621 has 28 digits
   14541316964959210349671680871 has 29 digits
  441229176532847985852022831019 has 30 digits
 2374020093080293654628048809913 has 31 digits
3674380890039135426331200641 has 32 digits
   600890064210265812194221708193549 has 33 digits
  5926928916814700284047132294733249 has 34 digits
 65853820314282336219416564107002067 has 35 digits
```

-- 
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/a507a76b--451b-ac7e-1162bb46d58an%40googlegroups.com.


[sage-support] Re: No reply to my sage-trac-account request

2020-06-22 Thread slelievre
On 2020-06-21 08:26:02 UTC, David Fifield:
>
> I was glad to see that it is possible to contribute to Sage 
> without a GitHub account. I followed the instructions at
> https://doc.sagemath.org/html/en/developer/trac.html
> and sent email to [...] with the requested  information.
> I sent a message on 2020-05-12 and another on 2020-06-06,
> but I have not had any reply. Does this method of
> requesting an account still work?
>
> I want to contribute non-brute-force implementations of
> Permutations_mset.rank and Permutations_mset.unrank.

Done now, sorry for missing your emails to sage-trac-account.

-- 
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/be53ab56-1b35-4f20-9624-0a2a729b39c5o%40googlegroups.com.


Re: [sage-support] ask.sagemath.org dow

2020-06-07 Thread slelievre
2020-06-07 18:05:41 UTC, Dima Pasechnik:
>
> On Sun, Jun 7, 2020 at 6:33 PM Emmanuel Charpentier 
> > 
> > Since about 18h (usage hour in Paris = UTC+2 in summer),
> > ask.sagemath.org is inaccessible from my place. 
> > 
> > Is that general ? 
>
> I can't reach it either 

There is an outage at Ohio State University where it is hosted.
The OSU IT services are working on fixing the outage.

-- 
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/fb4664a9-bf5f-42c7-be70-37517bbb3e88o%40googlegroups.com.


Re: [sage-support] nauty/genbg apparently hitting 32-bit limit, failing silently

2020-06-07 Thread slelievre
Le samedi 6 juin 2020 22:53:13 UTC+2, Dima Pasechnik a écrit :
>
> The code in question calls nauty's genbg program, and hypergraphs are 
> encoded as vertex-(hyper)edge incidence graphs. It seem that one needs 
> to read its source code (e.g. here: 
> https://github.com/lonnen/nauty/blob/nauty27/genbg.c) 
> to understand how the limits are controlled, there are parameters 
> called MAXN (defaulting to WORDSIZE), MAXN1 (probably, the number of 
> vertices in one part of the graph, at most 24 or 30, something like 
> this - and this is probably the # of vertices of the hypergraph) 
>
> It should not be too hard to change, but it would be good to know 
> how exactly. 

Brendan McKay asks me to post this on his behalf:

> The nauty makefile has a target genbgL which makes
> a version allowing up to 30 vertices on the first side
> and 64 vertices altogether.
>
> There are two versions because using 64-bit words
> gives a tiny inefficiency for small sizes.  But this is now
> quite small (less than 1% usually) so I recommend that
> sage uses genbgL for everything.

-- 
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/f0cdf1f8-67f8-488b-a2d0-4247bd88fa38o%40googlegroups.com.


[sage-support] Re: How to use notebook in sage 9.0?

2020-05-07 Thread slelievre
2020-05-06 17:58:09 UTC, Szabolcs Horvát:
>
> I use sage 9.0 and sage 8.9 on macOS. I compiled them
> myself so I would gain access to other ILP solvers than GLPK.
>
> They work fine in command line mode. But if I start Sage 9.0
> as sage --notebook, it gives me an interface to create a new
> notebook, which only has the kernel "Sage 8.9".  How can
> I get the Sage 9.0 kernel?
>
> This help page is not helpful:
>
> 
https://doc.sagemath.org/html/en/reference/repl/sage/repl/ipython_kernel/install.html
>
> It does not explain how to install the kernel.

Building several versions of SageMath on macOS
does not seem to install a Jupyter kernel for each,
maybe because each new build sees a Jupyter kernel
for Sage already exists at the desired location.

Maybe this is something we should improve. In any
case thanks for asking, and here are, at least,
some ways to sort this out "by hand".

To figure out where your kernels are installed, run:

$ sage --jupyter kernelspec list

This might answer something like:

Available kernels:
  python3 /Users/name/Library/Jupyter/kernels/python3
  sagemath/Users/name/Library/Jupyter/kernels/sagemath

To change what the SageMath kernel is doing, you can edit
the file

/Users/name/Library/Jupyter/kernels/sagemath/kernel.json

To have a Jupyter kernel for each SageMath version,
you can rename or duplicate the folder and create:

/Users/name/Library/Jupyter/kernels/sagemath-8.9
/Users/name/Library/Jupyter/kernels/sagemath-9.0

and edit the `kernel.json` files in there.

These `kernel.json` files might look something like:

```
{
"argv":
[
"/path/to/sagemath/local/bin/sage",
"--python",
"-m",
"sage.repl.ipython_kernel",
"-f", "{connection_file}"
],
"display_name": "SageMath 9.0",
"language": "sage"
}
```

So fixing it is just a matter of changing the path
in the first item of the "argv" list.

Make sure to use different "display_name" values
for the different kernels you install there.
Initially they will say

"display_name": "SageMath",

so maybe use

"display_name": "SageMath-8.9",

and

"display_name": "SageMath-9.0",

to make them different.

If you would prefer to copy Sage's actual Jupyter kernel
than making up your own, you can locate it in the Sage
tree as follows.

Change to your Sage folder (repeat for each version of Sage,
replacing `/path/to/sagemath` with the actual folder for it):

$ cd /path/to/sagemath
$ find . -name "kernel.json"

This will give you a result like:

./local/share/jupyter/kernels/python3/kernel.json
./local/share/jupyter/kernels/sagemath/kernel.json

You can then copy `./local/share/jupyter/kernels/sagemath`
to say `/Users/name/Library/Jupyter/kernels/sagemath-x.y` --
use the folder revealed by `sage --jupyter kernelspec list`
and rename to `sagemath-9.0` or `sagemath-8.9` as you wish.

Hope this helps.  Kind regards,  --Samuel

-- 
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/046d7b9e-7118-4c5f-bae0-6f71c5589b26%40googlegroups.com.


[sage-support] Re: Installation problem

2020-04-21 Thread slelievre


Le mardi 21 avril 2020 18:59:01 UTC+2, Santanu a écrit :
>
> Dear all,
>   I am trying to install Sage 9.0. But I am getting error. 
> I have upgraded from Ubuntu 14.04 to Ubuntu 18.04.
> I am getting this:
>
> (base) 
> santanu@Santanu-Laptop:~/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath$ make
> ...
> .
> make[1]: *** 
> [/home/santanu/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath/local/var/lib/sage/installed/pkgconf-0.9.7.p2]
>  
> Error 1
> make[1]: Leaving directory 
> '/home/santanu/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath/build/make'
>
> real 0m48.492s
> user 0m1.040s
> sys 0m0.363s
> ***
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make base-toolchain'):
>
> * package: pkgconf-0.9.7.p2
>   log file: 
> /home/santanu/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath/logs/pkgs/pkgconf-0.9.7.p2.log
>   build directory: 
> /home/santanu/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath/local/var/tmp/sage/build/pkgconf-0.9.7.p2
>
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
>
> Makefile:31: recipe for target 'base-toolchain' failed
> make: *** [base-toolchain] Error 1
> (base) 
> santanu@Santanu-Laptop:~/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath$
>

If you downloaded the Ubuntu version

  sage-9.0-Ubuntu_18.04-i686

from the download-linux page on the SageMath website,
you don't need to run `make`, it should be ready to use.

If you want to build from source, you should

- download the source file, preferrably for the latest
  development version, currently SageMath 9.1.rc0

- install the prerequisites listed at

https://wiki.sagemath.org/prerequisites/Ubuntu

- run

make configure
./configure

- follow the recommendations at the end of that stage
  (it might suggest installing a few more system packages)

- then run

make -s V=0



-- 
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/131e2e52-3907-44db-aa5e-55e08f5d01b3%40googlegroups.com.


[sage-support] Re: equation solution in integer

2020-04-18 Thread slelievre
Matthias is hinting at a possible reformulation
of the problem as finding integral points in a
polyhedron. Let me expand.

In RR^2, consider the set S of all (x, y) satisfying:

x >= 1
x <= 9
y >= 1
y <= 9
x + y = 15

or if one prefers,

-1 + x >= 0
9 - x >= 0
-1 + y >= 0
9 - y >= 0
-15 + x + y = 0

Since all the conditions used to define this set
are of one of the following forms:

(linear form in x and y) = 0
(linear form in x and y) >= 0

the subset S is what is called a "polyhedron" in R^2.

The problem in your original post can now be
rephrased as:

Find all integral points in the polyhedron S.

An introduction to polyhedra in Sage is at:


http://doc.sagemath.org/html/en/reference/discrete_geometry/sage/geometry/polyhedron/constructor.html

The polyhedron S can be input as

S = Polyhedron(ieqs=[[-1, 1, 0], [9, -1, 0], [-1, 0, 1], [9, 0, -1]], 
eqns=[[-15, 1, 1]]), 

Check that our input represents the correct polyhedron:

sage: print(S.Hrepresentation_str())
x0 + x1 ==  15
-x0 >= -9
 x0 >=  6

Find all integral points:

sage: S.integral_points()
((6, 9), (7, 8), (8, 7), (9, 6))

-- 
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/3e9f5212-645d-40ce-bbd1-7549e2bf1f21%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread slelievre
Thu 2020-04-16 17:05:42 UTC, John H Palmieri:
>
> Maybe SageCell doesn't have the optional package "tides" installed. 
> This is the same error I see on my own computer without "tides".

I was thinking that too. I asked Andrey if it can be installed on SageCell:

https://groups.google.com/d/topic/sage-cell/kR4R_HJDrms/discussion


@[Toan T Nguyen]

To run this command on your own Sage, you first need to install
the optional package 'tides', which, depending on the OS and on
how Sage was installed, might be achieved by running:

sage -i tides

Running it on SageCell would require 'tides' to be installed there,
let's wait for Andrey's answer.

I tried installing on Ubuntu with Sage 9.1.rc0, it worked.

$ sage
Forcing sage-location, probably because a new package was installed.
Cleaning up, do not interrupt this.
Done cleaning.
┌┐
│ SageMath version 9.1.rc0, Release Date: 2020-04-12 │
│ Using Python 3.7.3. Type "help()" for help.│
└┘
┏┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗┛
sage: t, x, y, z = SR.var('t, x, y, z')
sage: s = 10
sage: r = 28
sage: b = 8/3
sage: f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
sage: x0 = 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
sage: y0 = 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
sage: z0 = 27
sage: T = 
15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
sage: sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 
100) # optional - tides
sage: print(sol)
[[0.000,
 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038,
 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676,
 
27.0],
 
[15.5865221071617472756787020921269607052848054899724393588952157831901987562588808543558510826601424,
 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346470530,
 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506634524,
 
27.000345574]]

-- 
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/aaa65470-f656-4187-99f6-c2ac3ab8ba43%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread slelievre
Here is the error after executing the original poster's code in SageCell.

---CalledProcessError
Traceback (most recent call 
last) in ()  8 z0 = Integer(27)  
9 T = 
RealNumber('15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374')--->
 10 sol = desolve_tides_mpfr(f, [x0, y0, z0],Integer(0) , T, T, 
RealNumber('1e-100'), RealNumber('1e-100'), Integer(100)) # optional - tides
 11 print(sol)
/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/calculus/desolvers.py 
in desolve_tides_mpfr(f, ics, initial, final, delta, tolrel, tolabs, digits)   
1887   + os.path.join('-L$SAGE_LOCAL','lib ') + '-lmpfr 
-lgmp -lm  -O2 -w ' +   1888   
os.path.join('-I$SAGE_LOCAL','include ') ,-> 1889   
shell=True,  stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1890 
subprocess.check_call(os.path.join(tempdir, 'runme'), shell=True,  
stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1891 outfile = 
open(fileoutput)
/home/sc_serv/sage/local/lib/python3.7/subprocess.py in check_call(*popenargs, 
**kwargs)345 if cmd is None:346 cmd = 
popenargs[0]--> 347 raise CalledProcessError(retcode, cmd)348 
return 0349 
CalledProcessError: Command 'gcc -o 
/home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/runme 
/home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/*.c 
$SAGE_LOCAL/lib/libTIDES.a $LDFLAGS -L$SAGE_LOCAL/lib -lmpfr -lgmp -lm  -O2 -w 
-I$SAGE_LOCAL/include ' returned non-zero exit status 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/ff9ba3cb-18f3-433f-8c8b-11a78b02091f%40googlegroups.com.


Re: [sage-support] Apparently Sage lost Python

2020-04-08 Thread slelievre
Wed 2020-04-08 19:02:33 UTC, Anita Rojas:
>
> Now I have trouble calling GAP. I used to do
>
> sage: libgap.eval('LoadPackage("kbmag")')
>
> but now I got 
>
> fail

The following says the `kbmag` GAP package cannot be loaded.

sage: libgap.eval('LoadPackage("kbmag")')
fail

It fails to load because it is not installed in Sage's GAP.

Thankfully, installing packages has become a pleasant task
thanks to Michael Torpey's `PackageManager` GAP package.

Load the `PackageManager` GAP package, whose job
is to help you install further packages:

sage: libgap.eval('LoadPackage("PackageManager")')
true

and let it install `kbmag` with this command:

sage: libgap.eval('InstallPackage("kbmag")')
true

Now loading `kbmag` works:

sage: libgap.eval('LoadPackage("kbmag")')
true

The `kbmag` package is now loaded, ready to
try and make rewriting systems confluent.

Further reading:

- kbmag GAP package
  Knuth-Bendix on Monoids and Automatic Groups
  by Derek Holt
  home: https://gap-packages.github.io/kbmag/
  repo: https://github.com/gap-packages/kbmag
  docs: https://gap-packages.github.io/kbmag/doc/chap0.html

- PackageManager GAP package --- GAP Package Manager
  Easily download and install GAP packages
  by Michael Torpey
  home: https://gap-packages.github.io/PackageManager/
  repo: https://github.com/gap-packages/PackageManager
  docs: https://gap-packages.github.io/PackageManager/doc/chap0.html

-- 
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/a8bb010a-00c7-4801-b656-355ff54d1aca%40googlegroups.com.


Re: [sage-support] Apparently Sage lost Python

2020-04-08 Thread slelievre
Have you tried running


THING="~/Applications/SageMath/"

xattr -rd com.apple.quarantine $THING

-- 
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/aba1daec-0585-4518-bb37-07b99f83f966%40googlegroups.com.


Re: [sage-support] Sage Crash report

2020-04-08 Thread slelievre
> can the color scheme for sage on the terminal be changed?
> I used a dark background so this is not easy to read.


If using the Sage REPL on a dark background,
run the command

sage: %colors Linux

You can also include that command in a file
called `init.sage` file, located in the `.sage`
folder in hour home, so that it will be run
each time you start Sage.

-- 
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/5bc0257f-8666-4915-9d8a-f72f559f69d7%40googlegroups.com.


Re: [sage-support] Re: Sage 9.0 macOS Jupyter Server failed to start

2020-03-20 Thread slelievre
Fri 2020-03-20 08:45:17 UTC, rana-aere:
>
> Thank you for making the ticket and making a patch.
>
> I think the code is now right.
>
> [...]
>
> Do I need to take part in GitHub for reviewing the patch?
> And may be I should ask someone to invite me in Sagemath
> developer's group?

If by "SageMath developer group" you mean ability to edit
Sage Trac tickets: you can log in to the Sage Trac server
- either with a GitHub identifier if you have one
- or without a GitHub identifier, see the section
  "Legacy Account Request" section on Sage Trac:
  https://trac.sagemath.org

If you mean the mailing list "sage-devel" on Google Groups,
I think you can just visit the sage-devel page and post there
by clicking the red button "New Topic" at the top of the page:
https://groups.google.com/forum/#!forum/sage-devel

Samuel

-- 
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/10e4882f-2743-4ce8-949a-3fb4b90977a4%40googlegroups.com.


[sage-support] Re: Sage 9.0 macOS Jupyter Server failed to start

2020-03-17 Thread slelievre
We often get reports of

   SageMath 8.x works but not SageMath 9.0

but it usually turns out that in such cases, the version that works
was installed under macOS 10.14 Mojave, and that what is
causing problems is that the version that fails to work was
installed under macOS 10.15 Catalina.

Have a look at previous such reports:

- Mac OS Catalina Does Not Allow Launching Sage
  https://ask.sagemath.org/question/48246

- how to unlock sagemath 8.8 on MacOS 10.15 Catalina?
  https://ask.sagemath.org/question/48293

- New SageMath 9.0 installation not running on Catalina
  https://ask.sagemath.org/question/49568

- Sage 9.0 installation issues on macOS 10.15.2 Catalina
  https://ask.sagemath.org/question/49572

Let us know if any solution proposed there solves your problem.

-- 
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/f37024c2-2331-48e5-b589-51f7b14bd101%40googlegroups.com.


[sage-support] Re: Failed Sage 9.0 build on Catalina

2020-01-14 Thread slelievre
Mon 2020-01-13 15:59:19 UTC, Rachel Player:
>
> I am also having trouble installing Sage on macOS Catalina 10.15.2.
>
> The issue appears to be with the internal version of python.
>
> Here’s what I did:
>
> - Downloaded sage-9.0-OSX_10.15.2-x86_64.tar.bz2
> - Opened with tar -xzf sage-9.0-OSX_10.15.2-x86_64.tar.bz2
> - Cd’d into SageMath
> - Ran ./sage

Suggestion (initial $ on any line denotes shell prompt):

- download sage-9.0-OSX_10.15.2-x86_64.tar.bz2

- extract with

$ tar -xf sage-9.0-OSX_10.15.2-x86_64.tar.bz2

  which gives a SageMath folder

- recursively unquarantine that folder with

$ xattr -rd com.apple.quarantine SageMath

- change to SageMath and run Sage with

$ cd SageMath
$ ./sage

- if that works, quit Sage and create a symlink
  to Sage somewhere in your path:

sage: quit
$ sudo ln -s `pwd`/sage /usr/local/bin

Then, in any terminal session, you can start Sage
from anywhere without having to cd to SageMath.

Start the Sage REPL:

$ sage

Start the Jupyter notebook server:

$ sage -n jupyter


-- 
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/84ed4fa6-b12a-449a-8eb6-1ad456b12468%40googlegroups.com.


Re: [sage-support] Sage 9.0 source build hyperelliptic_curves error

2020-01-10 Thread slelievre
Seems related to

- Sage Trac ticket 28789
  Zeta functions of hyperelliptic curves giving wrong answers
  https://trac.sagemath.org/ticket/28789

-- 
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/11e153e7-1908-4b6c-be2e-7c0d880d72b3%40googlegroups.com.


Re: [sage-support] tkinter on Leap 15.1

2020-01-08 Thread slelievre


Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
>
> On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support 
> wrote: 
> > I am about to build sage 9.0 on opensuse Leap 15.1 and notice that 
> import 
> > Tkinter works in python 2.7.14 but that import tkinter is required for 
> > python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide 
> > specifies the (uppercase T) Tkinter which applies to python 2 in my 
> > installation but sage 9.0 is built with python 3. Is this going to be an 
> > issue and does someone know about this? 
>
> That Tkinter -> tkinter change at py2 -> py3 could have been something 
> we overlooked, as probably noone involved in Sage releases has any idea 
> about tkinter. 
>

We should indeed adapt that section of the "install from source" page at

https://doc.sagemath.org/html/en/installation/source.html

I guess that to check support for Tk interface it's enough to try

import _tkinter

In Python 2, import Tkinter will import _tkinter.
In Python 3, import tkinter will import _tkinter.

-- 
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/381ea0fa-eb98-4cd5-8d30-d533a91c2f60%40googlegroups.com.


[sage-support] Re: Jupiter Server fails to start on macOS Catalina

2020-01-06 Thread slelievre

Mon 2020-01-06 10:04:35 UTC, Eric Martin:
>
> After installing sage-9.0-OSX_10.15.2-x86_64.app.dmg, doubling clicking
>
the Sage icon immediately results in a window popping up with the message:
>
"Jupiter Server fails to start. For some reason the Jupiter server ailed to 
> start.
>
[...]
>

Try running the following commands in a terminal:

APP=/Applications/SageMath-9.0.app
xattr -dr com.apple.quarantine $APP

If it says you don't have the permissions for that,
try the same with "sudo" as follows:

APP=/Applications/SageMath-9.0.app
sudo xattr -dr com.apple.quarantine $APP

-- 
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/8da010cc-0fca-4df1-89ae-d0ba6887ad08%40googlegroups.com.


  1   2   3   >