Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conjugation of powers of subscripted constants in mathematica #14

Open
joshkamm opened this issue Apr 1, 2022 · 2 comments
Open

Conjugation of powers of subscripted constants in mathematica #14

joshkamm opened this issue Apr 1, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@joshkamm
Copy link

joshkamm commented Apr 1, 2022

Description

Not sure if this is the right place to post about the SNEG library underlying this library but I didn't see a specific repository for it.

There seems to be a quirk in the low level manipulation of Dirac notation.

Here is a minimal reproducing code example which is a simpler version of the more complicated manipulation I was originally performing which got stuck simplifying.

Code example

<< "sneg-1.250/sneg.m"
snegrealconstants[c, Subscript[c, 1]]
conj[c*VACUUM]
conj[c*c*VACUUM]
conj[Subscript[c, 1]*VACUUM]
conj[Subscript[c, 1]*Subscript[c, 1]*VACUUM]

Output:
image

Expected behavior: SNEG recognizes a power of a subscripted constant like the other constant above

Actual behavior: SNEG appears to not recognize the power of a real constant containing a subscript.

Versions

Mathematica 13.0
SNEG 1.250

@joshkamm joshkamm added the bug Something isn't working label Apr 1, 2022
@rokzitko
Copy link
Owner

rokzitko commented Apr 4, 2022

I'll reply here, since there is indeed no separate repository for SNEG.
The best solution is to simply define the required properties:

snegnonopQ[Subscript[c, ___]] := True;
Conjugate[x : Subscript[c, ___]] ^= x;

The first line specifies that c with a subscript is not an operator, and the second one declares it to be a real quantity.

@rokzitko
Copy link
Owner

rokzitko commented Apr 19, 2022

Just for the record, there is now a github repo for sneg:
https://github.com/rokzitko/sneg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants