We checked each binary relation on a 5-element set for a given set of
properties, including usual ones like asymmetry and less known ones like
Euclideanness. Using a poor man's Quine-McCluskey algorithm, we computed prime
implicants of non-occurring property combinations, like "not irreflexive, but
asymmetric". We considered the non-trivial laws obtained this way, and manually
proved them true for binary relations on arbitrary sets, thus contributing to
the encyclopedic knowledge about less known properties.
In order to flesh out encyclopedic articles^{1}^{1}1
at https://en.wikipedia.org
about less common
properties (like e.g. anti-transitivity) of binary relations,
we implemented a simple C program to iterate over all
relations on a small
finite set and to check each of them for given
properties.
We implemented checks for the properties given in
Def. 1 below.
Figure 1
shows the C source code to check a relation
R for transitivity, where card is the universe size
and elemT is the type encoding a universe element.
This way, we could, in a first stage,
(attempt to) falsify intuitively found hypotheses
about laws involving such properties, and search for illustrative
counter-examples to known, or intuitively guessed, non-laws.
For example,
Fig. 2
shows the source code to search for right Euclidean non-transitive
relations over a 2-element universe, where printRel prints
its argument relation in a human-readable form.
For a universe of n elements, n2for loops are nested.
In Sect. 6.1 we describe an improved
way to iterate over all relations.
Relations on a set of up to 6 elements could be dealt with in
reasonable time on a 2.3 GHz CPU.
Figure 3
gives an overview, where all times are wall clock
times in seconds,
and “tr⇒qt” indicates the task of validating
that each transitive binary relation is also quasi-transitive.
Note the considerable amount of compile time,^{2}^{2}2
We used gcc version 7.3.0 with the highest
optimization level.
presumably
caused by excessive use
of inlining, deeply nested loops, and abuse of array elements as loop
variables.
In a second stage, we aimed at supporting the generation of
law hypotheses, rather than their validation.
We used a 5-element universe set, and
checked each binary relation for each of the properties.^{3}^{3}3
For this run, we hadn’t provided checks for left and right
quasi-reflexivity
(Def. 1.4+5),
but only for the conjunction of both,
viz. quasi-reflexivity (Def. 1.6).
As additional properties, we provided a check for the empty
relation (∀x,y∈X.¬xRy)
and for the universal relation
(∀x,y∈X.xRy).
The latter were encoded by bits of a 64-bit word.
After that, we applied
a poor-man’s Quine-McCluskey algorithm^{4}^{4}4
See Quine (1952) and McCluskey Jr. (1956)
for the original algorithm.
(denoted “QMc” in Fig. 3)
to obtain a short description
of property combinations that didn’t occur at all.
For example, an output line “~Irrefl ASym” indicated that the
program didn’t find any relation that was asymmetric but not
irreflexive, i.e. that each asymmetric relation on a 5-element set is
irreflexive.
Section 3 shows the complete output
on a 5-element universe.
Universe card
2
3
4
5
6
Relation count
16
512
6.55e04
3.35e07
6.87e10
10
140
6.17e03
9.07e05
4.60e08
Compile time
7.123
14.254
20.868
27.923
41.965
Run time tr⇒qt
0.007
0.007
0.009
0.132
50.386
Figure 3: Timing vs. universe cardinality
We took each printed law as a suggestion to be proven for all binary
relations (on arbitrary sets).
Many of the considered laws were trivial, in particular those involving
co-reflexivity, as this property applies only to a relatively small
number of relations (32 on a 5-element set).
A couple of laws appeared to be interesting, and we could prove them
fairly easily by hand for the general case^{5}^{5}5
We needed to require a minimum cardinality of the universe
set in some lemmas, e.g. Lem. 51 and 42.
.
For those laws involving less usual properties (like anti-transitivity,
quasi-transitivity, Euclideanness) there is good chance that they
haven’t been stated in the literature before.
However, while they may contribute to the completeness of an encyclopedia,
it is not clear whether they may serve any other purpose.
Disregarding the particular area of binary relations, the method of
computing law suggestions by the Quine-McCluskey algorithm might be
used as a source of fresh exercises whose solutions are unlikely to be
found on web pages.
Some of the laws, e.g. Lem. 40, appeared
surprising, but turned out during the proof to be vacuously true.
The proof attempt to some laws gave rise to the assertion of other
lemmas that weren’t directly obtained from the computed
output:
Lemma 4 was needed for the proof of
Lem. 19, and
Lem. 52 was needed for Lem. 42.
Our Quine-McCluskey approach restricts law suggestions to formulas of
the form ∀R.prop1(R)∨…∨propn(R),
where the quantification is over all binary relations,
and propi is one of the considered properties or a negation
thereof.
Figure 5: Tree grammar sketch for Burghardt (2002) approach
For an approach to compute more general forms of law suggestions,
see Burghardt (2002);
however, due to its run-time complexity
this approach is feasible only for even smaller universe
sets.
In order to handle all relations on a 3-element set,
a regular tree grammar of 512 nonterminals, one for each
relation, plus 2 nonterminals, one for each truth value,
would be needed.
Using the encoding scheme from
Fig. 4,
the original grammar would consist of rules as sketched^{6}^{6}6
For sake of simplicity, only one unary and one binary
operation on relations is considered, viz. symmetric closure
symCls and union ∪.
Only two properties of relations are considered, viz. reflexivity isRefl and symmetry isSym.
It should be obvious how to incorporate more operators and
predicates on relations.
By additionally providing a sort for sets, operations like
\operator@fontdom, \operator@fontran, restriction, etc. could be considered also.
in Fig. 5.
However, this grammar grows very large, and its n-fold
product would be needed if all laws in n variables were to be computed.
The rest of this paper is organized as follows.
In Sect. 2, we formally define each considered
property, and introduce some other notions.
In Sect. 3, we show the annotated output
for a run of our algorithm on a 5-element set, also indicating which
law suggestions gave rise to which lemmas.
The latter are stated and proven in
Sect. 4, which is the main part of
this paper.
In addition, we state the proofs of some laws that weren’t of the form
admitted by our approach; some of them were, however, obtained using
the assistance of the counter-example search in our C
program.
In Sect. 5,
we discuss those computed law suggestions that lead
to single examples, rather than to general laws.
In Sect. 6,
we comment on some program details.
This paper is a follow-up version of
https://arxiv.org/abs/1806.05036v1.
Compared to the previous version,
we considered 9 more properties (see Def. 1), including
being the empty and being the universal relation, to avoid
circumscriptions like “Irrefl∨CoRefl∨¬ASym”
in favor of “Empty∨¬ASym”;
in the new setting,
we found a total of 274 law suggestions, and proved or disproved
all of them.
I am thankful to all people who have helped with their comments and
corrections.
2 Definitions
Definition 1
(Binary relation properties)Let X be a set.
A (homogeneous) binary relation R on X is a subset of X×X.
The relation R is called
reflexive
(“Refl”, “rf”)
if ∀x∈X.xRx;
irreflexive
(“Irrefl”, “ir”)
if ∀x∈X.¬xRx;
co-reflexive
(“CoRefl”, “cr”)
if ∀x,y∈X.xRy→x=y;
left quasi-reflexive
(“lq”)
if ∀x,y∈X.xRy→xRx;
right quasi-reflexive
(“rq”)
if ∀x,y∈X.xRy→yRy;
quasi-reflexive
(“QuasiRefl”)
if it is both left and right quasi-reflexive;
symmetric
(“Sym”, “sy”)
if ∀x,y∈X.xRy→yRx;
asymmetric
(“ASym”, “as”)
if ∀x,y∈X.xRy→¬yRx;
anti-symmetric
(“AntiSym”, “an”)
if ∀x,y∈X.xRy∧x≠y→¬yRx;
semi-connex
(“SemiConnex”, “sc”)
if ∀x,y∈X.xRy∨yRx∨x=y;
connex
(“Connex”, “co”)
if ∀x,y∈X.xRy∨yRx;
transitive
(“Trans”, “tr”)
if ∀x,y,z∈X.xRy∧yRz→xRz;
anti-transitive
(“AntiTrans”, “at”)
if ∀x,y,z∈X.xRy∧yRz→¬xRz;
quasi-transitive
(“QuasiTrans”, “qt”)
if ∀x,y,z∈X.xRy∧¬yRx∧yRz∧¬zRy→xRz∧¬zRx;
right Euclidean
(“RgEucl”, “re”)
if ∀x,y,z∈X.xRy∧xRz→yRz;
left Euclidean
(“LfEucl”, “le”)
if ∀x,y,z∈X.yRx∧zRx→yRz;
semi-order property 1
(“SemiOrd1”, “s1”)
if ∀w,x,y,z∈X.wRx∧¬xRy∧¬yRx∧yRz→wRz;
semi-order property 2
(“SemiOrd2”, “s2”)
if ∀w,x,y,z∈X.xRy∧yRz→wRx∨xRw∨wRy∨yRw∨wRz∨zRw.
right serial
(“RgSerial”, “rs”)
if ∀x∈X∃y∈X.xRy
left serial
(“LfSerial”, “ls”)
if ∀y∈X∃x∈X.xRy
dense
(“Dense”, “de”)
if ∀x,z∈X∃y∈X.xRz→xRy∧yRz.
incomparability-transitive
(“IncTrans”, “it”)
if ∀x,y,z∈X.¬xRy∧¬yRx∧¬yRz∧¬zRy→¬xRz∧¬zRx.
left unique
(“LfUnique”, “lu”)
if ∀x1,x2,y∈Xx1Ry∧x2Ry→x1=x2.
right unique
(“RgUnique”, “ru”)
if ∀x,y1,y2∈XxRy1∧xRy2→y1=y2.
The capitalized abbreviations in parentheses are used by our
algorithm; the two-letter codes are used in tables and pictures when
space is scarce.
The “left” and “right” properties are dual to each other.
All other properties are self-dual.
For example, a relation R is left unique iff its converse, R−1,
is right unique;
a relation R is dense iff its converse is dense.
We say that x,y are incomparable w.r.t. R,
if ¬xRy∧¬yRx holds.
∎
Definition 2
(Kinds of binary relations)A binary relation R on a set X is called
an equivalence
if
it is reflexive, symmetric, and transitive;
a partial equivalence
if
it is symmetric and transitive;
a tolerance relation
if
it is reflexive and symmetric;
idempotent
if
it is dense and transitive;
trichotomous
if
it is irreflexive, asymmetric, and semi-connex;
a non-strict partial order
if
it is reflexive, anti-symmetric, and transitive;
a strict partial order
if
it is irreflexive, asymmetric, and transitive;
a semi-order
if
it is asymmetric and satisfies semi-order properties 1 and 2;
a preorder
if
it is reflexive and transitive;
a weak ordering
if
it is irreflexive, asymmetric, transitive, and
incomparability-transitive;
a partial function
if
it is right unique;
a total function
if
it is right unique and right serial;
an injective function
if
it is left unique, right unique, and right serial;
a surjective function
if
it is right unique and and left and right serial;
a bijective function
if
it is left and right unique and left and right serial.
∎
Definition 3
(Operations on relations)
For a relation R on a set X and a subset Y⊆X,
we write R∣Y for the restriction of R to Y.
Formally, R∣Y is the relation on Y×Y
defined by x(R∣Y)y:⇔xRy for each x,y∈Y.
For an equivalence relation R on a set X, we write [x]R
for the equivalence class of x∈X w.r.t. R.
Formally, [x]R:={y∈X∣xRy}.
For a relation R on a set X and x,y∈X, we write
xR for the set of elements x is related to,
and Ry for the set of elements that are related to y.
Formally,
xR:={y∈X∣xRy}
and Ry:={x∈X∣xRy}.
∎
3 Reported law suggestions
In this section,
we show the complete output produced by our Quine-McCluskey algorithm run.
In the Fig. 6
to 13,
we list the computed prime implicants for missing relation property
combinations on a 5-element universe set.
We took each prime implicant as a suggested law about all binary
relations.
These suggestions are grouped by the number of their
literals (“level”).
In the leftmost column, we provide a consecutive law number for
referencing.
In the middle column, the law is given in textual
representation, “¬P” denoting the negation of P,
and juxtaposition used for conjunction.
The property names correspond to those used
by the C program; they should be understandable without
further explanation, but can also be looked up via
Fig. 42, if necessary.
In the rightmost column, we annotated a reference to the lemma
(in Sect. 4)
where the law has been formally proven or to the example
(in Sect. 5) where it is discussed.
For example, line 039, in level 2
(Fig. 6 left),
reports that no relation was found to be
asymmetric (property 1.8)
and non-irreflexive (negation of property 1.2);
we show the formal proof that every asymmetric relation is irreflexive in
Lem. 13.1.^{7}^{7}7
A warning about possible confusion appears advisable here:
In the setting of the Quine-McCluskey algorithm, a prime
implicant is a conjunction of negated and/or unnegated variables.
However, its corresponding law suggestion is its complement,
and hence a disjunction, as should be clear from the example.
Where possible, we used the term “literal” in favor of
“conjunct” or “disjunct”.
Laws that could be derived from others by purely propositional
reasoning and without referring to the
property definitions in Def. 1 are considered redundant;
they are marked with a star “∗”.^{8}^{8}8
We marked all redundancies we became aware of; we don’t claim
that no undetected ones exist.
For example, law 044 (“no relation is asymmetric and reflexive”)
is marked since it
follows immediately from 046
(“no relation is irreflexive and reflexive”)
and 039.
No laws were reported for level 1 and level 9 and beyond.
A text version of these tables is available in the ancillary file
reportedLaws.txt at arxiv.org.
In Fig. 14 to 17,
we summarize the found laws.
We omitted suggestions that couldn’t be
manually verified as laws, and suggestions marked as redundant.
Figure 14 and 15
shows the left and right half of an implication table,
respectively.
Every field lists all law numbers that can possibly be used
to derive the column property from the row property.
For example, law 129 appears in line “tr”
(transitive) and column “as” (asymmetric)
in Fig. 14
because that law
(well-known, and proven in Lem. 12.2)
allows one to infer a relation’s asymmetry from its transitivity,
provided that it is also known to be irreflexive.
Fields belonging to the table’s diagonal are marked by “X”.
Law numbers are colored by number of literals,
deeply-colored and pale-colored numbers indicating
few and many literals, respectively.
Similarly, the table consisting of
Fig. 16
and 17
shows below and above
its diagonal laws about required disjunctions and
impossible conjunctions, respectively.
For example, law 223 appears below the diagonal in
line “co” (connex) and column “em” (empty) of
Fig. 16, since the law
(proven in Lem. 29)
requires every relation to be connex
or empty, provided it is quasi-reflexive and incomparability-transitive.
Law 145 appears above the diagonal in line “le”
(left Euclidean) and column “lu” (left unique), since the law
(proven in Lem. 45)
ensures that no relation
can be left Euclidean and
left unique, provided it isn’t anti-symmetric.
Figure 18
shows all proper implications (black) and incompatibilities
(red) from level 2, except for the empty and the universal relation.
Vertex labels use the abbreviations from Fig. 14,
edge labels refer to law numbers in Fig. 6.
Comments
There are no comments yet.