Ask Your Question

DBS's profile - activity

2020-07-26 02:48:22 +0200 received badge  Famous Question (source)
2020-04-12 23:15:59 +0200 received badge  Famous Question (source)
2018-07-12 17:36:03 +0200 received badge  Notable Question (source)
2018-05-05 20:43:10 +0200 received badge  Popular Question (source)
2018-05-05 20:43:10 +0200 received badge  Notable Question (source)
2017-12-26 21:08:21 +0200 received badge  Popular Question (source)
2017-01-07 17:39:48 +0200 received badge  Teacher (source)
2017-01-07 17:39:48 +0200 received badge  Self-Learner (source)
2016-05-21 23:09:10 +0200 answered a question How can I alter default local sage configuration?

I accepted the answer above. In the spirit of someone else having similar issue here is what worked for me. I found the sage documentation somewhat unclear.

I took the following steps:

  • Create a init.sage file in .sage folder (most likely located in home folder) with the following code in it. Use the code :
    from sage.misc.viewer import viewer
    viewer.browser('open -a /path to your_fav_browser/YOUR_FAV_BROWSER')
    where YOUR_FAV_BROWSER is the browser you want.

  • Add the code export SAGE_BROWSER="YOUR_FAV_BROWSER"

NOTE: I am assuming bash already knows the path to YOUR_FAV_BROWSER.

2016-05-19 21:42:45 +0200 commented answer How can I alter default local sage configuration?

Yes I did. when I try echo $SAGE_BROWSER I seem to get the right answer. but the problem still persists. Is there a sample init.sage file I can copy somewhere?

2016-05-17 00:35:25 +0200 commented answer How can I alter default local sage configuration?

Thank you. I didn't have an environment variable SAGE_BROWSER in my bash profile so I created one in my .bashrc file. However it still doesnt seem to implement it. Any ideas?

2016-05-16 01:27:01 +0200 commented answer How can I alter default local sage configuration?

Thank you! I am using sage in a linux system. In my home/.sage folder there seems to be no init.sage folder. What I have instead are the following folders: cache, db, gap, gp-expect.log, ipython, ipython-2.1.0, ipython-2.3.0, ipython-2.3.0.p0, ipython-3.0.0.p1, ipython-4.0.0, ipython_genutils-0.1.0, matplotlib-1.1.0, matplotlib-1.3.1, matplotlib-1.4.3, matplotlib-1.5.0, matplotlib-1.5.1, R, sage_notebook.sagenb, sage.txt, temp, tmp

2016-05-16 01:22:54 +0200 received badge  Supporter (source)
2016-05-13 03:52:52 +0200 asked a question How can I alter default local sage configuration?

I have installed sagemath on my computer. Now I would like to change some default configuration options. For example my default browser is Firefox but I would like sage to use Chrome. If possible I would also like to define default home directory on sage. I presume there is a configuration file....where can I find it?

Thanks in advance for your help!

2016-05-01 18:36:45 +0200 asked a question Plotting an inequality in 3D region

Ideally I would like to plot a region in 3D space which is defined by a bunch of inequalities. For example let us consider the region $R$ defined by $$ { (x,y, z): x \le 0 \text{ and } y \le 0 \text{ and } x+y \le z } $$.

I am wondering what would be an easier way to do it.

With my limited knowledge I came up with these two approaches.

Approach 1 : Generate points in this region and plot them in 3D. Is there a way to extend the function in region_plot () that generates plot points for my needs?

Approach 2 : Concatenate implicit -3D plots of functions of the form $ x + y - (z+t) $, where $t$ is a small positive parameter, for different values of $t$. Then plot all these simultaneously.

I would appreciate any alternate way to do this or any improvements on these approaches.
Thank you for your time in advance.

2016-03-04 04:58:09 +0200 commented question Sage: christoffel symbol calculation issue, help...

In Python, which is the underlying base language of sage code block is determined by indentation. In your case the return statement should be at the same level (same column) as the for statement.

2016-03-02 22:22:44 +0200 commented answer Sage Live CD USB

The links seem broken today -in 2016. Is there any place that discusses a live USB sage installation?

2016-03-02 00:59:18 +0200 commented answer An issue with Root systems in sage

I didn't remember seeing the methods .to_ambient and to_vector in the documentation on Weyl Group/ root space realizations etc. It is probably because I was looking at the wrong places. Can you suggest where I should be looking?

2016-03-01 15:47:57 +0200 commented answer An issue with Root systems in sage

Thank you this helps me a lot!

2016-03-01 15:43:36 +0200 received badge  Scholar (source)
2016-02-28 22:25:35 +0200 commented answer An issue with Root systems in sage

This solves part of my problem. The other part is how can I simultaneously check id weyl group action on a simple root makes it positive or negative. The issue is if I redefine Weyl group in term of root lattice again I cannot make it operate on weight lattice.

2016-02-28 14:50:27 +0200 commented answer An issue with Root systems in sage

Thank you for your answer. But there is a problem with this approach. I have edited the question accordingly!

2016-02-28 04:56:35 +0200 received badge  Editor (source)
2016-02-28 04:45:10 +0200 asked a question An issue with Root systems in sage

Here is a problem that I cannot seem to understand.

R=RootSystem(['A', 2])
The output we get is as follows:

F=Finite family {1: (1, 0, 0), 2: (1, 1, 0)}
D=Finite family {1: (1, -1, 0), 2: (0, 1, -1)}
The issue is the root lattice is contained in the weight lattice but clearly D[2] is not contained in the lattice generated by F. Perhaps I am missing something simple.

I need to write a program I would need the weyl group action on some weights and roots at the same time. How can this be done? Thank you for your time in advance.

EDIT: Consider now the Weyl group action on weight lattice. We will continue using the notations above.

W= R.ambient_space(). weyl_group()
S= W.gens()
s1, s2= S
Gives an output
ValueError                                Traceback (most recent call last)
<ipython-input-12-4b0b8fd74264> in <module>()
---- 1 s1.action(F[Integer(1)])

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/combinat/root_system/weyl_group.pyc in action(self, v) 843 """ 844 if v not in self.domain(): --> 845 raise ValueError("{} is not in the domain".format(v)) 846 return self.domain().from_vector(self.__matrixv.to_vector()) 847 ValueError: Lambda[1] is not in the domain

The only way I have been able to make it work is that

L = R. weight_lattice()
f= L.to_ambient_space-morphism()
This is what I can get but the problem is s2
f(F[2]) = (0,0,1). So we are in a situation of the original problem again. I need to calculate the Weyl group action on the fundamental weights. If there is a better way to do it I would like to know.

2016-02-23 17:29:00 +0200 received badge  Student (source)
2016-02-22 18:35:49 +0200 asked a question Decomposing a Root vector into simple roots

Is there a sage functions which does the following:

Input = Root System / Ambient Lattice or Ambient space of irreducible (or even classical) Root System and a Root vector $v$

Output = a list containing the integers which expresses $v$ as a linear combination of simple roots.

Thank you for your help.