Metamath Proof Explorer


Theorem dvdssqlem

Description: Lemma for dvdssq . (Contributed by Scott Fenton, 18-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion dvdssqlem MNMNM2N2

Proof

Step Hyp Ref Expression
1 nnz MM
2 nnz NN
3 dvdssqim MNMNM2N2
4 1 2 3 syl2an MNMNM2N2
5 sqgcd MNMgcdN2=M2gcdN2
6 5 adantr MNM2N2MgcdN2=M2gcdN2
7 nnsqcl MM2
8 nnsqcl NN2
9 gcdeq M2N2M2gcdN2=M2M2N2
10 7 8 9 syl2an MNM2gcdN2=M2M2N2
11 10 biimpar MNM2N2M2gcdN2=M2
12 6 11 eqtrd MNM2N2MgcdN2=M2
13 gcdcl MNMgcdN0
14 1 2 13 syl2an MNMgcdN0
15 14 nn0red MNMgcdN
16 14 nn0ge0d MN0MgcdN
17 nnre MM
18 17 adantr MNM
19 nnnn0 MM0
20 19 nn0ge0d M0M
21 20 adantr MN0M
22 sq11 MgcdN0MgcdNM0MMgcdN2=M2MgcdN=M
23 15 16 18 21 22 syl22anc MNMgcdN2=M2MgcdN=M
24 23 adantr MNM2N2MgcdN2=M2MgcdN=M
25 12 24 mpbid MNM2N2MgcdN=M
26 gcddvds MNMgcdNMMgcdNN
27 1 2 26 syl2an MNMgcdNMMgcdNN
28 27 adantr MNM2N2MgcdNMMgcdNN
29 28 simprd MNM2N2MgcdNN
30 25 29 eqbrtrrd MNM2N2MN
31 30 ex MNM2N2MN
32 4 31 impbid MNMNM2N2