Metamath Proof Explorer


Theorem negmod0

Description: A is divisible by B iff its negative is. (Contributed by Jeff Madsen, 2-Sep-2009) (Proof shortened by Fan Zheng, 7-Jun-2016)

Ref Expression
Assertion negmod0 AB+AmodB=0AmodB=0

Proof

Step Hyp Ref Expression
1 rerpdivcl AB+AB
2 recn ABAB
3 znegclb ABABAB
4 1 2 3 3syl AB+ABAB
5 recn AA
6 5 adantr AB+A
7 rpcn B+B
8 7 adantl AB+B
9 rpne0 B+B0
10 9 adantl AB+B0
11 6 8 10 divnegd AB+AB=AB
12 11 eleq1d AB+ABAB
13 4 12 bitrd AB+ABAB
14 mod0 AB+AmodB=0AB
15 renegcl AA
16 mod0 AB+AmodB=0AB
17 15 16 sylan AB+AmodB=0AB
18 13 14 17 3bitr4d AB+AmodB=0AmodB=0