# equivalent function

True when two conditions are both true or both false.

## How to write it

### equivalent(p, q)

**p**

A condition. Takes a condition, true or false.

**q**

A condition. Takes a condition, true or false.

## Examples

- $\displaystyle \operatorname{true} \iff \operatorname{true} = \operatorname{true}$

  `equivalent(true, true)`

  In the solver, `equivalent(true, true)` gives `true`.

  [Open in the solver](https://hilberon.com/?q=equivalent%28true%2C%20true%29)

## Related functions

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

  True when the first value is greater than the second: the function form of >.
- [equal](https://hilberon.com/library/equal)

  True when two values are equal: the function form of ==.
- [greater_equal](https://hilberon.com/library/greater_equal)

  True when the first value is at least the second: the function form of >=.
- [eliminate_quantifiers](https://hilberon.com/library/eliminate_quantifiers)

  An equivalent condition with the quantifiers removed.
- [implies](https://hilberon.com/library/implies)

  True unless the first condition is true and the second false.
- [cylindrical_decomposition](https://hilberon.com/library/cylindrical_decomposition)

  Describe where a condition holds as bounds on each variable in turn.

---
Source: https://hilberon.com/library/equivalent
