Metamath Proof Explorer


Theorem congadd

Description: If two pairs of numbers are componentwise congruent, so are their sums. (Contributed by Stefan O'Rear, 1-Oct-2014)

Ref Expression
Assertion congadd A B C D E A B C A D E A B + D - C + E

Proof

Step Hyp Ref Expression
1 simpl1 A B C D E A
2 zsubcl B C B C
3 2 3adant1 A B C B C
4 3 adantr A B C D E B C
5 zsubcl D E D E
6 5 adantl A B C D E D E
7 dvds2add A B C D E A B C A D E A B C + D - E
8 1 4 6 7 syl3anc A B C D E A B C A D E A B C + D - E
9 8 3impia A B C D E A B C A D E A B C + D - E
10 simpl2 A B C D E B
11 10 zcnd A B C D E B
12 zcn D D
13 12 ad2antrl A B C D E D
14 simpl3 A B C D E C
15 14 zcnd A B C D E C
16 zcn E E
17 16 ad2antll A B C D E E
18 11 13 15 17 addsub4d A B C D E B + D - C + E = B C + D - E
19 18 3adant3 A B C D E A B C A D E B + D - C + E = B C + D - E
20 9 19 breqtrrd A B C D E A B C A D E A B + D - C + E