Ask Your Question

emiliocba's profile - activity

2019-06-08 06:01:24 -0500 marked best answer Simplify trigonometric expression

How can I do to obtain 0 in place of:

-1/2*sin(1/16*pi)*sin(3/16*pi)*sin(5/16*pi)*sin(7/16*pi) -
1/2*sin(1/8*pi)*sin(3/8*pi)*sin(5/8*pi)*sin(7/8*pi) -
1/2*sin(3/16*pi)*sin(9/16*pi)*sin(15/16*pi)*sin(21/16*pi) -
1/2*sin(5/16*pi)*sin(15/16*pi)*sin(25/16*pi)*sin(35/16*pi) -
1/2*sin(3/8*pi)*sin(9/8*pi)*sin(15/8*pi)*sin(21/8*pi) -
1/2*sin(7/16*pi)*sin(21/16*pi)*sin(35/16*pi)*sin(49/16*pi) -
1/2*sin(9/16*pi)*sin(27/16*pi)*sin(45/16*pi)*sin(63/16*pi) -
1/2*sin(5/8*pi)*sin(15/8*pi)*sin(25/8*pi)*sin(35/8*pi) -
1/2*sin(11/16*pi)*sin(33/16*pi)*sin(55/16*pi)*sin(77/16*pi) -
1/2*sin(13/16*pi)*sin(39/16*pi)*sin(65/16*pi)*sin(91/16*pi) -
1/2*sin(7/8*pi)*sin(21/8*pi)*sin(35/8*pi)*sin(49/8*pi) -
1/2*sin(15/16*pi)*sin(45/16*pi)*sin(75/16*pi)*sin(105/16*pi) +
1/2*cos(1/16*pi)*cos(3/16*pi)*cos(5/16*pi)*cos(7/16*pi) +
1/2*cos(1/8*pi)*cos(3/8*pi)*cos(5/8*pi)*cos(7/8*pi) +
1/2*cos(3/16*pi)*cos(9/16*pi)*cos(15/16*pi)*cos(21/16*pi) +
1/2*cos(5/16*pi)*cos(15/16*pi)*cos(25/16*pi)*cos(35/16*pi) +
1/2*cos(3/8*pi)*cos(9/8*pi)*cos(15/8*pi)*cos(21/8*pi) +
1/2*cos(7/16*pi)*cos(21/16*pi)*cos(35/16*pi)*cos(49/16*pi) +
1/2*cos(9/16*pi)*cos(27/16*pi)*cos(45/16*pi)*cos(63/16*pi) +
1/2*cos(5/8*pi)*cos(15/8*pi)*cos(25/8*pi)*cos(35/8*pi) +
1/2*cos(11/16*pi)*cos(33/16*pi)*cos(55/16*pi)*cos(77/16*pi) +
1/2*cos(13/16*pi)*cos(39/16*pi)*cos(65/16*pi)*cos(91/16*pi) +
1/2*cos(7/8*pi)*cos(21/8*pi)*cos(35/8*pi)*cos(49/8*pi) +
1/2*cos(15/16*pi)*cos(45/16*pi)*cos(75/16*pi)*cos(105/16*pi)
2019-04-08 17:25:46 -0500 received badge  Nice Question (source)
2019-04-08 11:21:31 -0500 commented answer Is SageManifolds adequate to work with homogeneous Riemannian manifolds?

Well, I could try to help with the mathematical background, but my program skills are pretty poor, so somebody should optimize every algorithm

2019-04-08 04:47:03 -0500 asked a question Is SageManifolds adequate to work with homogeneous Riemannian manifolds?

I have just discovered the SageManifolds Project, which computes several objects from differential geometry. I admit I haven't studied in details the tutorials, because before spending several hours doing that I want to be sure that it is going to help me in my purpose.

I want to compute the Riemann curvature tensor of compact homogeneous Riemannian manifolds. Roughly speaking, each of those spaces has the following ingredients:

  1. The differential manifold is given by $M=G/K$, where $G$ is a compact Lie group and $K$ is a closed subgroup of $G$.

  2. At the Lie algebra level, $\mathfrak{g} = \mathfrak{k} \oplus \mathfrak{p}$ with $\mathfrak{p}$ an $\textrm{Ad}(K)$-invariant subspace of $\mathfrak{g}$. The tangent space $T_{eK}G/K$ is naturally identified with $\mathfrak{p}$.

  3. An $\textrm{Ad}(K)$-invariant inner product $\langle \cdot,\cdot\rangle$ on $\mathfrak{p}$.

