# nand 函数

当所有条件都为真时为假。

## 怎么写

### nand(p, q, ...)

**p**

一个条件。接受一个条件，真或假。

**q**

一个条件。接受一个条件，真或假。

## 示例

- $\displaystyle \operatorname{nand}(\operatorname{true}, \operatorname{true}) = \operatorname{false}$

  `nand(true, true)`

  在求解器中，`nand(true, true)` 的结果是 `false`。

  [在求解器中打开](https://zh.hilberon.com/?q=nand%28true%2C%20true%29)

## 相关函数

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

  当所有条件都为假时为真。
- [logical_or](https://zh.hilberon.com/library/logical_or)

  当某个条件为真时返回真：or 的函数形式。
- [satisfiability_count](https://zh.hilberon.com/library/satisfiability_count)

  使条件为真的变量取值有多少种。
- [logical_not](https://zh.hilberon.com/library/logical_not)

  条件的否定：not 的函数形式。
- [satisfiability_instances](https://zh.hilberon.com/library/satisfiability_instances)

  使条件为真的变量取值。
- [logical_expand](https://zh.hilberon.com/library/logical_expand)

  在逻辑表达式中将 and 分配到 or 上。

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