限制(关系)

来自GSXAB的知识库
限制
术语名称 限制
英语名称 restriction

限制(restriction)指对一个关系,取其在自身前域、后域的子集上构成的子关系

定义

限制
运算名称 限制
运算符号 [math]\displaystyle{ \bullet_{| \bullet} }[/math],[math]\displaystyle{ \bullet\big|_\bullet }[/math],[math]\displaystyle{ \bullet\restriction_\bullet }[/math]
Latex _{\vert}, \big\vert_, \restriction_
运算对象 关系
运算元数 2
运算结果 关系


齐次关系的限制

对集合 [math]\displaystyle{ X }[/math] 上的关系 [math]\displaystyle{ R }[/math] 与子集 [math]\displaystyle{ A \subseteq X }[/math],定义: [math]\displaystyle{ R_{| A} = \{ (x, y) \in R \mid x, y \in A \} }[/math] 称为 [math]\displaystyle{ R }[/math][math]\displaystyle{ A }[/math] 上的限制,也记作 [math]\displaystyle{ R\big|_A }[/math] ,有时也直接记作 [math]\displaystyle{ R|A }[/math]

非齐次关系的限制

对集合 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math] 的关系 [math]\displaystyle{ R }[/math]

  • 对前域的限制:若 [math]\displaystyle{ A \subseteq X }[/math],则 [math]\displaystyle{ R_{|A} = \{ (x, y) \in R \mid x \in A \} }[/math] ,也记作 [math]\displaystyle{ R\big|_A }[/math]
  • 对后域的限制:若 [math]\displaystyle{ B \subseteq Y }[/math],则 [math]\displaystyle{ R^{|B} = \{ (x, y) \in R \mid y \in B \} }[/math] ,也记作 [math]\displaystyle{ R\big|^B }[/math]
  • 同时对前后域的限制:若 [math]\displaystyle{ A \subseteq X, B \subseteq Y }[/math],则 [math]\displaystyle{ R_{|A}^{|B} = \{ (x, y) \in R \mid x \in A, y \in B \} }[/math] ,也记作 [math]\displaystyle{ R\big|_A^B }[/math]

性质

  • 基本性质:
    • [math]\displaystyle{ R_{|A} \subseteq R }[/math]
    • [math]\displaystyle{ (R_{|A})_{|B} = R_{| A \cap B} }[/math]
    • [math]\displaystyle{ A \subseteq B }[/math],则 [math]\displaystyle{ R_{|A} \subseteq R_{|B} }[/math]
  • 与运算的关系:
    • [math]\displaystyle{ (R \cup S)_{|A} = (R_{|A}) \cup (S_{|A}) }[/math]
    • [math]\displaystyle{ (R \cap S)_{|A} = (R_{|A}) \cap (S_{|A}) }[/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]