Ask Your Question

Holden's profile - activity

2023-04-09 21:45:48 +0200 received badge  Notable Question (source)
2023-04-09 21:45:48 +0200 received badge  Popular Question (source)
2023-02-15 22:33:45 +0200 edited answer dimension of quotient space

Here is an example code. It answers my own question. Sage: V = VectorSpace(GF(2),100) # example vector space Sage: def

2023-02-15 22:24:02 +0200 edited answer dimension of quotient space

Here is an example code. It answers my own question. Sage: V = VectorSpace(GF(2),100) # example vector space Sage: def

2023-02-15 22:23:40 +0200 edited answer dimension of quotient space

Here is an example code. It answers my own question. Sage: V = VectorSpace(GF(2),100) # example vector space Sage: def

2023-02-15 22:10:20 +0200 commented answer dimension of quotient space

@John-Palmieri, typo: the output is 10.

2023-02-15 21:49:19 +0200 commented answer dimension of quotient space

@John-Palmieri, typo: the answer is 10.

2023-02-15 21:46:23 +0200 edited answer dimension of quotient space

Here is an example code. It answers my own question. Sage: V = VectorSpace(GF(2),100) # example vector space Sage: def

2023-02-15 21:45:02 +0200 marked best answer dimension of quotient space

I am applying the the following theorem on dimension of quotient spaces. Let $x \neq 0$ be an element of a vector space $V$ over a field $K.$ Then

$$ dim(V) = dim(Span(x)) + dim(V/Span(x)).$$

How can I write a Sage code to compute $dim(V)$ by recursively using this formula where you choose a nonzero element x until $dim(V/Span(x))$ is 1?

dim(V) = dim(Span(x1)) + dim(V/Span(x1))

           = dim(Span(x1)) + [ dim(Span(x2)) + dim((V/Span(x1))/Span(x2)) ] 

           = ... 

           = dim(Span(x1)) + dim(Span(x2)) + ... + dim(Span(xn))

           = 1 + 1 + .... + n

          = n

Thanks.

2023-02-15 16:27:31 +0200 answered a question dimension of quotient space

Here is an example code. It answers my own question. Sage: V = VectorSpace(GF(2),100) # example vector space Sage: def

2023-02-14 21:31:34 +0200 commented question dimension of quotient space

@John-Palmieri, i I found the solution. Thanks. Should I close it?

2023-02-14 21:31:18 +0200 commented question dimension of quotient space

@john-palmieri, i I found the solution. Thanks. Should I close it?

2023-02-14 21:30:28 +0200 commented question dimension of quotient space

@John Palmier, i I found the solution. Thanks. Should I close it?

2023-02-14 21:29:34 +0200 commented question dimension of quotient space

I found the solution. Thanks. Should I close it?

2023-02-14 20:16:22 +0200 asked a question dimension of quotient space

dimension of quotient space I am applying the the following theorem on dimension of quotient spaces. Let $x \neq 0$ be a

2021-05-16 17:07:27 +0200 received badge  Famous Question (source)
2020-09-21 17:20:49 +0200 received badge  Notable Question (source)
2020-05-26 18:16:36 +0200 received badge  Popular Question (source)
2018-12-19 04:26:42 +0200 commented answer Roots of multivariable polynomials with respect to one variable?

I wrote down a one liner to define residue

def Res(f,var, pole, multi):
return (1/factorial(multi-1))*limit( diff((var-pole)^multi*f ,var,multi-1), var=pole)

but the limiting part takes a huge amount of memory for a moderately big rational function in several variables. I am looking for other methods now.

2018-12-18 20:00:59 +0200 received badge  Good Question (source)
2018-12-18 00:49:58 +0200 received badge  Nice Question (source)
2018-12-17 20:36:26 +0200 commented answer Roots of multivariable polynomials with respect to one variable?

Thank you @rburing. Yes, the roots are instantaneous. I am working on the residues now. I will let you know if I have further questions.

2018-12-17 19:36:18 +0200 received badge  Supporter (source)
2018-12-16 23:32:23 +0200 asked a question Roots of multivariable polynomials with respect to one variable?

