pub struct ModalDblTheory<Id, S = RandomState> { /* private fields */ }
Expand description
A modal double theory.
Implementations§
Source§impl<Id, S> ModalDblTheory<Id, S>
impl<Id, S> ModalDblTheory<Id, S>
Sourcepub fn add_ob_type(&mut self, id: Id)
pub fn add_ob_type(&mut self, id: Id)
Adds a generating object type to the theory.
Sourcepub fn add_mor_type(
&mut self,
id: Id,
src: ModalObType<Id>,
tgt: ModalObType<Id>,
)
pub fn add_mor_type( &mut self, id: Id, src: ModalObType<Id>, tgt: ModalObType<Id>, )
Adds a generating morphism type to the theory.
Sourcepub fn add_ob_op(&mut self, id: Id, dom: ModalObType<Id>, cod: ModalObType<Id>)
pub fn add_ob_op(&mut self, id: Id, dom: ModalObType<Id>, cod: ModalObType<Id>)
Adds a generating object operation to the theory.
Sourcepub fn add_mor_op(
&mut self,
id: Id,
dom: Path<ModalObType<Id>, ModalMorType<Id>>,
cod: ModalMorType<Id>,
src: ModalObOp<Id>,
tgt: ModalObOp<Id>,
)
pub fn add_mor_op( &mut self, id: Id, dom: Path<ModalObType<Id>, ModalMorType<Id>>, cod: ModalMorType<Id>, src: ModalObOp<Id>, tgt: ModalObOp<Id>, )
Adds a generating morphism operation to the theory.
Sourcepub fn add_special_mor_op(
&mut self,
id: Id,
src: ModalObOp<Id>,
tgt: ModalObOp<Id>,
)
pub fn add_special_mor_op( &mut self, id: Id, src: ModalObOp<Id>, tgt: ModalObOp<Id>, )
Adds a morphism operation with nullary domain and unit codomain.
Sourcepub fn equate_ob_ops(&mut self, lhs: ModalObOp<Id>, rhs: ModalObOp<Id>)
pub fn equate_ob_ops(&mut self, lhs: ModalObOp<Id>, rhs: ModalObOp<Id>)
Equate two object operations in the theory.
Trait Implementations§
Source§impl<Id: Default, S: Default> Default for ModalDblTheory<Id, S>
impl<Id: Default, S: Default> Default for ModalDblTheory<Id, S>
Source§fn default() -> ModalDblTheory<Id, S>
fn default() -> ModalDblTheory<Id, S>
Returns the “default value” for a type. Read more
Source§impl<Id, S> VDCWithComposites for ModalDblTheory<Id, S>
impl<Id, S> VDCWithComposites for ModalDblTheory<Id, S>
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§impl<Id, S> VDblCategory for ModalDblTheory<Id, S>
impl<Id, S> VDblCategory for ModalDblTheory<Id, S>
Source§type Arr = Path<ModeApp<Id>, ModeApp<ModalOp<Id>>>
type Arr = Path<ModeApp<Id>, ModeApp<ModalOp<Id>>>
Type of arrows (tight morphisms) in the VDC.
Source§type Pro = ShortPath<ModeApp<Id>, ModeApp<Id>>
type Pro = ShortPath<ModeApp<Id>, ModeApp<Id>>
Type of proarrows (loose morphisms) in the VDC.
Source§type Cell = DblTree<Path<ModeApp<Id>, ModeApp<ModalOp<Id>>>, ShortPath<ModeApp<Id>, ModeApp<Id>>, ModalNode<Id>>
type Cell = DblTree<Path<ModeApp<Id>, ModeApp<ModalOp<Id>>>, ShortPath<ModeApp<Id>, ModeApp<Id>>, ModalNode<Id>>
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<Id, S> Validate for ModalDblTheory<Id, S>
impl<Id, S> Validate for ModalDblTheory<Id, S>
Source§type ValidationError = InvalidDblTheory<Id>
type ValidationError = InvalidDblTheory<Id>
The type of a validation error. Read more
Auto Trait Implementations§
impl<Id, S> Freeze for ModalDblTheory<Id, S>where
S: Freeze,
impl<Id, S> RefUnwindSafe for ModalDblTheory<Id, S>where
S: RefUnwindSafe,
Id: RefUnwindSafe,
impl<Id, S> Send for ModalDblTheory<Id, S>
impl<Id, S> Sync for ModalDblTheory<Id, S>
impl<Id, S> Unpin for ModalDblTheory<Id, S>
impl<Id, S> UnwindSafe for ModalDblTheory<Id, S>where
Id: UnwindSafe,
S: 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
Source§impl<VDC> DblTheory for VDCwhere
VDC: VDCWithComposites,
impl<VDC> DblTheory for VDCwhere
VDC: VDCWithComposites,
Source§type MorType = <VDC as VDblCategory>::Pro
type MorType = <VDC as VDblCategory>::Pro
Rust type of morphism types in the theory. Read more
Source§type ObOp = <VDC as VDblCategory>::Arr
type ObOp = <VDC as VDblCategory>::Arr
Rust type of operations on objects in the double theory. Read more
Source§type MorOp = <VDC as VDblCategory>::Cell
type MorOp = <VDC as VDblCategory>::Cell
Rust type of operations on morphisms in the double theory. Read more
Source§fn has_ob_type(&self, x: &<VDC as DblTheory>::ObType) -> bool
fn has_ob_type(&self, x: &<VDC as DblTheory>::ObType) -> bool
Does the object type belong to the theory?
Source§fn has_mor_type(&self, m: &<VDC as DblTheory>::MorType) -> bool
fn has_mor_type(&self, m: &<VDC as DblTheory>::MorType) -> bool
Does the morphism type belong to the theory?
Source§fn has_ob_op(&self, f: &<VDC as DblTheory>::ObOp) -> bool
fn has_ob_op(&self, f: &<VDC as DblTheory>::ObOp) -> bool
Does the object operation belong to the theory?
Source§fn has_mor_op(&self, α: &<VDC as DblTheory>::MorOp) -> bool
fn has_mor_op(&self, α: &<VDC as DblTheory>::MorOp) -> bool
Does the morphism operation belong to the theory?
Source§fn src_type(
&self,
m: &<VDC as DblTheory>::MorType,
) -> <VDC as DblTheory>::ObType
fn src_type( &self, m: &<VDC as DblTheory>::MorType, ) -> <VDC as DblTheory>::ObType
Source of a morphism type.
Source§fn tgt_type(
&self,
m: &<VDC as DblTheory>::MorType,
) -> <VDC as DblTheory>::ObType
fn tgt_type( &self, m: &<VDC as DblTheory>::MorType, ) -> <VDC as DblTheory>::ObType
Target of a morphism type.
Source§fn ob_op_dom(&self, f: &<VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::ObType
fn ob_op_dom(&self, f: &<VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::ObType
Domain of an operation on objects.
Source§fn ob_op_cod(&self, f: &<VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::ObType
fn ob_op_cod(&self, f: &<VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::ObType
Codomain of an operation on objects.
Source§fn src_op(&self, α: &<VDC as DblTheory>::MorOp) -> <VDC as DblTheory>::ObOp
fn src_op(&self, α: &<VDC as DblTheory>::MorOp) -> <VDC as DblTheory>::ObOp
Source operation of an operation on morphisms.
Source§fn tgt_op(&self, α: &<VDC as DblTheory>::MorOp) -> <VDC as DblTheory>::ObOp
fn tgt_op(&self, α: &<VDC as DblTheory>::MorOp) -> <VDC as DblTheory>::ObOp
Target operation of an operation on morphisms.
Source§fn mor_op_dom(
&self,
α: &<VDC as DblTheory>::MorOp,
) -> Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::MorType>
fn mor_op_dom( &self, α: &<VDC as DblTheory>::MorOp, ) -> Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::MorType>
Domain of an operation on morphisms, a path of morphism types.
Source§fn mor_op_cod(
&self,
α: &<VDC as DblTheory>::MorOp,
) -> <VDC as DblTheory>::MorType
fn mor_op_cod( &self, α: &<VDC as DblTheory>::MorOp, ) -> <VDC as DblTheory>::MorType
Codomain of an operation on morphisms, a single morphism type.
Source§fn compose_types(
&self,
path: Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::MorType>,
) -> Option<<VDC as DblTheory>::MorType>
fn compose_types( &self, path: Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::MorType>, ) -> Option<<VDC as DblTheory>::MorType>
Composes a sequence of morphism types, if they have a composite.
Source§fn hom_type(&self, x: <VDC as DblTheory>::ObType) -> <VDC as DblTheory>::MorType
fn hom_type(&self, x: <VDC as DblTheory>::ObType) -> <VDC as DblTheory>::MorType
Hom morphism type on an object type. Read more
Source§fn hom_op(&self, f: <VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::MorOp
fn hom_op(&self, f: <VDC as DblTheory>::ObOp) -> <VDC as DblTheory>::MorOp
Hom morphism operation on an object operation. Read more
Source§fn compose_ob_ops(
&self,
path: Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::ObOp>,
) -> <VDC as DblTheory>::ObOp
fn compose_ob_ops( &self, path: Path<<VDC as DblTheory>::ObType, <VDC as DblTheory>::ObOp>, ) -> <VDC as DblTheory>::ObOp
Compose a sequence of operations on objects.
Source§fn id_ob_op(&self, x: <VDC as DblTheory>::ObType) -> <VDC as DblTheory>::ObOp
fn id_ob_op(&self, x: <VDC as DblTheory>::ObType) -> <VDC as DblTheory>::ObOp
Identity operation on an object type. Read more
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<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.