summaryrefslogtreecommitdiffstats
path: root/src/act4e_solutions/relations.py
diff options
context:
space:
mode:
authorAndrea Censi <acensi@ethz.ch>2022-02-21 18:01:11 +0100
committerAndrea Censi <acensi@ethz.ch>2022-02-21 18:01:11 +0100
commit0611a2faef0ac8fdc8e65c92d7efb4c12a4f1879 (patch)
treea2c18ec0844e0c447f825ba2fa52e56e74788c2a /src/act4e_solutions/relations.py
parentfix (diff)
parentBump to version 7.1.2202211124 [ci skip] (diff)
downloadact4e-0611a2faef0ac8fdc8e65c92d7efb4c12a4f1879.tar.gz
act4e-0611a2faef0ac8fdc8e65c92d7efb4c12a4f1879.zip
Merge branch 'alphubel-stage' of github.com:ACT4E/ACT4E-exercises-template into alphubel-stage
Diffstat (limited to 'src/act4e_solutions/relations.py')
-rw-r--r--src/act4e_solutions/relations.py61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/act4e_solutions/relations.py b/src/act4e_solutions/relations.py
new file mode 100644
index 0000000..048b500
--- /dev/null
+++ b/src/act4e_solutions/relations.py
@@ -0,0 +1,61 @@
+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()
+
+
+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()