Metamath Proof Explorer


Theorem cncongrcoprm

Description: Corollary 1 of Cancellability of Congruences: Two products with a common factor are congruent modulo an integer being coprime to the common factor iff the other factors are congruent modulo the integer. (Contributed by AV, 13-Jul-2021)

Ref Expression
Assertion cncongrcoprm ABCNCgcdN=1ACmodN=BCmodNAmodN=BmodN

Proof

Step Hyp Ref Expression
1 simpl NCgcdN=1N
2 nncn NN
3 2 div1d NN1=N
4 oveq2 CgcdN=1NCgcdN=N1
5 4 eqcomd CgcdN=1N1=NCgcdN
6 3 5 sylan9req NCgcdN=1N=NCgcdN
7 1 6 jca NCgcdN=1NN=NCgcdN
8 cncongr ABCNN=NCgcdNACmodN=BCmodNAmodN=BmodN
9 7 8 sylan2 ABCNCgcdN=1ACmodN=BCmodNAmodN=BmodN