diff options
author | github-classroom[bot] <66690702+github-classroom[bot]@users.noreply.github.com> | 2023-10-04 16:42:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 16:42:46 +0200 |
commit | ccdbbb4716b240c3e5aa4c3389dcd92e142df22e (patch) | |
tree | 7335976fc7bb1b79d8b8812886f94715fe59ed95 /src/act4e_solutions/relations.py | |
download | act4e-ccdbbb4716b240c3e5aa4c3389dcd92e142df22e.tar.gz act4e-ccdbbb4716b240c3e5aa4c3389dcd92e142df22e.zip |
Initial commit
Diffstat (limited to 'src/act4e_solutions/relations.py')
-rw-r--r-- | src/act4e_solutions/relations.py | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/act4e_solutions/relations.py b/src/act4e_solutions/relations.py new file mode 100644 index 0000000..26f90a7 --- /dev/null +++ b/src/act4e_solutions/relations.py @@ -0,0 +1,64 @@ +from typing import Any, TypeVar + +import act4e_interfaces as I +from act4e_interfaces import FiniteRelation + +E1 = TypeVar("E1") +E2 = TypeVar("E2") +E3 = TypeVar("E3") +E = TypeVar("E") + +A = TypeVar("A") +B = TypeVar("B") + + +class SolFiniteRelationProperties(I.FiniteRelationProperties): + def is_surjective(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_defined_everywhere(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_injective(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_single_valued(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + +class SolFiniteRelationOperations(I.FiniteRelationOperations): + def transpose(self, fr: I.FiniteRelation[A, B]) -> I.FiniteRelation[B, A]: + raise NotImplementedError() + + def as_relation(self, f: I.FiniteMap[A, B]) -> I.FiniteRelation[A, B]: + raise NotImplementedError() + + +class SolFiniteEndorelationProperties(I.FiniteEndorelationProperties): + def is_reflexive(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_irreflexive(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_transitive(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_symmetric(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_antisymmetric(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + def is_asymmetric(self, fr: I.FiniteRelation[Any, Any]) -> bool: + raise NotImplementedError() + + +class SolFiniteEndorelationOperations(I.FiniteEndorelationOperations): + def transitive_closure(self, fr: I.FiniteRelation[E, E]) -> I.FiniteRelation[E, E]: + raise NotImplementedError() + + +class SolFiniteRelationCompose(I.FiniteRelationCompose): + def compose(self, fr1: FiniteRelation[E1, E2], fr2: FiniteRelation[E2, E3]) -> I.FiniteRelation[E1, E3]: + raise NotImplementedError() |