This question was previously titled "Finding residues of a huge multivariable rational function."

From my understanding, when computing with huge rational functions, we shouldn't use symbolic variables. However, I don't see how to find roots and residues without symbolic variables. Here is a small scale example of the issue. I have a rational function that looks like below:

$f(u_1,x_1,u_2,x_2,u_3,x_3) = \frac{1}{{\left(u_{1} u_{2} u_{3} - x_{1} x_{2} x_{3}\right)} {\left(u_{1} u_{2} u_{3} - 1\right)} {\left(u_{1} u_{2} - x_{1} x_{2}\right)} {\left(u_{1} u_{2} - 1\right)} {\left(u_{1} - x_{1}\right)} {\left(u_{1} - 1\right)}}$

First I want to solve for $u_1$ in the denominator and find those roots (poles) that have $x_1$ as below.

Then I will loop through the roots and compute the residue of $f$ w.r.t. $u_1$ at those poles.

u1,u2,u3,x1,x2,x3 = var('u1,u2,u3,x1,x2,x3')  #symbolic variables 
f=1/((u1*u2*u3 - x1*x2*x3)*(u1*u2*u3 - 1)*(u1*u2 - x1*x2)*(u1*u2 - 1)*(u1 - x1)*(u1 - 1))
fden=f.denominator() #denominator of f
list1=fden.roots(u1)    #poles of u1
[root for (root, multiplicity) in list1] #list of roots

The output is

[x1*x2*x3/(u2*u3), x1*x2/u2, x1, 1/(u2*u3), 1/u2, 1]

Then we choose those roots that have $x1$

poles1 = [x1*x2*x3/(u2*u3), x1*x2/u2, x1] #choose those that have x1

Finally, we find the residue of $f$ w.r.t $u1$ of the rational function at the poles containing $x1.$

ans1=0
for ff in poles1:
   tmp=f.residue(u1==ff)
   ans1+=tmp     #ans1 is the residue of f w.r.t u1 at all the poles containing x1
ans1

The output is then

1/((u2*u3*x1 - x1*x2*x3)*(u2*u3*x1 - 1)*(u2*x1 - x1*x2)*(u2*x1 - 1)*(x1 - 1)) - 1/((u3*x1*x2 - x1*x2*x3)*(u3*x1*x2 - 1)* (x1*x2 - 1)*u2*(x1 - x1*x2/u2)*(x1*x2/u2 - 1)) + 1/((x1*x2*x3 - 1)*(x1*x2 - x1*x2*x3/u3)*(x1*x2*x3/u3 - 1)*u2*u3*(x1 x1*x2*x3/(u2*u3))*(x1*x2*x3/(u2*u3) - 1))

Then I replace $f$ with $ans1$ to continue to do the same process w.r.t $u2$ and poles containing $x2$ and finally w.r.t $u3$ and poles containing $x3.$ However, this consumes about 800GB of memory on an HPC when I feed it a larger rational function.

Is there a way to find

  1. roots of multivariable polynomials with respect to one variable?

  2. residue of a rational function avoiding symbolic variables?

Both .roots() and .residue() are not defined for rational functions that are not defined in terms of symbolic variables.

2018-03-16 23:16:03 +0200 commented answer Representation as sums of squares built-in function

@slelievre, cool. Thanks.

2016-02-27 15:58:07 +0200 commented answer Representation as sums of squares built-in function

@slelievre, thank you so much. I installed mathematica 10.3(latest issue) and was not able to call mathematica even if I followed all the instructions on how to use mathematica within sage. From what I read around the web, I have to downgrade to version 8 to be able to interface to mathematica from within Sage. Is that true or am I missing something with integrating version 10.3?

2016-02-24 00:59:14 +0200 commented answer calling mathematica 9.0 in sage

@Emmanuel, is there a follow up to your answer? I have Mathematica 10.3 and I have the following error "unable to start mathematica"

2016-02-23 23:20:46 +0200 marked best answer Representation as sums of squares built-in function

Is there a Sage implementation of writing a number as a sum of k squares for any k as described in the ticket here: trac.sagemath.org/ticket/16308 ?

Thank you!

Please see my comment below the first answer.