格

概念

设 (L,≼)(L, \preccurlyeq) 是偏序集,若

  • 对任意 x,y∈Lx, y \in L,存在 {x,y}\left\lbrace x, y \right\rbrace 最小上界 lub⁡{x,y}\operatorname{lub}\left\lbrace x, y \right\rbrace,记为 x∨yx \vee y,也称为 xx 和 yy 的并(join);
  • 对任意 x,y∈Lx, y \in L,存在 {x,y}\left\lbrace x, y \right\rbrace 最大下界 glb⁡{x,y}\operatorname{glb}\left\lbrace x, y \right\rbrace,记为 x∧yx \wedge y,也称为 xx 和 yy 的交(meet)。

则称 LL 关于 ≼\preccurlyeq 构成一个格(lattice)。

性质

  • a≼b,b≼c  ⟹  a∨b≼ca \preccurlyeq b, b \preccurlyeq c \implies a \vee b \preccurlyeq c
  • c≼a,c≼b  ⟹  c≼a∧bc \preccurlyeq a, c \preccurlyeq b \implies c \preccurlyeq a \wedge b
  • a≼c,b≼d  ⟹  a∨b≼c∨d,a∧b≼c∧da \preccurlyeq c, b \preccurlyeq d \implies a \vee b \preccurlyeq c \vee d, a \wedge b \preccurlyeq c \wedge d

若 (L,≼)(L, \preccurlyeq) 是格,则 ∀a,b∈L\forall a, b \in L,有:

a≼b  ⟺  a∧b=a  ⟺  a∨b=ba \preccurlyeq b \iff a \wedge b = a \iff a \vee b = b

设 (L,≼)(L, \preccurlyeq) 是格,则 ∨,∧\vee, \wedge 可看作是 LL 上的二元运算,有如下性质:

  • 结合律:(a∧b)∧c=a∧(b∧c),(a∨b)∨c=a∨(b∨c)(a \wedge b) \wedge c = a \wedge (b \wedge c), (a \vee b) \vee c = a \vee (b \vee c);
  • 交换律:a∧b=b∧a,a∨b=b∨aa \wedge b = b \wedge a, a \vee b = b \vee a;
  • 吸收律:a∧(a∨b)=a,a∨(a∧b)=aa \wedge (a \vee b) = a, a \vee (a \wedge b) = a;
  • 幂等律:a∧a=a,a∨a=aa \wedge a = a, a \vee a = a;

对偶命题

设 PP 是含有格中元素及符号 =,≼,≽,∨,∧=, \preccurlyeq, \succcurlyeq, \vee, \wedge 的命题。则将 PP 中

  • ≼\preccurlyeq 替换为 ≽\succcurlyeq
  • ≽\succcurlyeq 替换为 ≼\preccurlyeq
  • ∨\vee 替换为 ∧\wedge
  • ∧\wedge 替换为 ∨\vee

所得到的命题称为 PP 的对偶命题 P∗P^*。

格的对偶定理

若命题 PP 对一切格成立,则 P∗P^* 也对一切格成立。

证明

定义 SS 上二元关系 ≼∗ ⁣:∀a,b∈S,a≼∗b  ⟺  b≼a\preccurlyeq^{*}\colon \forall a, b \in S, a \preccurlyeq^{*} b \iff b \preccurlyeq a,显然 ≼∗\preccurlyeq^{*} 是 SS 上的偏序关系。

而 ∀a,b∈S,a∧∗b=a∨b,a∨∗b=a∧b\forall a, b \in S, a \wedge^{*} b = a \vee b, a \vee^{*} b = a \wedge b,故 SS 关于 ≼∗\preccurlyeq^{*} 构成一个格。

从而 P∗P^{*} 在 (S,≼)(S, \preccurlyeq) 中为真当且仅当 PP 在 (S,≼∗)(S, \preccurlyeq^{*}) 中为真。

而 PP 对一切格成立,故 P∗P^{*} 对一切格成立。

代数格

