pub struct DiscreteDblTheory<Cat: FgCategory>(/* private fields */);
Expand description
A discrete double theory.
A discrete double theory is a double theory with no nontrivial operations on either object or morphism types. Viewed as a double category, such a theory is indeed discrete, which can equivalently be defined as
- a discrete object in the 2-category of double categories
- a double category whose underlying categories are both discrete categories
Trait Implementations§
Source§impl<Cat: Debug + FgCategory> Debug for DiscreteDblTheory<Cat>
impl<Cat: Debug + FgCategory> Debug for DiscreteDblTheory<Cat>
Source§impl<Cat: FgCategory> From<Cat> for DiscreteDblTheory<Cat>
impl<Cat: FgCategory> From<Cat> for DiscreteDblTheory<Cat>
Source§impl<Cat: FgCategory> RefCast for DiscreteDblTheory<Cat>
impl<Cat: FgCategory> RefCast for DiscreteDblTheory<Cat>
Source§impl<C: FgCategory> VDCWithComposites for DiscreteDblTheory<C>
impl<C: FgCategory> VDCWithComposites for DiscreteDblTheory<C>
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>
In a discrete double theory, every cell is an extension.
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,
path: Self::Cell,
range: Range<usize>,
) -> Option<Self::Cell>
fn through_composite( &self, path: 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<C: FgCategory> VDblCategory for DiscreteDblTheory<C>
impl<C: FgCategory> VDblCategory for DiscreteDblTheory<C>
Source§fn has_proarrow(&self, pro: &Self::Pro) -> bool
fn has_proarrow(&self, pro: &Self::Pro) -> bool
Does the proarrow belong to the VDC?
Source§fn cell_dom(&self, path: &Self::Cell) -> Path<Self::Ob, Self::Pro>
fn cell_dom(&self, path: &Self::Cell) -> Path<Self::Ob, Self::Pro>
Gets the domain of a cell, a path of proarrows.
Source§fn cell_cod(&self, path: &Self::Cell) -> Self::Pro
fn cell_cod(&self, path: &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::Cell
fn compose_cells2( &self, αs: impl IntoIterator<Item = Self::Cell>, β: Self::Cell, ) -> Self::Cell
Composes a two-layer pasting of cells.
Source§impl<C: FgCategory + Validate> Validate for DiscreteDblTheory<C>
impl<C: FgCategory + Validate> Validate for DiscreteDblTheory<C>
Source§type ValidationError = <C as Validate>::ValidationError
type ValidationError = <C as Validate>::ValidationError
The type of a validation error. Read more
Auto Trait Implementations§
impl<Cat> Freeze for DiscreteDblTheory<Cat>where
Cat: Freeze,
impl<Cat> RefUnwindSafe for DiscreteDblTheory<Cat>where
Cat: RefUnwindSafe,
impl<Cat> Send for DiscreteDblTheory<Cat>where
Cat: Send,
impl<Cat> Sync for DiscreteDblTheory<Cat>where
Cat: Sync,
impl<Cat> Unpin for DiscreteDblTheory<Cat>where
Cat: Unpin,
impl<Cat> UnwindSafe for DiscreteDblTheory<Cat>where
Cat: 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.