File: Mathlib/Data/Nat/Pairing.lean

full_name: Nat.pair
code: /-- Pairing function for the natural numbers. -/
@[pp_nodot]
def pair (a b : ℕ) : ℕ 
goal: ℕ

full_name: Nat.unpair
code: /-- Unpairing function for the natural numbers. -/
@[pp_nodot]
def unpair (n : ℕ) : ℕ × ℕ 
goal: ℕ × ℕ

full_name: Nat.pair_unpair
code: @[simp]
theorem pair_unpair (n : ℕ) : pair (unpair n).1 (unpair n).2 = n 
goal: Nat.pair (Nat.unpair n).1 (Nat.unpair n).2 = n

full_name: Nat.pair_unpair'
code: theorem pair_unpair' {n a b} (H : unpair n = (a, b)) : pair a b = n 
goal: Nat.pair a b = n

full_name: Nat.unpair_pair
code: @[simp]
theorem unpair_pair (a b : ℕ) : unpair (pair a b) = (a, b) 
goal: Nat.unpair (Nat.pair a b) = (a, b)

full_name: Nat.pairEquiv_symm_apply
code: /-- An equivalence between `ℕ × ℕ` and `ℕ`. -/
@[simps (config := .asFn)]
def pairEquiv : ℕ × ℕ ≃ ℕ 
goal: ⇑Nat.pairEquiv.symm = Nat.unpair

full_name: Nat.pairEquiv_apply
code: /-- An equivalence between `ℕ × ℕ` and `ℕ`. -/
@[simps (config := .asFn)]
def pairEquiv : ℕ × ℕ ≃ ℕ 
goal: ⇑Nat.pairEquiv = Function.uncurry Nat.pair

full_name: Nat.pairEquiv
code: /-- An equivalence between `ℕ × ℕ` and `ℕ`. -/
@[simps (config := .asFn)]
def pairEquiv : ℕ × ℕ ≃ ℕ 
goal: ℕ × ℕ ≃ ℕ

full_name: Nat.surjective_unpair
code: theorem surjective_unpair : Surjective unpair 
goal: Function.Surjective Nat.unpair

full_name: Nat.pair_eq_pair
code: @[simp]
theorem pair_eq_pair {a b c d : ℕ} : pair a b = pair c d ↔ a = c ∧ b = d 
goal: Nat.pair a b = Nat.pair c d ↔ a = c ∧ b = d

full_name: Nat.unpair_lt
code: theorem unpair_lt {n : ℕ} (n1 : 1 ≤ n) : (unpair n).1 < n 
goal: (Nat.unpair n).1 < n

full_name: Nat.unpair_zero
code: @[simp]
theorem unpair_zero : unpair 0 = 0 
goal: Nat.unpair 0 = 0

full_name: Nat.unpair_left_le
code: theorem unpair_left_le : ∀ n : ℕ, (unpair n).1 ≤ n
  
goal: (Nat.unpair n).1 ≤ n

full_name: Nat.left_le_pair
code: theorem left_le_pair (a b : ℕ) : a ≤ pair a b 
goal: a ≤ Nat.pair a b

full_name: Nat.right_le_pair
code: theorem right_le_pair (a b : ℕ) : b ≤ pair a b 
goal: b ≤ Nat.pair a b

full_name: Nat.unpair_right_le
code: theorem unpair_right_le (n : ℕ) : (unpair n).2 ≤ n 
goal: (Nat.unpair n).2 ≤ n

full_name: Nat.pair_lt_pair_left
code: theorem pair_lt_pair_left {a₁ a₂} (b) (h : a₁ < a₂) : pair a₁ b < pair a₂ b 
goal: Nat.pair a₁ b < Nat.pair a₂ b

full_name: Nat.pair_lt_pair_right
code: theorem pair_lt_pair_right (a) {b₁ b₂} (h : b₁ < b₂) : pair a b₁ < pair a b₂ 
goal: Nat.pair a b₁ < Nat.pair a b₂

full_name: Nat.pair_lt_max_add_one_sq
code: theorem pair_lt_max_add_one_sq (m n : ℕ) : pair m n < (max m n + 1) ^ 2 
goal: Nat.pair m n < (max m n + 1) ^ 2

full_name: Nat.max_sq_add_min_le_pair
code: theorem max_sq_add_min_le_pair (m n : ℕ) : max m n ^ 2 + min m n ≤ pair m n 
goal: max m n ^ 2 + min m n ≤ Nat.pair m n

full_name: Nat.add_le_pair
code: theorem add_le_pair (m n : ℕ) : m + n ≤ pair m n 
goal: m + n ≤ Nat.pair m n

full_name: Nat.unpair_add_le
code: theorem unpair_add_le (n : ℕ) : (unpair n).1 + (unpair n).2 ≤ n 
goal: (Nat.unpair n).1 + (Nat.unpair n).2 ≤ n

full_name: iSup_unpair
code: theorem iSup_unpair {α} [CompleteLattice α] (f : ℕ → ℕ → α) :
    ⨆ n : ℕ, f n.unpair.1 n.unpair.2 = ⨆ (i : ℕ) (j : ℕ), f i j 
goal: ⨆ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⨆ i, ⨆ j, f i j

full_name: iInf_unpair
code: theorem iInf_unpair {α} [CompleteLattice α] (f : ℕ → ℕ → α) :
    ⨅ n : ℕ, f n.unpair.1 n.unpair.2 = ⨅ (i : ℕ) (j : ℕ), f i j 
goal: ⨅ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⨅ i, ⨅ j, f i j

full_name: Set.iUnion_unpair_prod
code: theorem iUnion_unpair_prod {α β} {s : ℕ → Set α} {t : ℕ → Set β} :
    ⋃ n : ℕ, s n.unpair.fst ×ˢ t n.unpair.snd = (⋃ n, s n) ×ˢ ⋃ n, t n 
goal: ⋃ n, s (Nat.unpair n).1 ×ˢ t (Nat.unpair n).2 = (⋃ n, s n) ×ˢ ⋃ n, t n

full_name: Set.iUnion_unpair
code: theorem iUnion_unpair {α} (f : ℕ → ℕ → Set α) :
    ⋃ n : ℕ, f n.unpair.1 n.unpair.2 = ⋃ (i : ℕ) (j : ℕ), f i j 
goal: ⋃ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⋃ i, ⋃ j, f i j

full_name: Set.iInter_unpair
code: theorem iInter_unpair {α} (f : ℕ → ℕ → Set α) :
    ⋂ n : ℕ, f n.unpair.1 n.unpair.2 = ⋂ (i : ℕ) (j : ℕ), f i j 
goal: ⋂ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⋂ i, ⋂ j, f i j