Metamath Proof Explorer


Theorem fsummmodsnunz

Description: A finite sum of summands modulo a positive number with an additional summand is an integer. (Contributed by Alexander van der Vekens, 1-Sep-2018)

Ref Expression
Assertion fsummmodsnunz A Fin N k A z B k A z B mod N

Proof

Step Hyp Ref Expression
1 nfcv _ x B mod N
2 nfcsb1v _ k x / k B mod N
3 csbeq1a k = x B mod N = x / k B mod N
4 1 2 3 cbvsumi k A z B mod N = x A z x / k B mod N
5 snfi z Fin
6 unfi A Fin z Fin A z Fin
7 5 6 mpan2 A Fin A z Fin
8 7 3ad2ant1 A Fin N k A z B A z Fin
9 rspcsbela x A z k A z B x / k B
10 9 expcom k A z B x A z x / k B
11 10 3ad2ant3 A Fin N k A z B x A z x / k B
12 11 imp A Fin N k A z B x A z x / k B
13 vex x V
14 csbov1g x V x / k B mod N = x / k B mod N
15 13 14 ax-mp x / k B mod N = x / k B mod N
16 simpr N x / k B x / k B
17 simpl N x / k B N
18 16 17 zmodcld N x / k B x / k B mod N 0
19 18 nn0zd N x / k B x / k B mod N
20 15 19 eqeltrid N x / k B x / k B mod N
21 20 ex N x / k B x / k B mod N
22 21 3ad2ant2 A Fin N k A z B x / k B x / k B mod N
23 22 adantr A Fin N k A z B x A z x / k B x / k B mod N
24 12 23 mpd A Fin N k A z B x A z x / k B mod N
25 8 24 fsumzcl A Fin N k A z B x A z x / k B mod N
26 4 25 eqeltrid A Fin N k A z B k A z B mod N