Ask Your Question

toni's profile - activity

2024-02-12 11:35:40 +0200 received badge  Popular Question (source)
2024-01-19 14:46:36 +0200 received badge  Famous Question (source)
2024-01-19 14:46:36 +0200 received badge  Notable Question (source)
2024-01-19 14:46:36 +0200 received badge  Popular Question (source)
2023-11-28 15:32:27 +0200 edited question Plotting a Möbius transformation

Plotting a Möbius transformation This is the equation in question, although I can see it coming that instead some comple

2023-11-27 15:08:35 +0200 asked a question Plotting a Möbius transformation

Plotting a Möbius transformation This is the equation in question, although I can see it coming that instead some comple

2023-09-18 18:18:42 +0200 marked best answer What is the equivalent of Mathematica SymmetricReduction[] in Sage?

I'm trying to reproduce the operation in this short segment of a presentation on Galois theory in here and here. The code is:

$$\begin{align}\text{In}:\quad &Δ^2 = (x - y)^2 * (x - z)^2 * (y -z)^2\ &\text{SymmetricReduction}[Δ, {x, y, z}, {s1, s2, s3}]\ \text{Out}: &\quad {s1^2 s2^2 -4 s2^3 -4 s1^3s3+ 18 s1s2s3-27 s3^2, 0} \end{align}$$

2023-09-10 18:24:53 +0200 asked a question What is the equivalent of Mathematica SymmetricReduction[] in Sage?

What is the equivalent of Mathematica SymmetricReduction[] in Sage? I'm trying to reproduce the operation in this short

2023-06-30 06:36:14 +0200 edited question How to generate the cosets in this specific group (Zn*)

How to generate the cosets in this specific group (Zn*) I see the answers to the multiplicative group of units (a class)

2023-06-27 00:33:48 +0200 commented question How to generate the cosets in this specific group (Zn*)

@Max Alekseyev isomorphic to C4 makes sense, by why generated by f^9?

2023-06-27 00:28:42 +0200 commented question How to generate the cosets in this specific group (Zn*)

@Max Alekseyev isomorphic to C4 makes sense, by why "generated by f^9?

2023-06-26 21:12:47 +0200 received badge  Commentator
2023-06-26 21:12:47 +0200 commented question How to generate the cosets in this specific group (Zn*)

When I run the code in your comment I get Multiplicative Abelian subgroup isomorphic to C4 generated by {f^9}

2023-06-26 17:13:44 +0200 asked a question How to generate the cosets in this specific group (Zn*)

How to generate the cosets in this specific group (Zn*) I see the answers to the multiplicative group of units (a class)

2023-06-22 14:28:26 +0200 asked a question How to insert a line of dashes as a row to a matrix?

How to insert a line of dashes as a row to a matrix? I would like to incorporate a partition in a matrix as a row of das

2023-06-21 09:51:00 +0200 received badge  Popular Question (source)
2023-06-06 15:50:06 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath Jupyter kernel not listed after installing Sage from source I will list a bunch of potentially relevant info:

2023-06-06 15:46:28 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath Jupyter kernel not listed after installing Sage from source I will list a bunch of potentially relevant info:

2023-06-06 14:00:55 +0200 commented question Problems reproducing code on SageMath on a Jupyter NB with dependence on FriCAS

@Emmanuel Charpentier I installed Sage from source but I forgot the --enable-fricas you suggested. Any way of include it

2023-06-06 14:00:42 +0200 commented question Problems reproducing code on SageMath on a Jupyter NB with dependence on FriCAS

@Emmanuel Charpentier I install from source but I forgot the --enable-fricas you suggested. Any way of include it after

2023-06-06 13:55:30 +0200 asked a question How to troubleshoot a sage database not accessible after install?

How to troubleshoot a sage database not accessible after install? I installed from source SageMath 10 on Ubuntu (WSL) to

2023-06-06 11:30:52 +0200 received badge  Self-Learner (source)
2023-06-06 11:30:52 +0200 received badge  Teacher (source)
2023-06-06 07:20:38 +0200 answered a question SageMath Jupyter kernel not listed after installing Sage from source

