# conflicting_rules 函数

返回所有不能同时成立的规则集合，每个集合是它所需规则的列表；全部可以成立时为 \[\]。

## 怎么写

### conflicting_rules(rules, domain)

**rules**

这些规则，写成列表或用 and 连接；n : integer 表示 n 是整数。接受一个列表或一个条件，真或假。

**domain**

指定 integer 时，每个未知数都是整数；省略时为实数。

## 示例

- $\displaystyle \begin{cases} x > 1 \text{ 或 } y > 1 \\ x \le 0 \\ y < 0 \\ z > 2 \end{cases} \; \begin{cases} x > 1 \text{ 或 } y > 1 \\ x \le 0 \\ y < 0 \end{cases}$

  `conflicting_rules([x > 1 or y > 1, x <= 0, y < 0, z > 2])`

  在求解器中，`conflicting_rules([x > 1 or y > 1, x <= 0, y < 0, z > 2])` 的结果是 `[[x > 1 or y > 1, x <= 0, y < 0]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=conflicting_rules%28%5Bx%20%3E%201%20or%20y%20%3E%201%2C%20x%20%3C%3D%200%2C%20y%20%3C%200%2C%20z%20%3E%202%5D%29)
- $\displaystyle \begin{cases} 6 t+4 u = 40 \\ t \ge 5 \\ u \ge 2 \end{cases} \; \begin{cases} 6 t+4 u = 40 \\ t \ge 5 \\ u \ge 2 \end{cases}$

  `conflicting_rules([6*t + 4*u = 40, t >= 5, u >= 2], integer)`

  在求解器中，`conflicting_rules([6*t + 4*u = 40, t >= 5, u >= 2], integer)` 的结果是 `[[6t + 4u = 40, t >= 5, u >= 2]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=conflicting_rules%28%5B6*t%20%2B%204*u%20%3D%2040%2C%20t%20%3E%3D%205%2C%20u%20%3E%3D%202%5D%2C%20integer%29)

## 相关函数

- [cylindrical_decomposition](https://zh.hilberon.com/library/cylindrical_decomposition)

  把条件成立的范围依次描述为每个变量的上下界。
- [boolean_minimize](https://zh.hilberon.com/library/boolean_minimize)

  条件的最短等价形式。
- [eliminate_quantifiers](https://zh.hilberon.com/library/eliminate_quantifiers)

  去掉量词后的等价条件。
- [xor](https://zh.hilberon.com/library/xor)

  为真的条件个数为奇数时为真。
- [equal](https://zh.hilberon.com/library/equal)

  两个值相等时为真：== 的函数形式。
- [unequal](https://zh.hilberon.com/library/unequal)

  两个值不同时为真：!= 的函数形式。

---
Source: https://zh.hilberon.com/library/conflicting_rules
