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 ABCDABCACDABD

Proof

Step Hyp Ref Expression
1 simp1l ABCDABCACDA
2 simp1r ABCDABCACDB
3 simp2l ABCDABCACDC
4 2 3 zsubcld ABCDABCACDBC
5 zsubcl CDCD
6 5 3ad2ant2 ABCDABCACDCD
7 simp3 ABCDABCACDABCACD
8 dvds2add ABCCDABCACDABC+C-D
9 8 imp ABCCDABCACDABC+C-D
10 1 4 6 7 9 syl31anc ABCDABCACDABC+C-D
11 zcn BB
12 11 adantl ABB
13 12 3ad2ant1 ABCDABCACDB
14 zcn CC
15 14 adantr CDC
16 15 3ad2ant2 ABCDABCACDC
17 zcn DD
18 17 adantl CDD
19 18 3ad2ant2 ABCDABCACDD
20 13 16 19 npncand ABCDABCACDBC+C-D=BD
21 10 20 breqtrd ABCDABCACDABD