pub struct ModalDblTheory<Kind> { /* private fields */ }Expand description
A modal double theory.
Implementations§
Source§impl<Kind> ModalDblTheory<Kind>
impl<Kind> ModalDblTheory<Kind>
Source§impl<Kind: DblTheoryKind> ModalDblTheory<Kind>
impl<Kind: DblTheoryKind> ModalDblTheory<Kind>
Sourcepub fn add_ob_type(&mut self, id: QualifiedName)
pub fn add_ob_type(&mut self, id: QualifiedName)
Adds a generating object type to the theory.
Sourcepub fn add_mor_type(
&mut self,
id: QualifiedName,
src: ModalObType,
tgt: ModalObType,
)
pub fn add_mor_type( &mut self, id: QualifiedName, src: ModalObType, tgt: ModalObType, )
Adds a generating morphism type to the theory.
Sourcepub fn add_ob_op(
&mut self,
id: QualifiedName,
dom: ModalObType,
cod: ModalObType,
)
pub fn add_ob_op( &mut self, id: QualifiedName, dom: ModalObType, cod: ModalObType, )
Adds a generating object operation to the theory.
Sourcepub fn add_mor_op(
&mut self,
id: QualifiedName,
dom: Path<ModalObType, ModalMorType>,
cod: ModalMorType,
src: ModalObOp,
tgt: ModalObOp,
)
pub fn add_mor_op( &mut self, id: QualifiedName, dom: Path<ModalObType, ModalMorType>, cod: ModalMorType, src: ModalObOp, tgt: ModalObOp, )
Adds a generating morphism operation to the theory.
Sourcepub fn add_globular_mor_op(
&mut self,
id: QualifiedName,
dom: Path<ModalObType, ModalMorType>,
cod: ModalMorType,
)
pub fn add_globular_mor_op( &mut self, id: QualifiedName, dom: Path<ModalObType, ModalMorType>, cod: ModalMorType, )
Adds a morphism operation with identity source and target.
Sourcepub fn add_special_mor_op(
&mut self,
id: QualifiedName,
src: ModalObOp,
tgt: ModalObOp,
)
pub fn add_special_mor_op( &mut self, id: QualifiedName, src: ModalObOp, tgt: ModalObOp, )
Adds a morphism operation with nullary domain and unit codomain.
Sourcepub fn equate_ob_ops(&mut self, lhs: ModalObOp, rhs: ModalObOp)
pub fn equate_ob_ops(&mut self, lhs: ModalObOp, rhs: ModalObOp)
Equate two object operations in the theory.
Sourcepub fn set_composite(
&mut self,
fst: ModalType,
snd: ModalType,
composite: ModalMorType,
)
pub fn set_composite( &mut self, fst: ModalType, snd: ModalType, composite: ModalMorType, )
Set composite of two basic morphism types.
Trait Implementations§
Source§impl<Kind: DblTheoryKind> DblTheory for ModalDblTheory<Kind>
impl<Kind: DblTheoryKind> DblTheory for ModalDblTheory<Kind>
Source§type ObType = <ModalDblTheory<Kind> as VDblCategory>::Ob
type ObType = <ModalDblTheory<Kind> as VDblCategory>::Ob
Rust type of object types in the theory. Read more
Source§type MorType = <ModalDblTheory<Kind> as VDblCategory>::Pro
type MorType = <ModalDblTheory<Kind> as VDblCategory>::Pro
Rust type of morphism types in the theory. Read more
Source§type ObOp = <ModalDblTheory<Kind> as VDblCategory>::Arr
type ObOp = <ModalDblTheory<Kind> as VDblCategory>::Arr
Rust type of operations on objects in the double theory. Read more
Source§type MorOp = <ModalDblTheory<Kind> as VDblCategory>::Cell
type MorOp = <ModalDblTheory<Kind> as VDblCategory>::Cell
Rust type of operations on morphisms in the double theory. Read more
Source§fn has_ob_type(&self, x: &Self::ObType) -> bool
fn has_ob_type(&self, x: &Self::ObType) -> bool
Does the object type belong to the theory?
Source§fn has_mor_type(&self, m: &Self::MorType) -> bool
fn has_mor_type(&self, m: &Self::MorType) -> bool
Does the morphism type belong to the theory?
Source§fn has_mor_op(&self, α: &Self::MorOp) -> bool
fn has_mor_op(&self, α: &Self::MorOp) -> bool
Does the morphism operation belong to the theory?
Source§fn src_op(&self, α: &Self::MorOp) -> Self::ObOp
fn src_op(&self, α: &Self::MorOp) -> Self::ObOp
Source operation of an operation on morphisms.
Source§fn tgt_op(&self, α: &Self::MorOp) -> Self::ObOp
fn tgt_op(&self, α: &Self::MorOp) -> Self::ObOp
Target operation of an operation on morphisms.
Source§fn mor_op_dom(&self, α: &Self::MorOp) -> Path<Self::ObType, Self::MorType>
fn mor_op_dom(&self, α: &Self::MorOp) -> Path<Self::ObType, Self::MorType>
Domain of an operation on morphisms, a path of morphism types.
Source§fn mor_op_cod(&self, α: &Self::MorOp) -> Self::MorType
fn mor_op_cod(&self, α: &Self::MorOp) -> Self::MorType
Codomain of an operation on morphisms, a single morphism type.
Source§fn compose_types(
&self,
path: Path<Self::ObType, Self::MorType>,
) -> Option<Self::MorType>
fn compose_types( &self, path: Path<Self::ObType, Self::MorType>, ) -> Option<Self::MorType>
Composes a sequence of morphism types, if they have a composite.
Source§fn hom_type(
&self,
x: Self::ObType,
) -> <Self::Kind as DblTheoryKind>::Wrap<Self::MorType>
fn hom_type( &self, x: Self::ObType, ) -> <Self::Kind as DblTheoryKind>::Wrap<Self::MorType>
Hom morphism type on an object type. Read more
Source§fn hom_op(
&self,
f: Self::ObOp,
) -> <Self::Kind as DblTheoryKind>::Wrap<Self::MorOp>
fn hom_op( &self, f: Self::ObOp, ) -> <Self::Kind as DblTheoryKind>::Wrap<Self::MorOp>
Hom morphism operation on an object operation. Read more
Source§fn compose_ob_ops(&self, path: Path<Self::ObType, Self::ObOp>) -> Self::ObOp
fn compose_ob_ops(&self, path: Path<Self::ObType, Self::ObOp>) -> Self::ObOp
Compose a sequence of operations on objects.
Source§fn compose_mor_ops(
&self,
tree: DblTree<Self::ObOp, Self::MorType, Self::MorOp>,
) -> Self::MorOp
fn compose_mor_ops( &self, tree: DblTree<Self::ObOp, Self::MorType, Self::MorOp>, ) -> Self::MorOp
Compose operations on morphisms.
Source§impl<Kind: Debug> Debug for ModalDblTheory<Kind>
impl<Kind: Debug> Debug for ModalDblTheory<Kind>
Source§impl<Kind> Default for ModalDblTheory<Kind>
impl<Kind> Default for ModalDblTheory<Kind>
Source§impl<Kind: DblTheoryKind> VDCWithComposites for ModalDblTheory<Kind>
impl<Kind: DblTheoryKind> VDCWithComposites for ModalDblTheory<Kind>
Source§fn composite_ext(&self, path: Path<Self::Ob, Self::Pro>) -> Option<Self::Cell>
fn composite_ext(&self, path: Path<Self::Ob, Self::Pro>) -> Option<Self::Cell>
Gets the chosen cell witnessing a composite of proarrows, if there is one. Read more
Source§fn composite(&self, path: Path<Self::Ob, Self::Pro>) -> Option<Self::Pro>
fn composite(&self, path: Path<Self::Ob, Self::Pro>) -> Option<Self::Pro>
Gets the chosen composite for a path of proarrows, if there is one. Read more
Source§fn through_composite(
&self,
_cell: Self::Cell,
_range: Range<usize>,
) -> Option<Self::Cell>
fn through_composite( &self, _cell: Self::Cell, _range: Range<usize>, ) -> Option<Self::Cell>
Factorizes a cell through a composite of proarrows. Read more
Source§fn has_composite(&self, path: &Path<Self::Ob, Self::Pro>) -> bool
fn has_composite(&self, path: &Path<Self::Ob, Self::Pro>) -> bool
Does the path of proarrows have a chosen composite? Read more
Source§fn composite2_ext(&self, m: Self::Pro, n: Self::Pro) -> Option<Self::Cell>
fn composite2_ext(&self, m: Self::Pro, n: Self::Pro) -> Option<Self::Cell>
Gets the chosen cell witnessing a composite of two proarrows, if there is one.
Source§fn composite2(&self, m: Self::Pro, n: Self::Pro) -> Option<Self::Pro>
fn composite2(&self, m: Self::Pro, n: Self::Pro) -> Option<Self::Pro>
Gets the chosen composite for a pair of consecutive proarrows, if there is one.
Source§fn unit_ext(&self, x: Self::Ob) -> Option<Self::Cell>
fn unit_ext(&self, x: Self::Ob) -> Option<Self::Cell>
Gets the chosen extension cell for an object, if there is one. Read more
Source§fn unit(&self, x: Self::Ob) -> Option<Self::Pro>
fn unit(&self, x: Self::Ob) -> Option<Self::Pro>
Gets the chosen unit for an object, if there is one. Read more
Source§impl<Kind: DblTheoryKind> VDblCategory for ModalDblTheory<Kind>
impl<Kind: DblTheoryKind> VDblCategory for ModalDblTheory<Kind>
Source§type Ob = ModeApp<QualifiedName>
type Ob = ModeApp<QualifiedName>
Type of objects in the VDC.
Source§type Arr = Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>
type Arr = Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>
Type of arrows (tight morphisms) in the VDC.
Source§type Pro = ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>
type Pro = ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>
Type of proarrows (loose morphisms) in the VDC.
Source§type Cell = DblTree<Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>, ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>, ModalNode>
type Cell = DblTree<Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>, ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>, ModalNode>
Type of cells in the VDC.
Source§fn has_proarrow(&self, m: &Self::Pro) -> bool
fn has_proarrow(&self, m: &Self::Pro) -> bool
Does the proarrow belong to the VDC?
Source§fn cell_dom(&self, tree: &Self::Cell) -> Path<Self::Ob, Self::Pro>
fn cell_dom(&self, tree: &Self::Cell) -> Path<Self::Ob, Self::Pro>
Gets the domain of a cell, a path of proarrows.
Source§fn cell_cod(&self, tree: &Self::Cell) -> Self::Pro
fn cell_cod(&self, tree: &Self::Cell) -> Self::Pro
Gets the codomain of a cell, a single proarrow.
Source§fn compose(&self, path: Path<Self::Ob, Self::Arr>) -> Self::Arr
fn compose(&self, path: Path<Self::Ob, Self::Arr>) -> Self::Arr
Composes a path of arrows in the VDC.
Source§fn compose_cells(
&self,
tree: DblTree<Self::Arr, Self::Pro, Self::Cell>,
) -> Self::Cell
fn compose_cells( &self, tree: DblTree<Self::Arr, Self::Pro, Self::Cell>, ) -> Self::Cell
Composes a tree of cells in the VDC.
Source§fn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr
fn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr
Composes a pair of arrows with compatible (co)domains.
Source§fn compose_cells2(
&self,
αs: impl IntoIterator<Item = Self::Cell>,
β: Self::Cell,
) -> Self::Cellwhere
Self: Sized,
fn compose_cells2(
&self,
αs: impl IntoIterator<Item = Self::Cell>,
β: Self::Cell,
) -> Self::Cellwhere
Self: Sized,
Composes a two-layer pasting of cells.
Source§impl<Kind: DblTheoryKind> Validate for ModalDblTheory<Kind>
impl<Kind: DblTheoryKind> Validate for ModalDblTheory<Kind>
Source§type ValidationError = InvalidDblTheory
type ValidationError = InvalidDblTheory
The type of a validation error. Read more
Auto Trait Implementations§
impl<Kind> Freeze for ModalDblTheory<Kind>
impl<Kind> RefUnwindSafe for ModalDblTheory<Kind>where
Kind: RefUnwindSafe,
impl<Kind> Send for ModalDblTheory<Kind>where
Kind: Send,
impl<Kind> Sync for ModalDblTheory<Kind>where
Kind: Sync,
impl<Kind> Unpin for ModalDblTheory<Kind>where
Kind: Unpin,
impl<Kind> UnwindSafe for ModalDblTheory<Kind>where
Kind: UnwindSafe,
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.