Metamath Proof Explorer


Theorem seqf

Description: Range of the recursive sequence builder (special case of seqf2 ). (Contributed by Mario Carneiro, 24-Jun-2013)

Ref Expression
Hypotheses seqf.1 𝑍 = ( ℤ𝑀 )
seqf.2 ( 𝜑𝑀 ∈ ℤ )
seqf.3 ( ( 𝜑𝑥𝑍 ) → ( 𝐹𝑥 ) ∈ 𝑆 )
seqf.4 ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 + 𝑦 ) ∈ 𝑆 )
Assertion seqf ( 𝜑 → seq 𝑀 ( + , 𝐹 ) : 𝑍𝑆 )

Proof

Step Hyp Ref Expression
1 seqf.1 𝑍 = ( ℤ𝑀 )
2 seqf.2 ( 𝜑𝑀 ∈ ℤ )
3 seqf.3 ( ( 𝜑𝑥𝑍 ) → ( 𝐹𝑥 ) ∈ 𝑆 )
4 seqf.4 ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 + 𝑦 ) ∈ 𝑆 )
5 fveq2 ( 𝑥 = 𝑀 → ( 𝐹𝑥 ) = ( 𝐹𝑀 ) )
6 5 eleq1d ( 𝑥 = 𝑀 → ( ( 𝐹𝑥 ) ∈ 𝑆 ↔ ( 𝐹𝑀 ) ∈ 𝑆 ) )
7 3 ralrimiva ( 𝜑 → ∀ 𝑥𝑍 ( 𝐹𝑥 ) ∈ 𝑆 )
8 uzid ( 𝑀 ∈ ℤ → 𝑀 ∈ ( ℤ𝑀 ) )
9 2 8 syl ( 𝜑𝑀 ∈ ( ℤ𝑀 ) )
10 9 1 eleqtrrdi ( 𝜑𝑀𝑍 )
11 6 7 10 rspcdva ( 𝜑 → ( 𝐹𝑀 ) ∈ 𝑆 )
12 peano2uzr ( ( 𝑀 ∈ ℤ ∧ 𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → 𝑥 ∈ ( ℤ𝑀 ) )
13 2 12 sylan ( ( 𝜑𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → 𝑥 ∈ ( ℤ𝑀 ) )
14 13 1 eleqtrrdi ( ( 𝜑𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → 𝑥𝑍 )
15 14 3 syldan ( ( 𝜑𝑥 ∈ ( ℤ ‘ ( 𝑀 + 1 ) ) ) → ( 𝐹𝑥 ) ∈ 𝑆 )
16 11 4 1 2 15 seqf2 ( 𝜑 → seq 𝑀 ( + , 𝐹 ) : 𝑍𝑆 )