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