Metamath Proof Explorer


Theorem divides

Description: Define the divides relation. M || N means M divides into N with no remainder. For example, 3 || 6 ( ex-dvds ). As proven in dvdsval3 , M || N <-> ( N mod M ) = 0 . See divides and dvdsval2 for other equivalent expressions. (Contributed by Paul Chapman, 21-Mar-2011)

Ref Expression
Assertion divides M N M N n n M = N

Proof

Step Hyp Ref Expression
1 df-br M N M N
2 df-dvds = x y | x y n n x = y
3 2 eleq2i M N M N x y | x y n n x = y
4 1 3 bitri M N M N x y | x y n n x = y
5 oveq2 x = M n x = n M
6 5 eqeq1d x = M n x = y n M = y
7 6 rexbidv x = M n n x = y n n M = y
8 eqeq2 y = N n M = y n M = N
9 8 rexbidv y = N n n M = y n n M = N
10 7 9 opelopab2 M N M N x y | x y n n x = y n n M = N
11 4 10 syl5bb M N M N n n M = N