格的代数性质:

  • 结合律
  • 交换律
  • 吸收律(吸收律蕴含幂等律,如 x∧x=x∧(x∨(x∧x))=xx \wedge x = x \wedge ( x \vee (x \wedge x)) = x)

设 LL 是一个集合,∧,∨\wedge, \vee 是 LL 上的二元运算,且满足结合律、交换律、吸收律,则 (L,∧,∨)(L, \wedge, \vee) 构成一个代数格。

对代数格 (L,∧,∨)(L, \wedge, \vee),有:

  • ∀x,y∈L, x∧y=x  ⟺  x∨y=y\forall x, y \in L,\, x \wedge y = x \iff x \vee y = y
  • ∀x,y∈L\forall x, y \in L,定义 x≼y  ⟺  x∧y=xx \preccurlyeq y \iff x \wedge y = x,则 (L,≼)(L, \preccurlyeq) 是一个(偏序)格。
    • lub⁡{x,y}=x∨y\operatorname{lub}\left\lbrace x, y \right\rbrace = x \vee y
    • glb⁡{x,y}=x∧y\operatorname{glb}\left\lbrace x, y \right\rbrace = x \wedge y

子格

设 (L,∧,∨)(L, \wedge, \vee) 是代数格,非空集合 S⊆LS \subseteq L,若 SS 关于 ∧,∨\wedge, \vee 构成一个格,则称 (S,∧,∨)(S, \wedge, \vee) 是 LL 的一个子格。

设 LL 为如图所示的格,设

S1={a,e,f,g}S2={a,b,e,g}\begin{aligned} S_1 &= \left\lbrace a, e, f, g \right\rbrace\\ S_2 &= \left\lbrace a, b, e, g \right\rbrace \end{aligned}

flowchart TB
    g --- e & f --- c
    e --- b --- a
    c --- a
    f --- d --- a

则 S1S_1 不是 LL 的子格,因为 e∧f=c∉S1e \wedge f = c \notin S_1。

S2S_2 是 LL 的子格。

格同态

设 (L1,∧1,∨1)(L_1, \wedge_1, \vee_1) 和 (L2,∧2,∨2)(L_2, \wedge_2, \vee_2) 是代数格,若有函数 f ⁣:L1→L2f\colon L_1 \to L_2 使得任意 a,b∈L1a, b \in L_1,都有

f(a∧1b)=f(a)∧2f(b)f(a∨1b)=f(a)∨2f(b)\begin{aligned} f(a \wedge_1 b) &= f(a) \wedge_2 f(b)\\ f(a \vee_1 b) &= f(a) \vee_2 f(b) \end{aligned}

成立。则称 ff 是从 L1L_1 到 L2L_2 的同态映射,简称格同态。

格同态保序:∀x,y∈L1, (x≼1y→f(x)≼2f(y))\forall x, y \in L_1,\, \bigl(x \preccurlyeq_1 y \to f(x) \preccurlyeq_2 f(y)\bigr)。一般逆命题不成立,如下所示。

flowchart LR
    subgraph 11[ ]
        direction TB
        1' & u' & 0'
    end
    subgraph 22[ ]
        direction LR
        u & 1 & 0 & v
    end
    u --- 0 & 1 --- v
    1 -.-> 1'
    0 -.-> 0'
    u & v -.-> u'

格同构

设 (L1,∧1,∨1)(L_1, \wedge_1, \vee_1) 和 (L2,∧2,∨2)(L_2, \wedge_2, \vee_2) 是代数格,且其同态映射 ff 为双射,则称 ff 是从 L1L_1 到 L2L_2 的同构映射,简称格同构。

若 ff 为 L1L_1 到 L2L_2 的双射,则 ff 为格同构当且仅当

∀x,y∈L1, (x≼1y↔f(x)≼2f(y))\forall x, y \in L_1,\, \bigl(x \preccurlyeq_1 y \leftrightarrow f(x) \preccurlyeq_2 f(y)\bigr)

证明

充分性:

