-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
sage.tensor: Canonicalize sym, antisym #34451
Comments
Author: Matthias Koeppe |
New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:4
Thanks for introducing this and removing the code duplication! It would useful to add - if len(isym) < 2:
- raise IndexError("at least two index positions must be " +
- "provided to define a symmetry")
+ if len(isym) < 2:
+ # Drop trivial symmetry
+ continue Shouldn't an error be raised if the input pretends to define a symmetry/antisymmetry with less than 2 index positions? |
comment:5
In this version of this code:
... the trivial symmetries were dropped silently. I suppose I can add a parameter |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Replying to @mkoeppe:
True...
I am wondering about what should be meant by trivial symmetry, especially for an antisymmetry: if only a single index position is provided, is there any meaning in stating that the components are antisymmetric with respect to this position? New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @egourgoulhon:
One index (whether symmetry or antisymmetry) just means that there's a symmetry group of 1 element acting. This element is the identity |
comment:13
I ran into this, by the way, using |
comment:14
I've worked a bit more on the branch and have removed some more code duplication. Ready for another look |
comment:15
Replying to @mkoeppe:
Thanks for the explanation. I see now: since the signature of the identity is +1, this makes sense. |
comment:16
Replying to @mkoeppe:
Indeed! |
comment:17
OK, I'll revert it |
comment:19
Done |
comment:20
Replying to @mkoeppe:
Thanks! |
Reviewer: Eric Gourgoulhon |
comment:21
There is actually an error (sequel of an old piece of code) in
is undefined. Same issue a few lines lower. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:25
Nice refactoring! |
comment:26
Thanks! |
Changed branch from u/mkoeppe/sage_tensor__canonicalize_sym__antisym to |
for #30229.
The new static method
CompWithSym._canonicalize_sym_antisym
bringssym
andantisym
into a canonical form as sorted tuples of sorted tuples, with trivial symmetries and antisymmetries dropped.Using it also removes some code duplication.
CC: @egourgoulhon
Component: linear algebra
Author: Matthias Koeppe
Branch/Commit:
66009e7
Reviewer: Eric Gourgoulhon
Issue created by migration from https://trac.sagemath.org/ticket/34451
The text was updated successfully, but these errors were encountered: