Metamath Proof Explorer


Theorem divalglem10

Description: Lemma for divalg . (Contributed by Paul Chapman, 21-Mar-2011) (Proof shortened by AV, 2-Oct-2020)

Ref Expression
Hypotheses divalglem8.1 N
divalglem8.2 D
divalglem8.3 D 0
divalglem8.4 S = r 0 | D N r
Assertion divalglem10 ∃! r q 0 r r < D N = q D + r

Proof

Step Hyp Ref Expression
1 divalglem8.1 N
2 divalglem8.2 D
3 divalglem8.3 D 0
4 divalglem8.4 S = r 0 | D N r
5 eqid sup S < = sup S <
6 1 2 3 4 5 divalglem9 ∃! x S x < D
7 elnn0z x 0 x 0 x
8 7 anbi2i x < D x 0 x < D x 0 x
9 an12 x < D x 0 x x x < D 0 x
10 ancom x < D 0 x 0 x x < D
11 10 anbi2i x x < D 0 x x 0 x x < D
12 9 11 bitri x < D x 0 x x 0 x x < D
13 8 12 bitri x < D x 0 x 0 x x < D
14 13 anbi1i x < D x 0 q N = q D + x x 0 x x < D q N = q D + x
15 anass x 0 x x < D q N = q D + x x 0 x x < D q N = q D + x
16 14 15 bitri x < D x 0 q N = q D + x x 0 x x < D q N = q D + x
17 oveq2 r = x q D + r = q D + x
18 17 eqeq2d r = x N = q D + r N = q D + x
19 18 rexbidv r = x q N = q D + r q N = q D + x
20 1 2 3 4 divalglem4 S = r 0 | q N = q D + r
21 19 20 elrab2 x S x 0 q N = q D + x
22 21 anbi2i x < D x S x < D x 0 q N = q D + x
23 ancom x S x < D x < D x S
24 anass x < D x 0 q N = q D + x x < D x 0 q N = q D + x
25 22 23 24 3bitr4i x S x < D x < D x 0 q N = q D + x
26 df-3an 0 x x < D N = q D + x 0 x x < D N = q D + x
27 26 rexbii q 0 x x < D N = q D + x q 0 x x < D N = q D + x
28 r19.42v q 0 x x < D N = q D + x 0 x x < D q N = q D + x
29 27 28 bitri q 0 x x < D N = q D + x 0 x x < D q N = q D + x
30 29 anbi2i x q 0 x x < D N = q D + x x 0 x x < D q N = q D + x
31 16 25 30 3bitr4i x S x < D x q 0 x x < D N = q D + x
32 31 eubii ∃! x x S x < D ∃! x x q 0 x x < D N = q D + x
33 df-reu ∃! x S x < D ∃! x x S x < D
34 df-reu ∃! x q 0 x x < D N = q D + x ∃! x x q 0 x x < D N = q D + x
35 32 33 34 3bitr4i ∃! x S x < D ∃! x q 0 x x < D N = q D + x
36 6 35 mpbi ∃! x q 0 x x < D N = q D + x
37 breq2 x = r 0 x 0 r
38 breq1 x = r x < D r < D
39 oveq2 x = r q D + x = q D + r
40 39 eqeq2d x = r N = q D + x N = q D + r
41 37 38 40 3anbi123d x = r 0 x x < D N = q D + x 0 r r < D N = q D + r
42 41 rexbidv x = r q 0 x x < D N = q D + x q 0 r r < D N = q D + r
43 42 cbvreuvw ∃! x q 0 x x < D N = q D + x ∃! r q 0 r r < D N = q D + r
44 36 43 mpbi ∃! r q 0 r r < D N = q D + r