Metamath Proof Explorer


Theorem cncongrprm

Description: Corollary 2 of Cancellability of Congruences: Two products with a common factor are congruent modulo a prime number not dividing the common factor iff the other factors are congruent modulo the prime number. (Contributed by AV, 13-Jul-2021)

Ref Expression
Assertion cncongrprm ABCP¬PCACmodP=BCmodPAmodP=BmodP

Proof

Step Hyp Ref Expression
1 prmnn PP
2 1 ad2antrl ABCP¬PCP
3 coprm PC¬PCPgcdC=1
4 prmz PP
5 gcdcom PCPgcdC=CgcdP
6 4 5 sylan PCPgcdC=CgcdP
7 6 eqeq1d PCPgcdC=1CgcdP=1
8 3 7 bitrd PC¬PCCgcdP=1
9 8 ancoms CP¬PCCgcdP=1
10 9 biimpd CP¬PCCgcdP=1
11 10 expimpd CP¬PCCgcdP=1
12 11 3ad2ant3 ABCP¬PCCgcdP=1
13 12 imp ABCP¬PCCgcdP=1
14 2 13 jca ABCP¬PCPCgcdP=1
15 cncongrcoprm ABCPCgcdP=1ACmodP=BCmodPAmodP=BmodP
16 14 15 syldan ABCP¬PCACmodP=BCmodPAmodP=BmodP