Metamath Proof Explorer


Theorem cncongr

Description: Cancellability of Congruences (see ProofWiki "Cancellability of Congruences, https://proofwiki.org/wiki/Cancellability_of_Congruences , 10-Jul-2021): Two products with a common factor are congruent modulo a positive integer iff the other factors are congruent modulo the integer divided by the greates common divisor of the integer and the common factor. See also Theorem 5.4 "Cancellation law" in ApostolNT p. 109. (Contributed by AV, 13-Jul-2021)

Ref Expression
Assertion cncongr ( ( ( ๐ด โˆˆ โ„ค โˆง ๐ต โˆˆ โ„ค โˆง ๐ถ โˆˆ โ„ค ) โˆง ( ๐‘ โˆˆ โ„• โˆง ๐‘€ = ( ๐‘ / ( ๐ถ gcd ๐‘ ) ) ) ) โ†’ ( ( ( ๐ด ยท ๐ถ ) mod ๐‘ ) = ( ( ๐ต ยท ๐ถ ) mod ๐‘ ) โ†” ( ๐ด mod ๐‘€ ) = ( ๐ต mod ๐‘€ ) ) )

Proof

Step Hyp Ref Expression
1 cncongr1 โŠข ( ( ( ๐ด โˆˆ โ„ค โˆง ๐ต โˆˆ โ„ค โˆง ๐ถ โˆˆ โ„ค ) โˆง ( ๐‘ โˆˆ โ„• โˆง ๐‘€ = ( ๐‘ / ( ๐ถ gcd ๐‘ ) ) ) ) โ†’ ( ( ( ๐ด ยท ๐ถ ) mod ๐‘ ) = ( ( ๐ต ยท ๐ถ ) mod ๐‘ ) โ†’ ( ๐ด mod ๐‘€ ) = ( ๐ต mod ๐‘€ ) ) )
2 cncongr2 โŠข ( ( ( ๐ด โˆˆ โ„ค โˆง ๐ต โˆˆ โ„ค โˆง ๐ถ โˆˆ โ„ค ) โˆง ( ๐‘ โˆˆ โ„• โˆง ๐‘€ = ( ๐‘ / ( ๐ถ gcd ๐‘ ) ) ) ) โ†’ ( ( ๐ด mod ๐‘€ ) = ( ๐ต mod ๐‘€ ) โ†’ ( ( ๐ด ยท ๐ถ ) mod ๐‘ ) = ( ( ๐ต ยท ๐ถ ) mod ๐‘ ) ) )
3 1 2 impbid โŠข ( ( ( ๐ด โˆˆ โ„ค โˆง ๐ต โˆˆ โ„ค โˆง ๐ถ โˆˆ โ„ค ) โˆง ( ๐‘ โˆˆ โ„• โˆง ๐‘€ = ( ๐‘ / ( ๐ถ gcd ๐‘ ) ) ) ) โ†’ ( ( ( ๐ด ยท ๐ถ ) mod ๐‘ ) = ( ( ๐ต ยท ๐ถ ) mod ๐‘ ) โ†” ( ๐ด mod ๐‘€ ) = ( ๐ต mod ๐‘€ ) ) )