由于 x∧1y≼1xx \wedge_{1} y \preccurlyeq_{1} x,由保序性,f(x∧1y)≼2f(x)f\left(x \wedge_{1} y\right) \preccurlyeq_{2} f(x);同理,f(x∧1y)≼2f(y)f\left(x \wedge_{1} y\right) \preccurlyeq_{2} f(y);于是 f(x∧1y)≼2f(x)∧2f(y)f\left(x \wedge_{1} y\right) \preccurlyeq_{2} f(x) \wedge_{2} f(y)。

由于逆映射 f−1f^{-1} 仍然保序,f(x)∧2f(y)≼2f(x),f−1(f(x)∧2f(y))≼1xf(x) \wedge_{2} f(y) \preccurlyeq_{2} f(x), f^{-1}\left(f(x) \wedge_{2} f(y)\right) \preccurlyeq_{1} x;同理 f−1(f(x)∧2f(y))≼1yf^{-1}\left(f(x) \wedge_{2} f(y)\right) \preccurlyeq_{1} y;于是 f−1(f(x)∧2f(y))≼1x∧1yf^{-1}\left(f(x) \wedge_{2} f(y)\right) \preccurlyeq_{1} x \wedge_{1} y;再由 ff 保序,f(x)∧2f(y)=f(x) \wedge_{2} f(y)= f(f−1(f(x)∧2f(y)))≼2f(x∧1y)f\left(f^{-1}\left(f(x) \wedge_{2} f(y)\right)\right) \preccurlyeq_{2} f\left(x \wedge_{1} y\right)。

于是 f(x∧1y)=f(x)∧2f(y)f\left(x \wedge_{1} y\right)=f(x) \wedge_{2} f(y)。同理可证 f(x∨1y)=f(x)∨2f(y)f\left(x \vee_{1} y\right)=f(x) \vee_{2} f(y)。

必要性由上面格同态保序的结论可知。

同构的格具有相同的哈斯图形状。

下图分别为链(chain)、钻石格 M3M_3(diamond lattice)、和五角格 N5N_5(pentagon lattice)的哈斯图:

分配格

设 (L,∧,∨)(L, \wedge, \vee) 为格,若 ∀a,b,c∈L\forall a, b, c \in L,有

  • a∧(b∨c)=(a∧b)∨(a∧c)a \wedge (b \vee c) = (a \wedge b) \vee (a \wedge c)
  • a∨(b∧c)=(a∨b)∧(a∨c)a \vee (b \wedge c) = (a \vee b) \wedge (a \vee c)

则称 (L,∧,∨)(L, \wedge, \vee) 为分配格(distributive lattice)。

flowchart TB
    subgraph 1[ ]
        direction TB
        1a[a] --- 1b[b] & 1c[c] & 1d[d] --- 1e[e]
    end
    subgraph 2[ ]
        direction TB
        2a[a] --- 2b[b] & 2c[c]
        2c --- 2d[d]
        2b & 2d --- 2e[e]
    end

钻石格 M3M_3 与五角格 N5N_5 不是分配格。

  • M3M_3:b∧(c∨d)=bb \wedge (c \vee d) = b 而 (b∧c)∨(b∧d)=e(b \wedge c) \vee (b \wedge d) = e
  • N5N_5:d∨(b∧c)=dd \vee (b \wedge c) = d 而 (d∨b)∧(d∨c)=c(d \vee b) \wedge (d \vee c) = c

分配格判定定理一

设 LL 为格,则 LL 是分配格当且仅当 LL 不含有与 M3M_3 或 N5N_5 同构的子格。

从而有推论:

  • 小于五元的格都是分配格
  • 链是分配格

有 M3M_3 或 N5N_5 作为子集,但不是子格,未必不是分配格。如上图两个格都是分配格。

分配格判定定理二

设 LL 为格,则 LL 是分配格当且仅当对于任意 a,b,c∈La, b, c \in L,有

(a∧b=a∧c)∧(a∨b=a∨c)→b=c(a \wedge b = a \wedge c) \land (a \vee b = a \vee c) \to b = c

证明

必要性:

