diff --git a/docs/1b/ece108.md b/docs/1b/ece108.md index 47c33be..4867a13 100644 --- a/docs/1b/ece108.md +++ b/docs/1b/ece108.md @@ -657,6 +657,16 @@ For $R\subseteq X\times Y$: Relations are trivially proven to be relations through subset analysis. +!!! example + For the relation $L$\subseteq R^2=\{\left\in\mathbb R^2|x4|y\in\mathbb R\}$ (1 OR 4) + - $L^{-1}(\{-1,2\})=\{x\in\mathbb R|x<2\}$ (-1 OR 2) + The **empty relation** $\empty$ is a relation on all sets. The **identity relation** on all sets returns itself. @@ -672,3 +682,55 @@ The **restriction** of relation $R$ to set $B$ limits a previous relation on a s $$R\big|_B=R\cap B^2$$ Graphs are often used to represent relations. A node from $4\to3$ can be represented as $\left<3,4\right>$, much like an adjacency list. + +### Reflexivity + +A **reflexive** relation $R\subseteq X^2$ is such that every element in $X$ is related to itself by the relation. + +$$\forall x\in X,\left\in R$$ + +An **irreflexive** relation is such that each element is *not* related to itself. + +$$\forall x\in X,\left\not\in R$$ + +Reflexivity is determined graphically by checking if the main diagonal of a truth table is true. + +!!! example + For the reflexive relation $R$, $A=\{1,2\},R=\{\left<1,1\right>,\left<2,2\right>\}$: + + |$A\times A$ | 1 | 2 | + | --- | --- | --- | + | 1 | T | F | + | 2 | F | T | + +!!! warning + $\empty$ is often vacuously true for most conditions. + +If $R$ is a **non-empty** relation on a **non-empty** set $X$, $R$ cannot be both reflexive and irreflexive. + +### Symmetry + +A **symmetric** relation $R\subseteq X^2$ is such that every relation goes both ways. + +$$\forall x,y\in X^2,\left\in R\iff\left\in R$$ + +An **asymmetric** relation is such that **no** relation goes both ways. + +$$\forall x,y\in X^2,\left\in R\implies\left\not\in R$$ + +An **antisymmetric** relation is such that **no** relation goes both ways, *except* if compared to itself, and that the relation relates identical items. + +$$\forall x,y\in X^2,\left\in R\wedge\left\in R\implies x=y$$ + +Where $x,y,z$ are elements in $X$, and $p,q,r$ are arbitrary proposition results (true/false): + +- Symmetric relations must be symmetrical across the main diagonal of a truth table. + +| $X^2$ | $x$ | $y$ | $z$ | +| --- | --- | --- | --- | +| $x$ | ? | $p$ | $q$ | +| $y$ | $\neg p$ | ? | $r$ | +| $z$ | $\neg q$ | $\neg r$ | ? | + +- Asymmetric relations must be oppositely symmetrical across the main diagonal. The main diagonal also must be false. +- Antisymmetric relations must be false only if there is a true.