Metamath Proof Explorer


Theorem modmulnn

Description: Move a positive integer in and out of a floor in the first argument of a modulo operation. (Contributed by NM, 2-Jan-2009)

Ref Expression
Assertion modmulnn NAMNAmod N MNAmod N M

Proof

Step Hyp Ref Expression
1 nnre NN
2 reflcl AA
3 remulcl NANA
4 1 2 3 syl2an NANA
5 4 3adant3 NAMNA
6 remulcl NANA
7 1 6 sylan NANA
8 reflcl NANA
9 7 8 syl NANA
10 9 3adant3 NAMNA
11 nnmulcl NM N M
12 11 nnred NM N M
13 12 3adant2 NAM N M
14 nncn NN
15 nnne0 NN0
16 14 15 jca NNN0
17 nncn MM
18 nnne0 MM0
19 17 18 jca MMM0
20 mulne0 NN0MM0 N M0
21 16 19 20 syl2an NM N M0
22 21 3adant2 NAM N M0
23 5 13 22 redivcld NAMNA N M
24 reflcl NA N MNA N M
25 23 24 syl NAMNA N M
26 13 25 remulcld NAM N MNA N M
27 nnnn0 NN0
28 flmulnn0 N0ANANA
29 27 28 sylan NANANA
30 29 3adant3 NAMNANA
31 5 10 26 30 lesub1dd NAMNA N MNA N MNA N MNA N M
32 11 nnrpd NM N M+
33 modval NA N M+NAmod N M=NA N MNA N M
34 5 32 33 3imp3i2an NAMNAmod N M=NA N MNA N M
35 modval NA N M+NAmod N M=NA N MNA N M
36 10 32 35 3imp3i2an NAMNAmod N M=NA N MNA N M
37 7 3adant3 NAMNA
38 fldiv NA N MNA N M=NA N M
39 37 11 38 3imp3i2an NAMNA N M=NA N M
40 fldiv AMAM=AM
41 40 3adant3 AMNAM=AM
42 2 recnd AA
43 divcan5 AMM0NN0NA N M=AM
44 42 19 16 43 syl3an AMNNA N M=AM
45 44 fveq2d AMNNA N M=AM
46 recn AA
47 divcan5 AMM0NN0NA N M=AM
48 46 19 16 47 syl3an AMNNA N M=AM
49 48 fveq2d AMNNA N M=AM
50 41 45 49 3eqtr4rd AMNNA N M=NA N M
51 50 3comr NAMNA N M=NA N M
52 39 51 eqtrd NAMNA N M=NA N M
53 52 oveq2d NAM N MNA N M= N MNA N M
54 53 oveq2d NAMNA N MNA N M=NA N MNA N M
55 36 54 eqtrd NAMNAmod N M=NA N MNA N M
56 31 34 55 3brtr4d NAMNAmod N MNAmod N M