差(关系)

来自GSXAB的知识库
术语名称
英语名称 difference

关系的(difference of relation)指将两个关系作为子集的差集,也就是“有前一关系但没有后一关系”所对应的关系。

定义

差关系
运算名称 差关系
运算符号 [math]\displaystyle{ \setminus }[/math],[math]\displaystyle{ - }[/math]
Latex \setminus, -
运算对象 关系
运算元数 2
运算结果 关系
定义域 [math]\displaystyle{ \mathcal{P}(X \times Y) \times \mathcal{P}(X \times Y) }[/math]
陪域 [math]\displaystyle{ \mathcal{P}(X \times Y) }[/math]

对集合 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math] 上的两个关系 [math]\displaystyle{ R }[/math][math]\displaystyle{ S }[/math] ,记差集 [math]\displaystyle{ R \setminus S = \left\{ (x, y) \in X\times Y \mid (x, y) \in R \land (x, y) \notin S \right\} = \left\{ (x, y) \mid x R y \land x \lnot S y \right\} }[/math] ,称为 [math]\displaystyle{ R }[/math][math]\displaystyle{ S }[/math](difference)。

diff.svg

多元关系的交

对集合 [math]\displaystyle{ A_1, \cdots, A_n }[/math] 上的两个多元关系 [math]\displaystyle{ R }[/math][math]\displaystyle{ S }[/math] ,定义差集 [math]\displaystyle{ R\setminus S }[/math] 为两个关系的差关系。

性质


关系
定义属性 前域、后域、定义域 [math]\displaystyle{ \operatorname{dom} }[/math]、值域 [math]\displaystyle{ \operatorname{ran} }[/math]、域 [math]\displaystyle{ \operatorname{fld} }[/math]
特殊关系 空关系 [math]\displaystyle{ \varnothing }[/math]恒等关系 [math]\displaystyle{ I }[/math]全关系 [math]\displaystyle{ A\times B }[/math]
二元齐次关系类型 自反反自反对称反对称传递
运算 集合运算 [math]\displaystyle{ \cap }[/math][math]\displaystyle{ \cup }[/math][math]\displaystyle{ \bar{\bullet} }[/math][math]\displaystyle{ \setminus }[/math]
类映射运算 转置/逆 [math]\displaystyle{ \bullet^\mathrm{T}/\bullet^{-1} }[/math]复合 [math]\displaystyle{ \circ }[/math][math]\displaystyle{ \bullet^n }[/math])、限制 [math]\displaystyle{ \bullet_{|\bullet} }[/math]
闭包运算 自反 [math]\displaystyle{ \operatorname{r}() }[/math]/[math]\displaystyle{ \bullet^= }[/math]对称 [math]\displaystyle{ \operatorname{s}() }[/math]/[math]\displaystyle{ \bullet^\sim }[/math]传递 [math]\displaystyle{ \operatorname{t}() }[/math]/[math]\displaystyle{ \bullet^+ }[/math]自反传递 [math]\displaystyle{ \bullet^* }[/math]等价 [math]\displaystyle{ \bullet^\equiv }[/math]