mathlib documentation

data.nat.pairing

def nat.mkpair (a b : ℕ) :

Pairing function for the natural numbers.

Equations
def nat.unpair (n : ℕ) :

Unpairing function for the natural numbers.

Equations
@[simp]
theorem nat.mkpair_unpair (n : ℕ) :

theorem nat.mkpair_unpair' {n a b : ℕ} (H : n.unpair = (a, b)) :
a.mkpair b = n

@[simp]
theorem nat.unpair_mkpair (a b : ℕ) :
(a.mkpair b).unpair = (a, b)

theorem nat.unpair_lt {n : ℕ} (n1 : 1 ≤ n) :

theorem nat.unpair_le_left (n : ℕ) :

theorem nat.le_mkpair_left (a b : ℕ) :
a ≤ a.mkpair b

theorem nat.le_mkpair_right (a b : ℕ) :
b ≤ a.mkpair b

theorem nat.unpair_le_right (n : ℕ) :

theorem nat.mkpair_lt_mkpair_left {a₁ a₂ : ℕ} (b : ℕ) (h : a₁ < a₂) :
a₁.mkpair b < a₂.mkpair b

theorem nat.mkpair_lt_mkpair_right (a : ℕ) {b₁ b₂ : ℕ} (h : b₁ < b₂) :
a.mkpair b₁ < a.mkpair b₂