pub struct ModalInstanceTerm {
pub mor: ModalMor,
pub base: ModalInstanceBase,
}Expand description
A term in an instance of a modal double model: a single model morphism applied to a base built from instance generators.
As in the discrete case, composition of model morphisms is reflected
inside mor itself — via ModalMor::Composite for
sequential composition and ModalMor::List for list-tupling — rather
than by nesting term constructors. A tree-shaped multicategory composite
such as f([g(x), y]) therefore normalizes to one ModalMor applied
once to a base of bare generators; applications never nest. When mor
is the identity (ModalMor::Composite(Path::Id(ob))), the term denotes
base directly, and that Id object must agree with the fiber of base
in the surrounding instance.
The only recursion that survives lives in base, through
ModalInstanceBase::List (mirroring ModalOb::List) and
ModalInstanceBase::ObApp (mirroring ModalOb::App): this is what
lets a generator over a nested list object be written inline as e.g.
[x, y], or an element of a product object as @tensor [x, y]. A base
holds only generators, lists, and object-operation applications — never a
morphism — so the “no application inside an application” invariant is
enforced structurally.
Fields§
§mor: ModalMorModel morphism applied to base.
base: ModalInstanceBaseThe base of instance generators at the root of the term.
Trait Implementations§
Source§impl Clone for ModalInstanceTerm
impl Clone for ModalInstanceTerm
Source§fn clone(&self) -> ModalInstanceTerm
fn clone(&self) -> ModalInstanceTerm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModalInstanceTerm
impl Debug for ModalInstanceTerm
Source§impl InstanceTerm for ModalInstanceTerm
impl InstanceTerm for ModalInstanceTerm
Source§impl PartialEq for ModalInstanceTerm
impl PartialEq for ModalInstanceTerm
impl Eq for ModalInstanceTerm
impl StructuralPartialEq for ModalInstanceTerm
Auto Trait Implementations§
impl Freeze for ModalInstanceTerm
impl RefUnwindSafe for ModalInstanceTerm
impl Send for ModalInstanceTerm
impl Sync for ModalInstanceTerm
impl Unpin for ModalInstanceTerm
impl UnwindSafe for ModalInstanceTerm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.