jacopy.packages.metric_affine.InverseMetricComponent

class jacopy.packages.metric_affine.InverseMetricComponent(metric_name, first, second, *, bundle=None)

Bases: Atom

g^{ab} — a component of the inverse metric on a frame; a scalar function. Symmetric: the factory inverse_metric_component() canonicalizes the index order. Its DEFINING property is the contraction Σ_s g^{as}·g(e_s, e_c) = δ^a_c (MetricInverseContractionDefinition), well-posed by the metric’s definitional non-degeneracy.

Parameters:
__init__(metric_name, first, second, *, bundle=None)
Parameters:
Return type:

None

Methods

__init__(metric_name, first, second, *[, bundle])

clone()

Return self.

find(predicate)

Yield descendants (including self) satisfying predicate.

replace_at(path, new)

Return a new tree with new spliced at path.

substitute_atom(dummy, target)

Return self with every occurrence of dummy replaced by target.

walk()

Pre-order traversal yielding self followed by descendants through children only.

Attributes

bundle

children

Tuple of immediate children.

degree

index_names

is_atom

metric_name

upper

substitute_atom(dummy, target)

Return self with every occurrence of dummy replaced by target.

dummy must be an Atom. The default implementation does the obvious top-level match, then recurses through children(). Atoms that hide a sub-atom inside a private slot (e.g. a frame vector field carrying a FrameIndex) override this method to expose that hidden state for substitution. Binders that introduce their own dummy (notably IndexedSum) override to respect shadowing.

Parameters:
Return type:

Expr