pub struct Forget;Expand description
Functor to replace operations labeled HasVar::var() with spiders, or the empty diagram.
More precisely: if an operation labeled HasVar::var() has m sources and n targets, all labeled a,
then it will be replaced with a m → 1 ← n spider, with all nodes labeled a.
If m = 0 = n, the operation will be replaced by the empty diagram:
this corresponds to the Extra-special frobenius axiom, which says that 0 → 0 Frobenius maps are
the empty OpenHypergraph.
See p2 https://arxiv.org/pdf/1601.02307 - the “extra law”.
Trait Implementations§
Source§impl<O: Clone + PartialEq, A: HasVar + Clone + PartialEq> Functor<O, A, O, A> for Forget
impl<O: Clone + PartialEq, A: HasVar + Clone + PartialEq> Functor<O, A, O, A> for Forget
Source§fn map_object(&self, o: &O) -> impl ExactSizeIterator<Item = O>
fn map_object(&self, o: &O) -> impl ExactSizeIterator<Item = O>
Map a generating object of the theory
Source§fn map_operation(
&self,
a: &A,
source: &[O],
target: &[O],
) -> OpenHypergraph<O, A>
fn map_operation( &self, a: &A, source: &[O], target: &[O], ) -> OpenHypergraph<O, A>
Map a single operation of the theory with specified source and target type.
This must be consistent with
map_object, i.e. we must have:
- F.map_operation(x, s, t).sources == F.map_object(s)
- F.map_operation(x, s, t).targets == F.map_object(t)
This condition is not checked, but may panic if not satisfied.Source§fn map_arrow(&self, f: &OpenHypergraph<O, A>) -> OpenHypergraph<O, A>
fn map_arrow(&self, f: &OpenHypergraph<O, A>) -> OpenHypergraph<O, A>
Apply this functor to an
OpenHypergraph.
Once map_operation is defined, this can be defined using
super::dyn_functor::define_map_arrow
as define_map_arrow(self, f)Auto Trait Implementations§
impl Freeze for Forget
impl RefUnwindSafe for Forget
impl Send for Forget
impl Sync for Forget
impl Unpin for Forget
impl UnsafeUnpin for Forget
impl UnwindSafe for Forget
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