Metamath Proof Explorer


Theorem congtr

Description: A wff of the form A || ( B - C ) is interpreted as a congruential equation. This is similar to ( B mod A ) = ( C mod A ) , but is defined such that behavior is regular for zero and negative values of A . To use this concept effectively, we need to show that congruential equations behave similarly to normal equations; first a transitivity law. Idea for the future: If there was a congruential equation symbol, it could incorporate type constraints, so that most of these would not need them. (Contributed by Stefan O'Rear, 1-Oct-2014)

Ref Expression
Assertion congtr A B C D A B C A C D A B D

Proof

Step Hyp Ref Expression
1 simp1l A B C D A B C A C D A
2 simp1r A B C D A B C A C D B
3 simp2l A B C D A B C A C D C
4 2 3 zsubcld A B C D A B C A C D B C
5 zsubcl C D C D
6 5 3ad2ant2 A B C D A B C A C D C D
7 simp3 A B C D A B C A C D A B C A C D
8 dvds2add A B C C D A B C A C D A B C + C - D
9 8 imp A B C C D A B C A C D A B C + C - D
10 1 4 6 7 9 syl31anc A B C D A B C A C D A B C + C - D
11 zcn B B
12 11 adantl A B B
13 12 3ad2ant1 A B C D A B C A C D B
14 zcn C C
15 14 adantr C D C
16 15 3ad2ant2 A B C D A B C A C D C
17 zcn D D
18 17 adantl C D D
19 18 3ad2ant2 A B C D A B C A C D D
20 13 16 19 npncand A B C D A B C A C D B C + C - D = B D
21 10 20 breqtrd A B C D A B C A C D A B D