pub trait FgCategory: Category {
type ObGen: Eq + Clone + Into<Self::Ob>;
type MorGen: Eq + Clone + Into<Self::Mor>;
// Required methods
fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>;
fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>;
fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob;
fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob;
// Provided methods
fn objects(&self) -> impl Iterator<Item = Self::Ob> { ... }
fn morphisms(&self) -> impl Iterator<Item = Self::Mor> { ... }
}
Expand description
A finitely generated category with specified object and morphism generators.
Unless the category has extra structure like a monoidal product, a finitely generated (f.g.) category has finitely many objects. Moreover, the objects will coincide with the object generators in the typical case that there are no equations between objects. On the other hand, a f.g. category can have infinitely many morphisms and often does.
Required Associated Types§
Required Methods§
Sourcefn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
Iterates over object generators.
Sourcefn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
Iterates over morphism generators.
Sourcefn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
The domain of a morphism generator
Sourcefn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
The codomain of a morphism generator
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.