# Equal

*The Equal type class describes a type which can be compared for observational equality.*

A `Equal`

must satisfy the following laws:

- Reflexivity:
`x === x`

for any`x`

.

- The indiscernibility of identicals:
- For any
`x`

and`y`

, if`x === y`

, then`x`

and`y`

are indiscernable

- For any
- The identity of indiscernibles:
- For any
`x`

and`y`

, if`x`

and`y`

are indiscernable, then`x === y`

- For any

*Indiscernability* formalizes the intuitive notion of two objects having the exact same properties. Two values `x, y: A`

are indiscernable if there exists no function `f: A => Boolean`

such that `f(x)`

is `true`

and `f(y)`

is `false`

.

These laws entail symmetry and transitivity, which should be easier to test, since they donâ€™t universally quantify over all possible predicates in the language:

- Symmetry:
`x === y`

if and only if`y === x`

- Transitivity
- if
`x === y`

and`y === z`

, then`x === z`

- if

## Instance declaration

```
scala> import scalaz._
import scalaz._
scala> import Scalaz._
import Scalaz._
scala> List(1, 2, 3) === List(1, 2, 3)
res0: Boolean = true
```