Metamath Proof Explorer


Theorem congabseq

Description: If two integers are congruent, they are either equal or separated by at least the congruence base. (Contributed by Stefan O'Rear, 4-Oct-2014)

Ref Expression
Assertion congabseq A B C A B C B C < A B = C

Proof

Step Hyp Ref Expression
1 zcn B B
2 1 3ad2ant2 A B C B
3 2 ad2antrr A B C A B C B C < A B
4 zcn C C
5 4 3ad2ant3 A B C C
6 5 ad2antrr A B C A B C B C < A C
7 zsubcl B C B C
8 7 3adant1 A B C B C
9 8 zcnd A B C B C
10 9 abscld A B C B C
11 10 adantr A B C A B C B C
12 nnre A A
13 12 3ad2ant1 A B C A
14 13 adantr A B C A B C A
15 11 14 ltnled A B C A B C B C < A ¬ A B C
16 15 biimpa A B C A B C B C < A ¬ A B C
17 nnz A A
18 17 3ad2ant1 A B C A
19 18 ad3antrrr A B C A B C B C < A B C 0 A
20 8 ad3antrrr A B C A B C B C < A B C 0 B C
21 simpr A B C A B C B C < A B C 0 B C 0
22 19 20 21 3jca A B C A B C B C < A B C 0 A B C B C 0
23 simpllr A B C A B C B C < A B C 0 A B C
24 dvdsleabs A B C B C 0 A B C A B C
25 22 23 24 sylc A B C A B C B C < A B C 0 A B C
26 25 ex A B C A B C B C < A B C 0 A B C
27 26 necon1bd A B C A B C B C < A ¬ A B C B C = 0
28 16 27 mpd A B C A B C B C < A B C = 0
29 3 6 28 subeq0d A B C A B C B C < A B = C
30 oveq1 B = C B C = C C
31 30 adantl A B C A B C B = C B C = C C
32 5 ad2antrr A B C A B C B = C C
33 32 subidd A B C A B C B = C C C = 0
34 31 33 eqtrd A B C A B C B = C B C = 0
35 34 abs00bd A B C A B C B = C B C = 0
36 nngt0 A 0 < A
37 36 3ad2ant1 A B C 0 < A
38 37 ad2antrr A B C A B C B = C 0 < A
39 35 38 eqbrtrd A B C A B C B = C B C < A
40 29 39 impbida A B C A B C B C < A B = C