Metamath Proof Explorer


Theorem nfsum1

Description: Bound-variable hypothesis builder for sum. (Contributed by NM, 11-Dec-2005) (Revised by Mario Carneiro, 13-Jun-2019)

Ref Expression
Hypothesis nfsum1.1 𝑘 𝐴
Assertion nfsum1 𝑘 Σ 𝑘𝐴 𝐵

Proof

Step Hyp Ref Expression
1 nfsum1.1 𝑘 𝐴
2 df-sum Σ 𝑘𝐴 𝐵 = ( ℩ 𝑥 ( ∃ 𝑚 ∈ ℤ ( 𝐴 ⊆ ( ℤ𝑚 ) ∧ seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥 ) ∨ ∃ 𝑚 ∈ ℕ ∃ 𝑓 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) ) ) )
3 nfcv 𝑘
4 nfcv 𝑘 ( ℤ𝑚 )
5 1 4 nfss 𝑘 𝐴 ⊆ ( ℤ𝑚 )
6 nfcv 𝑘 𝑚
7 nfcv 𝑘 +
8 1 nfcri 𝑘 𝑛𝐴
9 nfcsb1v 𝑘 𝑛 / 𝑘 𝐵
10 nfcv 𝑘 0
11 8 9 10 nfif 𝑘 if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 )
12 3 11 nfmpt 𝑘 ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) )
13 6 7 12 nfseq 𝑘 seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) )
14 nfcv 𝑘
15 nfcv 𝑘 𝑥
16 13 14 15 nfbr 𝑘 seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥
17 5 16 nfan 𝑘 ( 𝐴 ⊆ ( ℤ𝑚 ) ∧ seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥 )
18 3 17 nfrex 𝑘𝑚 ∈ ℤ ( 𝐴 ⊆ ( ℤ𝑚 ) ∧ seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥 )
19 nfcv 𝑘
20 nfcv 𝑘 𝑓
21 nfcv 𝑘 ( 1 ... 𝑚 )
22 20 21 1 nff1o 𝑘 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴
23 nfcv 𝑘 1
24 nfcsb1v 𝑘 ( 𝑓𝑛 ) / 𝑘 𝐵
25 19 24 nfmpt 𝑘 ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 )
26 23 7 25 nfseq 𝑘 seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) )
27 26 6 nffv 𝑘 ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 )
28 27 nfeq2 𝑘 𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 )
29 22 28 nfan 𝑘 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) )
30 29 nfex 𝑘𝑓 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) )
31 19 30 nfrex 𝑘𝑚 ∈ ℕ ∃ 𝑓 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) )
32 18 31 nfor 𝑘 ( ∃ 𝑚 ∈ ℤ ( 𝐴 ⊆ ( ℤ𝑚 ) ∧ seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥 ) ∨ ∃ 𝑚 ∈ ℕ ∃ 𝑓 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) ) )
33 32 nfiotaw 𝑘 ( ℩ 𝑥 ( ∃ 𝑚 ∈ ℤ ( 𝐴 ⊆ ( ℤ𝑚 ) ∧ seq 𝑚 ( + , ( 𝑛 ∈ ℤ ↦ if ( 𝑛𝐴 , 𝑛 / 𝑘 𝐵 , 0 ) ) ) ⇝ 𝑥 ) ∨ ∃ 𝑚 ∈ ℕ ∃ 𝑓 ( 𝑓 : ( 1 ... 𝑚 ) –1-1-onto𝐴𝑥 = ( seq 1 ( + , ( 𝑛 ∈ ℕ ↦ ( 𝑓𝑛 ) / 𝑘 𝐵 ) ) ‘ 𝑚 ) ) ) )
34 2 33 nfcxfr 𝑘 Σ 𝑘𝐴 𝐵