Thus, the Riemannian metric on $G/K$ is obtained by translating the inner product $\langle \cdot,\cdot\rangle$ on $T_{eK}G/K \simeq \mathfrak{p}$ to any $T_{gK}G/K$ by the map $xK\mapsto gxK$ (which becomes an isometry).

The main point with these spaces is that the whole geometry is determined by $\mathfrak g$ and $\langle\cdot,\cdot\rangle$, and it is not necessary to deal with charts.

In particular, one determines any curvature object (Riemann curvature tensor, Ricci tensor, Scalar curvature, etc) only at the point $eK$.

In most of the examples that I quickly see in the tutorials of SageManifolds begins by defining charts.

How can I work on a homogeneous Riemannian manifold without defining charts?

It would be very useful to count with a simple example, say $G=SU(2)$, $K={1}$, and the inner product on $\mathfrak p=\mathfrak g$ has orthonormal basis ${aX_1,bX_2,cX_3}$ where $a,b,c$ are positive numbers and $$ X_1 = \begin{bmatrix} i & 0 \newline 0 & -i \end{bmatrix}, \qquad X_2 = \begin{bmatrix} 0 & 1 \newline -1 & 0 \end{bmatrix}, \qquad X_3 = \begin{bmatrix} 0 & i \newline i & 0 \end{bmatrix}. $$

2019-03-28 04:59:39 -0500 received badge  Critic (source)
2018-09-22 02:49:29 -0500 received badge  Popular Question (source)
2017-12-18 16:15:28 -0500 received badge  Famous Question (source)
2017-12-18 16:15:28 -0500 received badge  Notable Question (source)
2017-12-18 16:15:28 -0500 received badge  Popular Question (source)
2017-12-12 12:40:33 -0500 received badge  Notable Question (source)
2017-12-12 12:40:33 -0500 received badge  Popular Question (source)
2017-06-22 04:16:06 -0500 received badge  Popular Question (source)
2017-05-07 11:02:54 -0500 received badge  Famous Question (source)
2016-11-20 12:16:14 -0500 received badge  Popular Question (source)
2016-10-10 14:35:21 -0500 received badge  Notable Question (source)
2016-10-10 14:35:21 -0500 received badge  Popular Question (source)
2016-04-16 09:06:05 -0500 commented question variable assumption

I tried to improve my question with an example. The reason of why do I want to do it is difficult and not necessary, since it is involved to calculations in ugly algebras.

2016-04-15 18:49:39 -0500 asked a question variable assumption

I have an expression in term of an independent variable $q$. Now, I would like to assume that $q$ is an arbitrary $14$-th root of unity (i.e. $q^{14}=1$).

It is not allow to evaluate in any primitive root of unity, say $\eta$, since the coefficients of my expression are in the $7$-th cyclotomic field (i.e. the field is generated by $\xi=e^{2\pi i/7}$), so $\eta$ is in the field.

I also tried with "assume(q^14==1)", but it didn't work.

How can I do?

Added after Bruno's comment: Here is an example. I have the expression

exp=q^16*xi^5 + (q^325-12*q^235)*xi^2.

where q is an independent variable and xi is the 7th-root of unity with least argument. In other words, I have an expression in terms of an independent variable q with coefficients in the 7-th cyclotomic field

K.<xi> = CyclotomicField(7)

Now, I want to assume that $q^{14}=1$, thus the resultant expression should be

q^2*xi^5 + (q^3-12*q^11)*xi^2

since $16\equiv 2\pmod {14}$, $325 \equiv 3\pmod {14}$ and $235\equiv 11\pmod {14}$.

How can I do that? Note that it is not sufficient to evaluate the expression in $q=$some primitive $14$-th root of unity, since $q$ can be $+1$ or $-1$.

Please, think that the expression have thousands of terms, so I cannot do it by hand as above.

2016-04-02 05:50:39 -0500 received badge  Famous Question (source)
2016-03-25 09:30:05 -0500 received badge  Famous Question (source)
2015-06-22 13:58:13 -0500 received badge  Notable Question (source)
2015-06-09 17:32:50 -0500 received badge  Notable Question (source)
2015-05-20 05:53:31 -0500 received badge  Editor (source)
2015-05-20 05:47:05 -0500 commented question Elements in the lattice $A_n$

