Ask Your Question

sum8tion's profile - activity

2024-07-22 14:27:33 +0200 received badge  Popular Question (source)
2024-05-30 20:32:54 +0200 received badge  Popular Question (source)
2024-05-15 21:51:22 +0200 commented question Installing Coxeter3

I'm running Windows 11. It looks like I only have Sage 9.5, which I'm guessing might be a/the problem, since I followed

2024-05-14 04:24:58 +0200 commented question Installing Coxeter3

I got the same error message.

2024-05-09 02:18:10 +0200 asked a question Installing Coxeter3

Installing Coxeter3 I'm having issues installing and using Coxeter3 When I'm in the coxeter as in the above instruction

2024-05-09 02:01:57 +0200 received badge  Notable Question (source)
2024-04-27 16:17:45 +0200 received badge  Notable Question (source)
2024-04-27 16:17:45 +0200 received badge  Popular Question (source)
2024-02-19 14:13:54 +0200 received badge  Popular Question (source)
2024-02-11 20:05:07 +0200 received badge  Notable Question (source)
2024-02-11 20:05:07 +0200 received badge  Popular Question (source)
2023-10-26 08:19:55 +0200 marked best answer Why does .remove() seem to take every element out of a list?

I've found that if I define a list

Sage: list1 = [1,2,3]

and then try to remove an element

Sage: list2 = list1.remove(2)

but then

Sage: print(list2)

returns

None
2023-08-18 04:42:56 +0200 received badge  Notable Question (source)
2023-07-31 13:48:52 +0200 received badge  Popular Question (source)
2023-06-29 15:35:47 +0200 received badge  Famous Question (source)
2023-03-15 07:39:26 +0200 received badge  Popular Question (source)
2023-03-15 07:39:26 +0200 received badge  Notable Question (source)
2023-03-07 23:19:34 +0200 received badge  Notable Question (source)
2022-11-30 21:40:54 +0200 received badge  Popular Question (source)
2022-06-02 01:43:30 +0200 received badge  Famous Question (source)
2022-06-02 01:43:16 +0200 received badge  Notable Question (source)
2022-04-26 20:02:49 +0200 received badge  Popular Question (source)
2022-03-06 19:55:21 +0200 received badge  Famous Question (source)
2021-11-03 19:00:48 +0200 received badge  Popular Question (source)
2021-10-27 13:14:32 +0200 received badge  Famous Question (source)
2021-06-17 05:27:03 +0200 commented answer How do you assign (different) LaTex names to elements of a list?

I have a bit of a follow-up, lets say I want the latex name to have a bar over it for conjugation, like $\bar{v}$. My n

2021-06-16 22:22:47 +0200 commented answer How do you assign (different) LaTex names to elements of a list?

Thank you!

2021-06-16 22:22:27 +0200 marked best answer How do you assign (different) LaTex names to elements of a list?

Say I have the following list of variables.

v = {(i,j): var("v_{}{}".format(i, j), latex_name="v_{{}{}}") for i in range(2) for j in range(2)}

How do I make it so that when I use the

show(v[0,0])

command, I get $v_{0,0}$ as output? I've tried stuff like

v = {(i,j): var("v_{}{}".format(i, j), latex_name="v_{i,j}") for i in range(2) for j in range(2)}

and

v = {(i,j): var("v_{}{}".format(i, j), latex_name="v_{{i}{j}}") for i in range(2) for j in range(2)}

but it only ever give me stuff like $v_{i,j}$ where it's just the literal symbols $i$ and $j$, not the entries of

v[k,m]

for some $k$ and $m$ I plug in, like 0, 0.

2021-06-16 21:55:24 +0200 marked best answer How to create lists of n-tuples efficiently?

The ultimate problem I'm trying to solve, is that given two integers p and q, I would like to create a list (say "List1"), whose entries are (all of the) lists of length 2q which:

1) For all L in List1, the first q entries are between 0 and pq-1 (inclusive), and the next q entries are between pq and 2pq-1 (inclusive)

2) For all L in List1, the entries are strictly increasing, that is for all 1<=i<=2pq, L[i] < L[i+1]

