[sage-devel] Re: conventions about X.Graded() categories

2022-03-14 Thread 'Travis Scrimshaw' via sage-devel
Hi Vincent,
 

> - how do we specify the grading semi-ring on parents? 


Right now we only have graded modules (and hence algebras as well), not for 
(semi-)rings. So for what you want, you might have to implement these 
categories using the functorial construction (and it would be good to also 
do the filtered versions too). Unfortunately I don't know of a good way 
immediately to share the code between these categories, but there might be 
some nice way to do it with inheritance.
 

> - how do we access the homogenous components on elements? 
>

Here is an example for what you are after I believe:

sage: s = SymmetricFunctions(QQ).s()
sage: x = s.an_element(); x
2*s[] + 2*s[1] + 3*s[2]
sage: x.homogeneous_component(2)
3*s[2]
sage: x.homogeneous_component(1)
2*s[1]

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ba327aaa-103e-4bfb-95dd-c453b077fa1en%40googlegroups.com.


[sage-devel] Re: spherical harmonics still broken in 9.5.beta8

2022-03-14 Thread Eric Gourgoulhon
Hi, 

The branch of the ticket https://trac.sagemath.org/ticket/33117 has been 
merged in Sage 9.6.beta5, so in Sage 9.6 spherical harmonics will agree 
with those of SymPy, SciPy, Mathematica and Wikipedia, and will have 
correct derivatives. There remains the issue of simplifying some 
sqrt(sin(theta)^2) terms which appear for odd orders m. This is now 
https://trac.sagemath.org/ticket/33501.

Eric.


Le mercredi 5 janvier 2022 à 09:14:23 UTC+1, Eric Gourgoulhon a écrit :

> Le mercredi 5 janvier 2022 à 08:27:56 UTC+1, Eric Gourgoulhon a écrit :
>
>>
>> Actually, the difference between the two results is essentially due to a 
>> different convention in the Condon-Shortley phase
>> (cf. 
>> https://en.wikipedia.org/wiki/Spherical_harmonics#Condon%E2%80%93Shortley_phase
>> ),
>> which makes Sage's spherical harmonics Y_l^m differ from Wikipedia and 
>> Mathematica ones by a factor (-1)^m.
>> The other difference in the above example is a lack of simplification of 
>> sqrt(sin(theta)^2). 
>>
>> I would vote for including the Condon-Shortley phase in Sage's spherical 
>> harmonics, since this is standard in quantum mechanics and this would make 
>> Sage agree with Wikipedia and Mathematica. 
>>
>
> I've opened 
> https://trac.sagemath.org/ticket/33117
> for this. 
>
> In doing so,  I've noticed that current Sage's spherical harmonics 
> disagree with SymPy as well.  
> I've also found  a very serious bug in the computation of derivatives of 
> spherical harmonics (see the ticket for details). This has not been seen 
> earlier probably because before https://trac.sagemath.org/ticket/25034 
> (merged in Sage 9.3), spherical harmonics were basically not usable in 
> Sage. 
>
> Eric.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/3034012d-c5a8-4626-99a1-9944fc264234n%40googlegroups.com.


[sage-devel] Re: %lsmagic broken in sage interpreter

2022-03-14 Thread Emmanuel Charpentier
That's Trac#30661 ...

HTH,

Le dimanche 13 mars 2022 à 18:14:48 UTC+1, Eric Gourgoulhon a écrit :

> This is https://trac.sagemath.org/ticket/30661
>
> A workaround is 
> sage: %display unicode_art# actually anything but plain
> sage: %lsmagic
>
> Eric.
>
> Le dimanche 13 mars 2022 à 10:57:50 UTC+1, vdelecroix a écrit :
>
>> Dear all, 
>>
>> The IPython magic %lsmagic is supposed to list the available 
>> magic functions. However, this does not seem to work within 
>> the sage interpreter 
>>
>> $ sage -ipython 
>> [1]: %lsmagic 
>> Available line magics: 
>> %alias %alias_magic %autoawait ... 
>>
>> But 
>>
>> $ sage 
>> sage: %lsmagic 
>>  
>>
>> Any idea on what is going wrong? 
>>
>> Vincent 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/52d3b52c-89f7-4e34-a7fc-7a5f3afea905n%40googlegroups.com.


[sage-devel] conventions about X.Graded() categories

2022-03-14 Thread Vincent Delecroix

Dear all,

While fixing #33499 I wanted to implement a generic version at the level
of categories (namely inside graded algebras). However, I did not find a
place with the specifications of the Graded axiom... In particular
- how do we specify the grading semi-ring on parents?
- how do we access the homogenous components on elements?

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/329a0c0c-70e7-ef2c-7456-cbc1074073fd%40gmail.com.