b=b∨(a∧b)=b∨(a∧c)=(b∨a)∧(b∨c)=(a∨c)∧(b∨c)=(a∧b)∨c=(a∧c)∨c=c\begin{aligned} b &= b \vee (a \wedge b)\\ &= b \vee (a \wedge c)\\ &= (b \vee a) \wedge (b \vee c)\\ &= (a \vee c) \wedge (b \vee c)\\ &= (a \wedge b) \vee c\\ &= (a \wedge c) \vee c\\ &= c \end{aligned}

有界格

设 LL 为格,若

  • ∃b∈L,∀x∈L,b≼x\exists b \in L, \forall x \in L, b \preccurlyeq x,则 bb 称为格 LL 的全下界(bottom),记作 0\bm{0}。
  • ∃t∈L,∀x∈L,x≼t\exists t \in L, \forall x \in L, x \preccurlyeq t,则 tt 称为格 LL 的全上界(top),记作 1\bm{1}。

设 LL 为格,若 LL 有全下界和全上界,则称 LL 为有界格(bounded lattice)。

全上界和全下界存在必唯一。

有界格一般记为 (L,∧,∨,0,1)(L, \wedge, \vee, \bm{0}, \bm{1})。

  • ∀a∈L, a∨0=a,a∧1=a\forall a \in L,\, a \vee \bm{0} = a, a \wedge \bm{1} = a

  • 同一律:∀a∈L, a∨0=a,a∧1=a\forall a \in L,\, a \vee \bm{0} = a, a \wedge \bm{1} = a

  • 支配律:∀a∈L, a∧0=0,a∨1=1\forall a \in L,\, a \wedge \bm{0} = \bm{0}, a \vee \bm{1} = \bm{1}

因此称

  • 0\bm{0} 是关于 ∨\vee 的单位元,关于 ∧\wedge 的零元
  • 1\bm{1} 是关于 ∧\wedge 的单位元,关于 ∨\vee 的零元

有限格 L={a1,⋯ ,an}L = \left\lbrace a_1, \cdots, a_n \right\rbrace 为有界格,且

  • 0=a1∧⋯∧an\bm{0} = a_1 \wedge \cdots \wedge a_n
  • 1=a1∨⋯∨an\bm{1} = a_1 \vee \cdots \vee a_n

求涉及有界格的命题之对偶命题,须将全下界与全上界对换。

补元

设 (L,∧,∨,0,1)(L, \wedge, \vee, \bm{0}, \bm{1}) 为有界格,若对 a∈La \in L,存在 b∈Lb \in L,使得

  • a∧b=0a \wedge b = \bm{0}
  • a∨b=1a \vee b = \bm{1}

则称 bb 为 aa 的补元(complement)。

  • 有界格中 0\bm{0} 和 1\bm{1} 互为补元
  • 补元可能不存在
  • 补元若存在,未必唯一

有界分配格补元唯一

设 (L,∧,∨,0,1)(L, \wedge, \vee, \bm{0}, \bm{1}) 为有界分配格,a∈La \in L 的补元若存在,则唯一。

证明

假设 bb 和 cc 是 aa 的补元,则

a∨c=1,a∧c=0a∨b=1,a∧b=0\begin{aligned} a \vee c = \bm{1}, a \wedge c = \bm{0}\\ a \vee b = \bm{1}, a \wedge b = \bm{0} \end{aligned}

由于全上界和全下界的唯一性,有 a∨c=a∨b,a∧c=a∧ba \vee c = a \vee b, a \wedge c = a \wedge b,由于 LL 为分配格,有 b=cb = c。

设 (L,∧,∨,0,1)(L, \wedge, \vee, \bm{0}, \bm{1}) 为有界格,若 LL 中每个元素都有补元,则称 LL 为有补格(complemented lattice)。

M3M_3 与 N5N_5 皆为有补格。

有补分配格性质:

  • 代数格:结合律、交换律、吸收率、(幂等律)
  • 分配格:分配律
  • 有界:同一律、(支配律)
  • 有补:补律、(双重补律、德摩根律)

有补分配格的代数性质   ⟹  \implies 布尔代数。