Metamath Proof Explorer


Theorem mumullem2

Description: Lemma for mumul . The product of two coprime squarefree numbers is squarefree. (Contributed by Mario Carneiro, 3-Oct-2014)

Ref Expression
Assertion mumullem2 A B A gcd B = 1 μ A 0 μ B 0 μ A B 0

Proof

Step Hyp Ref Expression
1 r19.26 p p pCnt A 1 p pCnt B 1 p p pCnt A 1 p p pCnt B 1
2 simpr A B A gcd B = 1 p p
3 simpl1 A B A gcd B = 1 p A
4 2 3 pccld A B A gcd B = 1 p p pCnt A 0
5 4 nn0red A B A gcd B = 1 p p pCnt A
6 simpl2 A B A gcd B = 1 p B
7 2 6 pccld A B A gcd B = 1 p p pCnt B 0
8 7 nn0red A B A gcd B = 1 p p pCnt B
9 1red A B A gcd B = 1 p 1
10 le2add p pCnt A p pCnt B 1 1 p pCnt A 1 p pCnt B 1 p pCnt A + p pCnt B 1 + 1
11 5 8 9 9 10 syl22anc A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p pCnt A + p pCnt B 1 + 1
12 ax-1ne0 1 0
13 simpl3 A B A gcd B = 1 p A gcd B = 1
14 13 oveq2d A B A gcd B = 1 p p pCnt A gcd B = p pCnt 1
15 3 nnzd A B A gcd B = 1 p A
16 6 nnzd A B A gcd B = 1 p B
17 pcgcd p A B p pCnt A gcd B = if p pCnt A p pCnt B p pCnt A p pCnt B
18 2 15 16 17 syl3anc A B A gcd B = 1 p p pCnt A gcd B = if p pCnt A p pCnt B p pCnt A p pCnt B
19 pc1 p p pCnt 1 = 0
20 19 adantl A B A gcd B = 1 p p pCnt 1 = 0
21 14 18 20 3eqtr3d A B A gcd B = 1 p if p pCnt A p pCnt B p pCnt A p pCnt B = 0
22 ifid if p pCnt A p pCnt B 1 1 = 1
23 ifeq12 1 = p pCnt A 1 = p pCnt B if p pCnt A p pCnt B 1 1 = if p pCnt A p pCnt B p pCnt A p pCnt B
24 22 23 eqtr3id 1 = p pCnt A 1 = p pCnt B 1 = if p pCnt A p pCnt B p pCnt A p pCnt B
25 24 eqeq1d 1 = p pCnt A 1 = p pCnt B 1 = 0 if p pCnt A p pCnt B p pCnt A p pCnt B = 0
26 21 25 syl5ibrcom A B A gcd B = 1 p 1 = p pCnt A 1 = p pCnt B 1 = 0
27 26 necon3ad A B A gcd B = 1 p 1 0 ¬ 1 = p pCnt A 1 = p pCnt B
28 12 27 mpi A B A gcd B = 1 p ¬ 1 = p pCnt A 1 = p pCnt B
29 ax-1cn 1
30 5 recnd A B A gcd B = 1 p p pCnt A
31 subeq0 1 p pCnt A 1 p pCnt A = 0 1 = p pCnt A
32 29 30 31 sylancr A B A gcd B = 1 p 1 p pCnt A = 0 1 = p pCnt A
33 8 recnd A B A gcd B = 1 p p pCnt B
34 subeq0 1 p pCnt B 1 p pCnt B = 0 1 = p pCnt B
35 29 33 34 sylancr A B A gcd B = 1 p 1 p pCnt B = 0 1 = p pCnt B
36 32 35 anbi12d A B A gcd B = 1 p 1 p pCnt A = 0 1 p pCnt B = 0 1 = p pCnt A 1 = p pCnt B
37 28 36 mtbird A B A gcd B = 1 p ¬ 1 p pCnt A = 0 1 p pCnt B = 0
38 37 adantr A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 ¬ 1 p pCnt A = 0 1 p pCnt B = 0
39 eqcom 1 + 1 = p pCnt A + p pCnt B p pCnt A + p pCnt B = 1 + 1
40 1re 1
41 40 40 readdcli 1 + 1
42 41 recni 1 + 1
43 4 7 nn0addcld A B A gcd B = 1 p p pCnt A + p pCnt B 0
44 43 nn0red A B A gcd B = 1 p p pCnt A + p pCnt B
45 44 recnd A B A gcd B = 1 p p pCnt A + p pCnt B
46 subeq0 1 + 1 p pCnt A + p pCnt B 1 + 1 - p pCnt A + p pCnt B = 0 1 + 1 = p pCnt A + p pCnt B
47 42 45 46 sylancr A B A gcd B = 1 p 1 + 1 - p pCnt A + p pCnt B = 0 1 + 1 = p pCnt A + p pCnt B
48 47 39 bitrdi A B A gcd B = 1 p 1 + 1 - p pCnt A + p pCnt B = 0 p pCnt A + p pCnt B = 1 + 1
49 9 recnd A B A gcd B = 1 p 1
50 49 49 30 33 addsub4d A B A gcd B = 1 p 1 + 1 - p pCnt A + p pCnt B = 1 p pCnt A + 1 - p pCnt B
51 50 eqeq1d A B A gcd B = 1 p 1 + 1 - p pCnt A + p pCnt B = 0 1 p pCnt A + 1 - p pCnt B = 0
52 48 51 bitr3d A B A gcd B = 1 p p pCnt A + p pCnt B = 1 + 1 1 p pCnt A + 1 - p pCnt B = 0
53 52 adantr A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p pCnt A + p pCnt B = 1 + 1 1 p pCnt A + 1 - p pCnt B = 0
54 subge0 1 p pCnt A 0 1 p pCnt A p pCnt A 1
55 40 5 54 sylancr A B A gcd B = 1 p 0 1 p pCnt A p pCnt A 1
56 subge0 1 p pCnt B 0 1 p pCnt B p pCnt B 1
57 40 8 56 sylancr A B A gcd B = 1 p 0 1 p pCnt B p pCnt B 1
58 55 57 anbi12d A B A gcd B = 1 p 0 1 p pCnt A 0 1 p pCnt B p pCnt A 1 p pCnt B 1
59 resubcl 1 p pCnt A 1 p pCnt A
60 40 5 59 sylancr A B A gcd B = 1 p 1 p pCnt A
61 resubcl 1 p pCnt B 1 p pCnt B
62 40 8 61 sylancr A B A gcd B = 1 p 1 p pCnt B
63 add20 1 p pCnt A 0 1 p pCnt A 1 p pCnt B 0 1 p pCnt B 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
64 63 an4s 1 p pCnt A 1 p pCnt B 0 1 p pCnt A 0 1 p pCnt B 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
65 64 ex 1 p pCnt A 1 p pCnt B 0 1 p pCnt A 0 1 p pCnt B 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
66 60 62 65 syl2anc A B A gcd B = 1 p 0 1 p pCnt A 0 1 p pCnt B 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
67 58 66 sylbird A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
68 67 imp A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 p pCnt A + 1 - p pCnt B = 0 1 p pCnt A = 0 1 p pCnt B = 0
69 53 68 bitrd A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p pCnt A + p pCnt B = 1 + 1 1 p pCnt A = 0 1 p pCnt B = 0
70 39 69 syl5bb A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 + 1 = p pCnt A + p pCnt B 1 p pCnt A = 0 1 p pCnt B = 0
71 70 necon3abid A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 + 1 p pCnt A + p pCnt B ¬ 1 p pCnt A = 0 1 p pCnt B = 0
72 38 71 mpbird A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 + 1 p pCnt A + p pCnt B
73 72 ex A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 1 + 1 p pCnt A + p pCnt B
74 11 73 jcad A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p pCnt A + p pCnt B 1 + 1 1 + 1 p pCnt A + p pCnt B
75 nnz A A
76 nnne0 A A 0
77 75 76 jca A A A 0
78 3 77 syl A B A gcd B = 1 p A A 0
79 nnz B B
80 nnne0 B B 0
81 79 80 jca B B B 0
82 6 81 syl A B A gcd B = 1 p B B 0
83 pcmul p A A 0 B B 0 p pCnt A B = p pCnt A + p pCnt B
84 2 78 82 83 syl3anc A B A gcd B = 1 p p pCnt A B = p pCnt A + p pCnt B
85 84 breq1d A B A gcd B = 1 p p pCnt A B 1 p pCnt A + p pCnt B 1
86 1nn0 1 0
87 nn0leltp1 p pCnt A + p pCnt B 0 1 0 p pCnt A + p pCnt B 1 p pCnt A + p pCnt B < 1 + 1
88 43 86 87 sylancl A B A gcd B = 1 p p pCnt A + p pCnt B 1 p pCnt A + p pCnt B < 1 + 1
89 ltlen p pCnt A + p pCnt B 1 + 1 p pCnt A + p pCnt B < 1 + 1 p pCnt A + p pCnt B 1 + 1 1 + 1 p pCnt A + p pCnt B
90 44 41 89 sylancl A B A gcd B = 1 p p pCnt A + p pCnt B < 1 + 1 p pCnt A + p pCnt B 1 + 1 1 + 1 p pCnt A + p pCnt B
91 85 88 90 3bitrd A B A gcd B = 1 p p pCnt A B 1 p pCnt A + p pCnt B 1 + 1 1 + 1 p pCnt A + p pCnt B
92 74 91 sylibrd A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p pCnt A B 1
93 92 ralimdva A B A gcd B = 1 p p pCnt A 1 p pCnt B 1 p p pCnt A B 1
94 1 93 syl5bir A B A gcd B = 1 p p pCnt A 1 p p pCnt B 1 p p pCnt A B 1
95 issqf A μ A 0 p p pCnt A 1
96 issqf B μ B 0 p p pCnt B 1
97 95 96 bi2anan9 A B μ A 0 μ B 0 p p pCnt A 1 p p pCnt B 1
98 97 3adant3 A B A gcd B = 1 μ A 0 μ B 0 p p pCnt A 1 p p pCnt B 1
99 nnmulcl A B A B
100 99 3adant3 A B A gcd B = 1 A B
101 issqf A B μ A B 0 p p pCnt A B 1
102 100 101 syl A B A gcd B = 1 μ A B 0 p p pCnt A B 1
103 94 98 102 3imtr4d A B A gcd B = 1 μ A 0 μ B 0 μ A B 0
104 103 imp A B A gcd B = 1 μ A 0 μ B 0 μ A B 0