Metamath Proof Explorer


Theorem divalg2

Description: The division algorithm (theorem) for a positive divisor. (Contributed by Paul Chapman, 21-Mar-2011)

Ref Expression
Assertion divalg2 ND∃!r0r<DDNr

Proof

Step Hyp Ref Expression
1 nnz DD
2 nnne0 DD0
3 1 2 jca DDD0
4 divalg NDD0∃!rq0rr<DN=qD+r
5 divalgb NDD0∃!rq0rr<DN=qD+r∃!r0r<DDNr
6 4 5 mpbid NDD0∃!r0r<DDNr
7 6 3expb NDD0∃!r0r<DDNr
8 3 7 sylan2 ND∃!r0r<DDNr
9 nnre DD
10 nnnn0 DD0
11 10 nn0ge0d D0D
12 9 11 absidd DD=D
13 12 breq2d Dr<Dr<D
14 13 anbi1d Dr<DDNrr<DDNr
15 14 reubidv D∃!r0r<DDNr∃!r0r<DDNr
16 15 adantl ND∃!r0r<DDNr∃!r0r<DDNr
17 8 16 mpbid ND∃!r0r<DDNr