Metamath Proof Explorer


Theorem seqf2

Description: Range of the recursive sequence builder. (Contributed by Mario Carneiro, 24-Jun-2013) (Revised by Mario Carneiro, 27-May-2014)

Ref Expression
Hypotheses seqcl2.1 ( 𝜑 → ( 𝐹𝑀 ) ∈ 𝐶 )
seqcl2.2 ( ( 𝜑 ∧ ( 𝑥𝐶𝑦𝐷 ) ) → ( 𝑥 + 𝑦 ) ∈ 𝐶 )
seqf2.3 𝑍 = ( ℤ𝑀 )
seqf2.4 ( 𝜑𝑀 ∈ ℤ )
seqf2.5 ( ( 𝜑𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → ( 𝐹𝑥 ) ∈ 𝐷 )
Assertion seqf2 ( 𝜑 → seq 𝑀 ( + , 𝐹 ) : 𝑍𝐶 )

Proof

Step Hyp Ref Expression
1 seqcl2.1 ( 𝜑 → ( 𝐹𝑀 ) ∈ 𝐶 )
2 seqcl2.2 ( ( 𝜑 ∧ ( 𝑥𝐶𝑦𝐷 ) ) → ( 𝑥 + 𝑦 ) ∈ 𝐶 )
3 seqf2.3 𝑍 = ( ℤ𝑀 )
4 seqf2.4 ( 𝜑𝑀 ∈ ℤ )
5 seqf2.5 ( ( 𝜑𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → ( 𝐹𝑥 ) ∈ 𝐷 )
6 seqfn ( 𝑀 ∈ ℤ → seq 𝑀 ( + , 𝐹 ) Fn ( ℤ𝑀 ) )
7 4 6 syl ( 𝜑 → seq 𝑀 ( + , 𝐹 ) Fn ( ℤ𝑀 ) )
8 1 adantr ( ( 𝜑𝑘 ∈ ( ℤ𝑀 ) ) → ( 𝐹𝑀 ) ∈ 𝐶 )
9 2 adantlr ( ( ( 𝜑𝑘 ∈ ( ℤ𝑀 ) ) ∧ ( 𝑥𝐶𝑦𝐷 ) ) → ( 𝑥 + 𝑦 ) ∈ 𝐶 )
10 simpr ( ( 𝜑𝑘 ∈ ( ℤ𝑀 ) ) → 𝑘 ∈ ( ℤ𝑀 ) )
11 elfzuz ( 𝑥 ∈ ( ( 𝑀 + 1 ) ... 𝑘 ) → 𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) )
12 11 5 sylan2 ( ( 𝜑𝑥 ∈ ( ( 𝑀 + 1 ) ... 𝑘 ) ) → ( 𝐹𝑥 ) ∈ 𝐷 )
13 12 adantlr ( ( ( 𝜑𝑘 ∈ ( ℤ𝑀 ) ) ∧ 𝑥 ∈ ( ( 𝑀 + 1 ) ... 𝑘 ) ) → ( 𝐹𝑥 ) ∈ 𝐷 )
14 8 9 10 13 seqcl2 ( ( 𝜑𝑘 ∈ ( ℤ𝑀 ) ) → ( seq 𝑀 ( + , 𝐹 ) ‘ 𝑘 ) ∈ 𝐶 )
15 14 ralrimiva ( 𝜑 → ∀ 𝑘 ∈ ( ℤ𝑀 ) ( seq 𝑀 ( + , 𝐹 ) ‘ 𝑘 ) ∈ 𝐶 )
16 ffnfv ( seq 𝑀 ( + , 𝐹 ) : ( ℤ𝑀 ) ⟶ 𝐶 ↔ ( seq 𝑀 ( + , 𝐹 ) Fn ( ℤ𝑀 ) ∧ ∀ 𝑘 ∈ ( ℤ𝑀 ) ( seq 𝑀 ( + , 𝐹 ) ‘ 𝑘 ) ∈ 𝐶 ) )
17 7 15 16 sylanbrc ( 𝜑 → seq 𝑀 ( + , 𝐹 ) : ( ℤ𝑀 ) ⟶ 𝐶 )
18 3 feq2i ( seq 𝑀 ( + , 𝐹 ) : 𝑍𝐶 ↔ seq 𝑀 ( + , 𝐹 ) : ( ℤ𝑀 ) ⟶ 𝐶 )
19 17 18 sylibr ( 𝜑 → seq 𝑀 ( + , 𝐹 ) : 𝑍𝐶 )