None of them works since the vectors may have zero and negative coordinates.

2015-05-19 05:57:50 -0500 asked a question Elements in the lattice $A_n$

Sorry in advance if this is not the right place to ask this simple question.

As it is usual, $A_n ={ (a_1,\dots,a_{n+1}) \in\mathbb Z^{n+1}:a_1+\dots+a_{n+1}=0}$. Now we define the norm $$ \|(a_1,\dots,a_{n+1})\|:= \sum_{i:a_i>0} a_i. $$ I would like an algorithm with input $(n,k)$, that returns all elements in $A_n$ with norm equal to $k$.

For example, if $n=1$ then $(k,-k)$ and $(-k,k)$ are all the elements in $A_1$ with norm equal to $k$.

For $n=2$ and $k=2$, we have $(2,0,-2), (2,-1,-1), (2,-2,0), (1,1,-2), (1,-2,1), (0,2,-2), (0,-2,2), (-1,2,-1), (-1,-1,2), (-2,2,0), (-2,0,2)$.

2014-12-13 07:23:48 -0500 received badge  Nice Question (source)
2014-12-11 10:35:46 -0500 asked a question no method available for opening http localhost 8000 (second part)

I have exactly the same problem as in this question. It has an answer with two solutions:

  • install a web browser inside the VM,
  • punch port 8000 through to the host and use the host web browser.

I want to use the second option but I cannot understand it. Could somebody explain in detail the second option?

2014-12-07 04:03:07 -0500 received badge  Popular Question (source)
2014-06-28 20:15:45 -0500 marked best answer tuples with +-1

Is there a simple command that for any $n\in \mathbb N$ gives the list of all $n$-tuples with coefficients $\pm1$? Thus, the list has $2^m$ elements. Thanks.-.

2014-06-28 20:15:43 -0500 marked best answer several cartesian products

Hi,

I want to construct, given $m$ and $q$, the list of all vectors $v=(a_1,\dots,a_m)$ such that $0\leq a_1\leq \dots \leq a_m < q$. I tried to use "CartesianProducts" but I don't known how to iterate it $m$-times.

Thanks.-.

2014-06-28 20:15:12 -0500 marked best answer matrix and latex

I want to create a matrix with my results and then to obtain the output in latex code. However, the first column are natural number, and the second one are not integers, so I canĀ“t create a matrix with different inputs (Am I right?). How can I do?

2014-06-28 20:15:11 -0500 marked best answer save definitions

Hello,

I want to use save a definition in the interactive shell. For example, I define

sage: def F(m):
....:     return 2*m
....:

I put

sage: save(F,'function')

but it doesn't work. How can I do to save this definition and then load to work with it.

Thanks.-.

2014-06-28 20:15:09 -0500 marked best answer exponent of a prime

I am newbie in SAGE and here. My apologies for any mistake. This is an easy question.

Is there a command that for an integer $m$ and a prime number $p$ returns the exponent of $p$ in $m$?

If not, I would like if the following definition can be improved.

def exponent(p,m):
    v=m
    sol=0
    while v%p==0:
        v=v/p
        sol=sol+1
    return sol

Thanks.

2014-06-28 20:15:02 -0500 marked best answer save and load

I have an algorithm which has a list of size 10^6 as output. I would like to run this program in one fast computer and then to upload this list and work in my compute. Can I do this? Have I to save the list as text?

Thanks.-.

2014-06-28 20:14:51 -0500 marked best answer how to print the weight multiplicites in a column

I work with

D2=WeylCharacterRing("D2")

and I am interested in

D2(1,0).weight_multiplicities()
{(0, 1): 1, (1, 0): 1, (-1, 0): 1, (0, -1): 1}

I would like to have this result in a column. I tried as follows:

for a in D2(1,0).weight_multiplicities(): print a
(0, 1)
(1, 0)
(-1, 0)
(0, -1)

But now, I didn't have the multiplicities (the number after ":"). I would like to obtain

(0, 1): 1
(1, 0): 1
(-1, 0): 1
(0, -1):1

How can I do? Thanks.-.

2014-06-02 04:46:58 -0500 received badge  Good Question (source)
2014-05-08 02:38:29 -0500 received badge  Nice Question (source)