RepresentationName
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
RepresentationName
class RepresentationNameA representation identity independent of its dimension.
Obtain this read-only metadata through Representation.name. It distinguishes self-dual spaces from the two partners of a dualizable space.
Examples
from symbolica.community.tensor import Representation
identity = Representation.mink(4).name
identity.duality
'self-dual'Attributes
| Name | Description |
|---|---|
duality |
How this representation pairs with another space. |
name |
The exact registered name of the representation. |
duality
RepresentationName.duality: builtins.strHow this representation pairs with another space.
Returns
strOne of “self-dual”, “base”, or “dual”.
Examples
from symbolica.community.tensor import Representation
identity = Representation.mink(4).name
identity.duality
'self-dual'name
RepresentationName.name: builtins.strThe exact registered name of the representation.
Returns
strName without dimension or index arguments.
Examples
from symbolica.community.tensor import Representation
identity = Representation.mink(4).name
name = identity.nameMethods
| Name | Description |
|---|---|
__eq__ |
|
__repr__ |
Return a readable object description for inspection. |
__str__ |
Return a readable text representation. |
_repr_html_ |
|
dual |
Return the dimension-independent identity of the paired space. |
metric_sign |
Return the sign of the canonical pairing at a component coordinate. |
to_html |
Render a compact HTML view of this tensor metadata. |
__eq__
RepresentationName.__eq__(other: builtins.object) -> builtins.bool__repr__
RepresentationName.__repr__() -> builtins.strReturn a readable object description for inspection.
Examples
from symbolica.community import tensor as sp
name = sp.Representation.mink(4).name
text = repr(name)__str__
RepresentationName.__str__() -> builtins.strReturn a readable text representation.
Examples
from symbolica.community import tensor as sp
name = sp.Representation.mink(4).name
text = str(name)_repr_html_
RepresentationName._repr_html_() -> builtins.strdual
RepresentationName.dual() -> RepresentationNameReturn the dimension-independent identity of the paired space.
Returns
RepresentationNameThe same identity for a self-dual space; the dual partner otherwise.
Examples
from symbolica.community.tensor import Representation
identity = Representation.cof(3).name
identity.dual().dual() == identity
Truemetric_sign
RepresentationName.metric_sign(index: builtins.int) -> builtins.intReturn the sign of the canonical pairing at a component coordinate.
Parameters
index(int) Nonnegative component coordinate. This identity has no dimension, so the coordinate is not checked against a particular tensor shape.
Returns
int+1 or -1. In Minkowski space, zero gives +1 and spatial coordinates -1.
Examples
from symbolica.community.tensor import Representation
metric = Representation.mink(4).name
[metric.metric_sign(i) for i in range(4)]
[1, -1, -1, -1]to_html
RepresentationName.to_html() -> builtins.strRender a compact HTML view of this tensor metadata.
Returns
strHTML fragment for display in a notebook or page.
Examples
from symbolica.community.tensor import Representation
value = Representation.mink(4).name
html = value.to_html()