Metamath Proof Explorer


Theorem numdensq

Description: Squaring a rational squares its canonical components. (Contributed by Stefan O'Rear, 15-Sep-2014)

Ref Expression
Assertion numdensq A numer A 2 = numer A 2 denom A 2 = denom A 2

Proof

Step Hyp Ref Expression
1 qnumdencoprm A numer A gcd denom A = 1
2 1 oveq1d A numer A gcd denom A 2 = 1 2
3 qnumcl A numer A
4 qdencl A denom A
5 4 nnzd A denom A
6 zgcdsq numer A denom A numer A gcd denom A 2 = numer A 2 gcd denom A 2
7 3 5 6 syl2anc A numer A gcd denom A 2 = numer A 2 gcd denom A 2
8 sq1 1 2 = 1
9 8 a1i A 1 2 = 1
10 2 7 9 3eqtr3d A numer A 2 gcd denom A 2 = 1
11 qeqnumdivden A A = numer A denom A
12 11 oveq1d A A 2 = numer A denom A 2
13 3 zcnd A numer A
14 4 nncnd A denom A
15 4 nnne0d A denom A 0
16 13 14 15 sqdivd A numer A denom A 2 = numer A 2 denom A 2
17 12 16 eqtrd A A 2 = numer A 2 denom A 2
18 qsqcl A A 2
19 zsqcl numer A numer A 2
20 3 19 syl A numer A 2
21 4 nnsqcld A denom A 2
22 qnumdenbi A 2 numer A 2 denom A 2 numer A 2 gcd denom A 2 = 1 A 2 = numer A 2 denom A 2 numer A 2 = numer A 2 denom A 2 = denom A 2
23 18 20 21 22 syl3anc A numer A 2 gcd denom A 2 = 1 A 2 = numer A 2 denom A 2 numer A 2 = numer A 2 denom A 2 = denom A 2
24 10 17 23 mpbi2and A numer A 2 = numer A 2 denom A 2 = denom A 2