diff options
author | Andrea Censi <AndreaCensi@users.noreply.github.com> | 2023-11-01 10:18:52 +0100 |
---|---|---|
committer | Andrea Censi <AndreaCensi@users.noreply.github.com> | 2023-11-01 10:18:52 +0100 |
commit | f522450580f1c6ca937cb3c455babdd597170faf (patch) | |
tree | d3bef289018c2659ab5ba06de936bbdd402d5e52 /src | |
parent | misc (diff) | |
download | act4e-f522450580f1c6ca937cb3c455babdd597170faf.tar.gz act4e-f522450580f1c6ca937cb3c455babdd597170faf.zip |
misc
Diffstat (limited to 'src')
-rw-r--r-- | src/act4e_solutions/posets_bounds.py | 6 | ||||
-rw-r--r-- | src/act4e_solutions/semicategory_representation.py | 41 |
2 files changed, 44 insertions, 3 deletions
diff --git a/src/act4e_solutions/posets_bounds.py b/src/act4e_solutions/posets_bounds.py index e1f9d26..0d50baf 100644 --- a/src/act4e_solutions/posets_bounds.py +++ b/src/act4e_solutions/posets_bounds.py @@ -1,4 +1,4 @@ -from typing import Any, List, Optional, overload, TypeVar +from typing import Any, List, Optional, overload, TypeVar, Collection import act4e_interfaces as I @@ -19,10 +19,10 @@ class SolFinitePosetConstructionOpposite(I.FinitePosetConstructionOpposite): class SolFinitePosetSubsetProperties(I.FinitePosetSubsetProperties): - def is_chain(self, fp: I.FinitePoset[X], s: List[X]) -> bool: + def is_chain(self, fp: I.FinitePoset[X], s: Collection[X]) -> bool: raise NotImplementedError() - def is_antichain(self, fp: I.FinitePoset[X], s: List[X]) -> bool: + def is_antichain(self, fp: I.FinitePoset[X], s: Collection[X]) -> bool: raise NotImplementedError() diff --git a/src/act4e_solutions/semicategory_representation.py b/src/act4e_solutions/semicategory_representation.py new file mode 100644 index 0000000..860a451 --- /dev/null +++ b/src/act4e_solutions/semicategory_representation.py @@ -0,0 +1,41 @@ +from typing import Callable, Generic, Optional, TypeVar + +import act4e_interfaces as I +from act4e_interfaces import EnumerableSet + +OD = TypeVar("OD") +MD = TypeVar("MD") + + +class SolSemiCategoryRepresentation(I.SemiCategoryRepresentation): + def load( + self, + h: I.IOHelper, + data: I.FiniteSemiCategory_desc, + ObData: I.Setoid[OD], + MorData: I.Setoid[MD], + compose: Callable[[OD, OD, OD, MD, MD], MD], + ) -> I.SemiCategory[I.RichObject[OD], I.RichMorphism[MD]]: + raise NotImplementedError() + + +class SolSemiCategory(Generic[OD, MD], I.SemiCategory[I.RichObject[OD], I.RichMorphism[MD]]): + """ Skeleton for a class implementing SemiCategory.""" + + def __init__( + self, + add, more, parameters, here + ): + raise NotImplementedError + + def objects(self, uptolevel: Optional[int] = None) -> EnumerableSet[OD]: + raise NotImplementedError + + def hom(self, ob1: OD, ob2: OD, uptolevel: Optional[int] = None) -> EnumerableSet[MD]: + raise NotImplementedError + + def compose(self, ob1: OD, ob2: OD, ob3: OD, m1: MD, m2: MD) -> MD: + raise NotImplementedError + + def identity(self, ob: OD) -> MD: + raise NotImplementedError |