Metamath Proof Explorer


Theorem modfsummods

Description: Induction step for modfsummod . (Contributed by Alexander van der Vekens, 1-Sep-2018)

Ref Expression
Assertion modfsummods A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N

Proof

Step Hyp Ref Expression
1 snssi z A z A
2 ssequn1 z A z A = A
3 uncom z A = A z
4 3 eqeq1i z A = A A z = A
5 sumeq1 A = A z k A B = k A z B
6 5 oveq1d A = A z k A B mod N = k A z B mod N
7 sumeq1 A = A z k A B mod N = k A z B mod N
8 7 oveq1d A = A z k A B mod N mod N = k A z B mod N mod N
9 6 8 eqeq12d A = A z k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
10 9 eqcoms A z = A k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
11 4 10 sylbi z A = A k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
12 11 biimpd z A = A k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
13 12 a1d z A = A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
14 2 13 sylbi z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
15 1 14 syl z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
16 df-nel z A ¬ z A
17 simp1 A Fin N k A z B A Fin
18 17 ad2antlr z A A Fin N k A z B k A B mod N = k A B mod N mod N A Fin
19 simpl z A A Fin N k A z B z A
20 19 adantr z A A Fin N k A z B k A B mod N = k A B mod N mod N z A
21 vex z V
22 20 21 jctil z A A Fin N k A z B k A B mod N = k A B mod N mod N z V z A
23 simplr3 z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B
24 fsumsplitsnun A Fin z V z A k A z B k A z B = k A B + z / k B
25 18 22 23 24 syl3anc z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B = k A B + z / k B
26 25 oveq1d z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A B + z / k B mod N
27 ralunb k A z B k A B k z B
28 simpl k A B k z B k A B
29 27 28 sylbi k A z B k A B
30 fsumzcl2 A Fin k A B k A B
31 29 30 sylan2 A Fin k A z B k A B
32 31 3adant2 A Fin N k A z B k A B
33 32 adantl z A A Fin N k A z B k A B
34 33 zred z A A Fin N k A z B k A B
35 modfsummodslem1 k A z B z / k B
36 35 3ad2ant3 A Fin N k A z B z / k B
37 36 adantl z A A Fin N k A z B z / k B
38 37 zred z A A Fin N k A z B z / k B
39 nnrp N N +
40 39 3ad2ant2 A Fin N k A z B N +
41 40 adantl z A A Fin N k A z B N +
42 modaddabs k A B z / k B N + k A B mod N + z / k B mod N mod N = k A B + z / k B mod N
43 34 38 41 42 syl3anc z A A Fin N k A z B k A B mod N + z / k B mod N mod N = k A B + z / k B mod N
44 43 eqcomd z A A Fin N k A z B k A B + z / k B mod N = k A B mod N + z / k B mod N mod N
45 44 adantr z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B + z / k B mod N = k A B mod N + z / k B mod N mod N
46 simpr z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N = k A B mod N mod N
47 35 zred k A z B z / k B
48 47 3ad2ant3 A Fin N k A z B z / k B
49 48 adantl z A A Fin N k A z B z / k B
50 49 41 jca z A A Fin N k A z B z / k B N +
51 50 adantr z A A Fin N k A z B k A B mod N = k A B mod N mod N z / k B N +
52 modabs2 z / k B N + z / k B mod N mod N = z / k B mod N
53 52 eqcomd z / k B N + z / k B mod N = z / k B mod N mod N
54 51 53 syl z A A Fin N k A z B k A B mod N = k A B mod N mod N z / k B mod N = z / k B mod N mod N
55 46 54 oveq12d z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N + z / k B mod N = k A B mod N mod N + z / k B mod N mod N
56 55 oveq1d z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N + z / k B mod N mod N = k A B mod N mod N + z / k B mod N mod N mod N
57 45 56 eqtrd z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B + z / k B mod N = k A B mod N mod N + z / k B mod N mod N mod N
58 zmodcl B N B mod N 0
59 58 nn0zd B N B mod N
60 59 expcom N B B mod N
61 60 ralimdv N k A B k A B mod N
62 61 com12 k A B N k A B mod N
63 62 adantr k A B k z B N k A B mod N
64 27 63 sylbi k A z B N k A B mod N
65 64 impcom N k A z B k A B mod N
66 65 3adant1 A Fin N k A z B k A B mod N
67 17 66 jca A Fin N k A z B A Fin k A B mod N
68 fsumzcl2 A Fin k A B mod N k A B mod N
69 68 zred A Fin k A B mod N k A B mod N
70 67 69 syl A Fin N k A z B k A B mod N
71 70 ad2antlr z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N
72 35 anim1i k A z B N z / k B N
73 72 ancoms N k A z B z / k B N
74 zmodcl z / k B N z / k B mod N 0
75 73 74 syl N k A z B z / k B mod N 0
76 75 nn0red N k A z B z / k B mod N
77 76 3adant1 A Fin N k A z B z / k B mod N
78 77 ad2antlr z A A Fin N k A z B k A B mod N = k A B mod N mod N z / k B mod N
79 40 ad2antlr z A A Fin N k A z B k A B mod N = k A B mod N mod N N +
80 modaddabs k A B mod N z / k B mod N N + k A B mod N mod N + z / k B mod N mod N mod N = k A B mod N + z / k B mod N mod N
81 71 78 79 80 syl3anc z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N mod N + z / k B mod N mod N mod N = k A B mod N + z / k B mod N mod N
82 60 ralimdv N k A z B k A z B mod N
83 82 imp N k A z B k A z B mod N
84 83 3adant1 A Fin N k A z B k A z B mod N
85 84 ad2antlr z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N
86 fsumsplitsnun A Fin z V z A k A z B mod N k A z B mod N = k A B mod N + z / k B mod N
87 18 22 85 86 syl3anc z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A B mod N + z / k B mod N
88 csbov1g z V z / k B mod N = z / k B mod N
89 21 88 mp1i z A A Fin N k A z B k A B mod N = k A B mod N mod N z / k B mod N = z / k B mod N
90 89 oveq2d z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N + z / k B mod N = k A B mod N + z / k B mod N
91 87 90 eqtrd z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A B mod N + z / k B mod N
92 91 eqcomd z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N + z / k B mod N = k A z B mod N
93 92 oveq1d z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N + z / k B mod N mod N = k A z B mod N mod N
94 81 93 eqtrd z A A Fin N k A z B k A B mod N = k A B mod N mod N k A B mod N mod N + z / k B mod N mod N mod N = k A z B mod N mod N
95 26 57 94 3eqtrd z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
96 95 exp31 z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
97 16 96 sylbir ¬ z A A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N
98 15 97 pm2.61i A Fin N k A z B k A B mod N = k A B mod N mod N k A z B mod N = k A z B mod N mod N