From f4255d037d8942149f72512416f6ff32788feb92 Mon Sep 17 00:00:00 2001 From: Rodolfo Marinho Date: Sun, 3 Nov 2019 18:49:49 -0300 Subject: [PATCH] Add BinaryRelationUtils class --- .../BinaryRelationUtils.py | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 equivalence-relation/projeto-logica-unifacisa/BinaryRelationUtils.py diff --git a/equivalence-relation/projeto-logica-unifacisa/BinaryRelationUtils.py b/equivalence-relation/projeto-logica-unifacisa/BinaryRelationUtils.py new file mode 100644 index 0000000..2bae3a6 --- /dev/null +++ b/equivalence-relation/projeto-logica-unifacisa/BinaryRelationUtils.py @@ -0,0 +1,65 @@ +#coding: utf-8 + + +class BinaryRelationUtils(object): + """Class providing utilities to verify properties of a binary relation.""" + + @staticmethod + def verify_reflexivity(binary_relation, input_set): + """ + This method verifies if a given binary relation is reflexive or not. + + Arguments: + binary_relation - A subclass of the BinaryRelation class. + + input_set - A set closed under the binary relation. + + Return True if the binary relation in the given input set is reflexive + or False if it is not. + """ + pass + + @staticmethod + def verify_symmetry(binary_relation, input_set): + """ + This method verifies if a given binary relation is symmetric or not. + + Arguments: + binary_relation - A subclass of the BinaryRelation class. + + input_set - A set closed under the binary relation. + + Return True if the binary relation in the given input set is symmetric + or False if it is not. + """ + pass + + @staticmethod + def verify_transitivity(binary_relation, input_set): + """ + This method verifies if a given binary relation is transitive or not. + + Arguments: + binary_relation - A subclass of the BinaryRelation class. + + input_set - A set closed under the binary relation. + + Return True if the binary relation in the given input set is transitive + or False if it is not. + """ + pass + + @staticmethod + def verify_antisymmetry(binary_relation, input_set): + """ + This method verifies if a given binary relation is antisymmetric or not. + + Arguments: + binary_relation - A subclass of the BinaryRelation class. + + input_set - A set closed under the binary relation. + + Return True if the binary relation in the given input set is + antisymmetric or False if it is not. + """ + pass \ No newline at end of file