English
xor is the bitwise exclusive OR on integers.
Русский
xor — побитовая исключающая или на целых.
LaTeX
$$$\\mathrm{xor}: \\mathbb{Z} \\to \\mathbb{Z} \\to \\mathbb{Z}$$$
Lean4
/-- `xor` computes the bitwise `xor` of two natural numbers -/
protected def xor : ℤ → ℤ → ℤ
| (m : ℕ), (n : ℕ) => (m ^^^ n)
| (m : ℕ), -[n+1] => -[(m ^^^ n)+1]
| -[m+1], (n : ℕ) => -[(m ^^^ n)+1]
| -[m+1], -[n+1] => (m ^^^ n)