# logical_and 函数

当每个条件都为真时返回真：and 的函数形式。

## 怎么写

### logical_and(p, q, ...)

**p**

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

**q**

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

## 示例

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

  `logical_and(true, false)`

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

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

## 相关函数

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

  在逻辑表达式中将 and 分配到 or 上。
- [logical_not](https://zh.hilberon.com/library/logical_not)

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

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

  当第一个值至多等于第二个值时返回真：\<= 的函数形式。
- [less](https://zh.hilberon.com/library/less)

  当第一个值小于第二个值时返回真：\< 的函数形式。
- [is_tautology](https://zh.hilberon.com/library/is_tautology)

  判断一个条件对其变量的所有取值是否都为真。

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