I have a way of doing this which is very "brute force", where I first construct the list of lists of length 1, then the list of lists of length 2, etc.
I'm imagining (hoping) there exists some way for me to just iterate over all 2q -tuples (without repetition) of numbers from 1 to 2pq Something along the lines of

List1 = []
for x in 2q-tuples of [0, 1, 2, ..., 2pq-1]:
    if x satisfies 1) and 2):
        List1.append(x)

I suppose I would want to convert x to a list before appending to List1, or many there's some way to iterate over lists instead of tuples. That's not so important, I just want an efficient way to construct these lists.

2021-06-16 21:52:17 +0200 asked a question How do you assign (different) LaTex names to elements of a list?

How do you assign (different) LaTex names to elements of a list? Say I have the following list of variables. v = {(i,j)

2021-04-21 19:18:25 +0200 edited question How to create lists of n-tuples efficiently?

How to create lists of n-tuples efficiently? The ultimate problem I'm trying to solve, is that given two integers p and

2021-04-21 19:12:26 +0200 asked a question How to create lists of n-tuples efficiently?

How to create lists of n-tuples efficiently? The ultimate problem I'm trying to solve, is that given two integers p and

2021-03-26 14:17:01 +0200 received badge  Popular Question (source)
2021-03-26 14:17:01 +0200 received badge  Notable Question (source)
2021-03-01 09:17:33 +0200 received badge  Notable Question (source)
2021-02-26 09:08:41 +0200 received badge  Popular Question (source)
2020-12-03 06:12:49 +0200 received badge  Famous Question (source)
2020-11-23 22:16:18 +0200 received badge  Popular Question (source)
2020-08-04 18:09:30 +0200 received badge  Notable Question (source)
2020-07-11 11:58:42 +0200 received badge  Notable Question (source)
2020-07-10 21:02:22 +0200 asked a question Why doesn't '==' or '!=' work for mixed forms?

I have the following setup

M = Manifold((4), 'M', field='complex')
U = M.open_subset('U')
x = U.chart(names=tuple('x_%d' % i for i in range(4)))
eU = x.frame()

Form0 = M.mixed_form(comp=([0,0,0,0,0]))
Form1 = M.mixed_form(comp=([1,0,0,0,0]))

Clearly Form0 and Form1 are distinct mixed forms of M, but when I run

if Form0 != Form1:
    print('Not Equal')
else:
    print('Equal')

I get 'Equal' as the output, what's going wrong?

2020-06-10 06:36:45 +0200 asked a question Can a loop be made to skip an iteration if the run time exceeds a certain amount?

I apologize if this is a little abstract, but is it possible to create some sort of "for" or "while" loop that will pass to the next iterate if the computation for that specific iterate takes too long?
For example, it could be something along the lines of, for some function/procedure

F(n)

we have

for n in range(100):
    print(F(n))

but if for some n in the range, the computation of F(n) takes more than say, 1 minute CPU time, I want it to either just skip to computing F(n+1) and/or print "-1" in place of F(n).
So let's say F(0), F(1), and F(2) all take less than half a second to compute they print just fine, so then n gets set to n=3, and F(3) starts running, but let's say it runs for over a minute, I want it to be that the loop outputs "-1" (or something) and then moves on to computing F(4).

UPDATE: I'd also like to be able, if possible, to print out run times. So that the output would be something like

(F(1), time(1))
(F(2), time(2))
(F(3), times(3))
...

etc., where time(n) is the amount of time it took to compute F(n).

2020-06-03 16:22:54 +0200 commented question Are there fast(er) ways to compute inverses of Hermitian matrices?

@mwageringel It's a little convoluted, by the symbolic variables I have set up are supposed to represent complex numbers, and part of the indexing reflects conjugation. Under this identification the matrices h[i] can be seen as Hermitian matrices. If you'd really like I can explain the details, but I don't think they're relevant to the question at hand.

2020-06-03 16:19:49 +0200 commented question Are there fast(er) ways to compute inverses of Hermitian matrices?

@Frederic are computations in polynomial rings that much faster? I was under the impression they worked the same as symbolic rings. I tried rewriting the code using a polynomial ring, but it seemed to make no difference in the run time when q=4, and certainly q=5 still isn't feasible.