I got it going by simply running: sudo apt install sagemath-jupyter Now: └─$jupyter kernelspec list Available kernel

2023-06-06 06:56:48 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath kernel for Jupyter NB not listed after installing SM from source I will list a bunch of potentially relevant in

2023-06-06 06:56:31 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath kernel for Jupyter NB not listed after installing SM from source I will list a bunch of potentially relevant in

2023-06-06 06:55:26 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath kernel for Jupyter NB not listed after installing SM from source I will list a bunch of potentially relevant in

2023-06-06 06:54:40 +0200 edited question SageMath Jupyter kernel not listed after installing Sage from source

SageMath kernel for Jupyter NB not listed after installing SM from source I will list a bunch of potentially relevant in

2023-06-06 06:53:29 +0200 asked a question SageMath Jupyter kernel not listed after installing Sage from source

SageMath kernel for Jupyter NB not listed after installing SM from source I will list a bunch of potentially relevant in

2023-05-27 23:54:36 +0200 marked best answer How to control counters generating a matrix with lambda?

I am trying to generate this famous matrix without the expected diagonal of 1's. So the expected output is as follows:

      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
 [1,]    1    0    0    0    0    0    0    0    0     0     0
 [2,]    1    2    0    0    0    0    0    0    0     0     0
 [3,]    1    3    3    0    0    0    0    0    0     0     0
 [4,]    1    4    6    4    0    0    0    0    0     0     0
 [5,]    1    5   10   10    5    0    0    0    0     0     0
 [6,]    1    6   15   20   15    6    0    0    0     0     0
 [7,]    1    7   21   35   35   21    7    0    0     0     0
 [8,]    1    8   28   56   70   56   28    8    0     0     0
 [9,]    1    9   36   84  126  126   84   36    9     0     0
[10,]    1   10   45  120  210  252  210  120   45    10     0
[11,]    1   11   55  165  330  462  462  330  165    55    11

I generated it with the following loop in R:

n = 11
asymmetric.lower.triang.Pascal = matrix(0,n,n)
for(i in 1:n){
  for(k in 0:(i-1)) 
    asymmetric.lower.triang.Pascal[i,k+1] = choose(i,k)
}

I can generate the Pascal matrix in SageMath with the loop:

r = 10
matrix(ZZ, r, lambda i, j: binomial(i, j))

[  1   0   0   0   0   0   0   0   0   0]
[  1   1   0   0   0   0   0   0   0   0]
[  1   2   1   0   0   0   0   0   0   0]
[  1   3   3   1   0   0   0   0   0   0]
[  1   4   6   4   1   0   0   0   0   0]
[  1   5  10  10   5   1   0   0   0   0]
[  1   6  15  20  15   6   1   0   0   0]
[  1   7  21  35  35  21   7   1   0   0]
[  1   8  28  56  70  56  28   8   1   0]
[  1   9  36  84 126 126  84  36   9   1]

but I want to get rid of the diagonal of 1's with the same manipulation of the counters or indices I used above. I have no idea what lambda does, having found the basic code for matrix construction in SageMath online. So the question amounts to whether I could make i run from 1 to n while j runs from 0 to n - 1 or viceversa.

2023-05-27 15:24:54 +0200 commented answer How to control counters generating a matrix with lambda?

This is great! However, I was hoping for some insight into the workings of the counters.

2023-05-27 04:16:07 +0200 edited question How to control counters generating a matrix with lambda?

How to control counters generating a matrix with lambda? I am trying to generate this famous matrix without the expected

2023-05-27 04:02:57 +0200 asked a question How to control counters generating a matrix with lambda?

How to control counters generating a matrix with lambda? I am trying to generate this famous matrix without the expected

2023-05-23 19:57:35 +0200 marked best answer Element-wise ("vectorial") operation in SageMath

Thanks to this forum, I got running some lines of code in SageMath as follows:

def y(x): return RR(sum(map(log, prime_range(1,x))))
y(20)
16.0876044842000

It takes the log of all primes less than a real value of x and adds them.

