RepresentationName

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

RepresentationName

class RepresentationName

A 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.str

How this representation pairs with another space.

Returns

  • str One 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.str

The exact registered name of the representation.

Returns

  • str Name without dimension or index arguments.

Examples

from symbolica.community.tensor import Representation
identity = Representation.mink(4).name
name = identity.name

Methods

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.str

Return 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.str

Return 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.str

dual

RepresentationName.dual() -> RepresentationName

Return the dimension-independent identity of the paired space.

Returns

  • RepresentationName The 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
True

metric_sign

RepresentationName.metric_sign(index: builtins.int) -> builtins.int

Return 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.str

Render a compact HTML view of this tensor metadata.

Returns

  • str HTML fragment for display in a notebook or page.

Examples

from symbolica.community.tensor import Representation
value = Representation.mink(4).name
html = value.to_html()