Metamath Proof Explorer


Theorem nn0sq11

Description: The square function is one-to-one for nonnegative integers. (Contributed by AV, 25-Jun-2023)

Ref Expression
Assertion nn0sq11 ⊢ A ∈ ℕ 0 ∧ B ∈ ℕ 0 → A 2 = B 2 ↔ A = B

Proof

Step Hyp Ref Expression
1 nn0re ⊢ A ∈ ℕ 0 → A ∈ ℝ
2 nn0ge0 ⊢ A ∈ ℕ 0 → 0 ≤ A
3 1 2 jca ⊢ A ∈ ℕ 0 → A ∈ ℝ ∧ 0 ≤ A
4 nn0re ⊢ B ∈ ℕ 0 → B ∈ ℝ
5 nn0ge0 ⊢ B ∈ ℕ 0 → 0 ≤ B
6 4 5 jca ⊢ B ∈ ℕ 0 → B ∈ ℝ ∧ 0 ≤ B
7 sq11 ⊢ A ∈ ℝ ∧ 0 ≤ A ∧ B ∈ ℝ ∧ 0 ≤ B → A 2 = B 2 ↔ A = B
8 3 6 7 syl2an ⊢ A ∈ ℕ 0 ∧ B ∈ ℕ 0 → A 2 = B 2 ↔ A = B