Now I'm looking at dividing the log(prime) by that prime before adding them up. Actually, not even adding them up.

So it seems like a reasonable first step to take out the sum() from the function, but this does not work so well:

def y(x): return RR(map(log, prime_range(1,x)))
y(20)

yielding an TypeError: unable to convert '<mapobjectat0x7f7d91273250>' to a real number despite leaving RR or permuting its position within the function.

I have not even attempted the second logical step of dividing element-wise by prime_range(1,x).

Example:

For y(4) it would be

log(2) / 2 + log(3) /3
2023-05-23 18:54:18 +0200 edited question Element-wise ("vectorial") operation in SageMath

Element-wise ("vectorial") operation in SageMath Thanks to this forum, I got running some lines of code in SageMath as f

2023-05-23 18:39:01 +0200 edited question Element-wise ("vectorial") operation in SageMath

Element-wise ("vectorial") operation in SageMath Thanks to this forum, I got running some lines of code in SageMath as f

2023-05-23 17:57:58 +0200 asked a question Element-wise ("vectorial") operation in SageMath

Element-wise ("vectorial") operation in SageMath Thanks to this forum, I got running some lines of code in SageMath as f

2023-05-23 02:38:22 +0200 marked best answer Plotting error message regarding numerical type of function arguments

I am trying to plot the following function:

x = var('x')
def y(x): return RR(len(prime_range(floor(0.95 * x), floor(1.25 * x))) / round(1.25 * x - 0.95 * x))

I am not sure whether it is well-constructed mathematically, but it's trying to check the density of prime numbers around a given value x I am using the floor() function because I'm not sure that prime_range() accepts non-integers.

If I test the function with random real values of x I get a plausible output without errors.

However, when I try to plot the function as in:

plot(y(x), (x, 5, 20))

I get the following error message:

TypeError: unable to convert floor(0.950000000000000*x) to an integer
and argument is also not real: unable to simplify to float approximation

I don't understand why this input cannot be understood as real by sagemath, or why the floor is not an integer.

2023-05-23 02:37:53 +0200 commented question Plotting error message regarding numerical type of function arguments

Thank you! @John Palmieri

2023-05-22 23:51:56 +0200 asked a question Plotting error message regarding numerical type of function arguments

Plotting error message regarding numerical type of function arguments I am trying to plot the following function: x = v

2023-05-22 18:44:53 +0200 marked best answer How to sum the log of the first n primes?

This is a very naive question, and it may not fit the etiquette of the forum.

How do you handle the fact that

log(7) prints out as log(7), and only after expressing it as log(7.0) do you get 1.94591014905531

I would try and generate the sum using the function primes_first_n(n). However, log(primes_first_n(n)) is not a valid expression, and I don't know if it is because of the point about the logarithmic function above, or it is because log cannot be applied to a vectorial expression.

2023-05-22 18:26:58 +0200 commented answer How to sum the log of the first n primes?

How could I include that in a function like y(x) = sum(log(p) for p in primes_first_n(x))

2023-05-22 18:02:44 +0200 commented answer How to sum the log of the first n primes?

What is the most expedient way to get he actual decimal expansion of something like log(7)?

2023-05-22 14:10:52 +0200 asked a question How to sum the log of the first n primes?

How to sum the log of the first n primes? This is a very naive question, and it may not fit the etiquette of the forum.

2023-05-21 16:22:56 +0200 received badge  Supporter (source)
2023-05-13 03:12:57 +0200 marked best answer How to install a database for SageMath on the Ubuntu command line?

I am trying to install a database package for SageMath using Ubuntu (command line), and at the same time trying to get the minimal necessary knowledge of Linux to get started.

The actual package is for knots, and is located https: SLASH SLASH github DOT com/soehms/database_knotinfo#readme (not enough karma to to publish links).

The instructions for installation on SageMath seem clear on that site:

sage -i database_knotinfo

However, this spits out an error message:

make: *** No rule to make target 'all-toolchain'.  Stop.

I don't know what this means or how to solve it. I did look up what make means in this context, but it doesn't help.