Metamath Proof Explorer


Theorem signstcl

Description: Closure of the zero skipping sign word. (Contributed by Thierry Arnoux, 9-Oct-2018)

Ref Expression
Hypotheses signsv.p = ( 𝑎 ∈ { - 1 , 0 , 1 } , 𝑏 ∈ { - 1 , 0 , 1 } ↦ if ( 𝑏 = 0 , 𝑎 , 𝑏 ) )
signsv.w 𝑊 = { ⟨ ( Base ‘ ndx ) , { - 1 , 0 , 1 } ⟩ , ⟨ ( +g ‘ ndx ) , ⟩ }
signsv.t 𝑇 = ( 𝑓 ∈ Word ℝ ↦ ( 𝑛 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ↦ ( 𝑊 Σg ( 𝑖 ∈ ( 0 ... 𝑛 ) ↦ ( sgn ‘ ( 𝑓𝑖 ) ) ) ) ) )
signsv.v 𝑉 = ( 𝑓 ∈ Word ℝ ↦ Σ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝑓 ) ) if ( ( ( 𝑇𝑓 ) ‘ 𝑗 ) ≠ ( ( 𝑇𝑓 ) ‘ ( 𝑗 − 1 ) ) , 1 , 0 ) )
Assertion signstcl ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → ( ( 𝑇𝐹 ) ‘ 𝑁 ) ∈ { - 1 , 0 , 1 } )

Proof

Step Hyp Ref Expression
1 signsv.p = ( 𝑎 ∈ { - 1 , 0 , 1 } , 𝑏 ∈ { - 1 , 0 , 1 } ↦ if ( 𝑏 = 0 , 𝑎 , 𝑏 ) )
2 signsv.w 𝑊 = { ⟨ ( Base ‘ ndx ) , { - 1 , 0 , 1 } ⟩ , ⟨ ( +g ‘ ndx ) , ⟩ }
3 signsv.t 𝑇 = ( 𝑓 ∈ Word ℝ ↦ ( 𝑛 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ↦ ( 𝑊 Σg ( 𝑖 ∈ ( 0 ... 𝑛 ) ↦ ( sgn ‘ ( 𝑓𝑖 ) ) ) ) ) )
4 signsv.v 𝑉 = ( 𝑓 ∈ Word ℝ ↦ Σ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝑓 ) ) if ( ( ( 𝑇𝑓 ) ‘ 𝑗 ) ≠ ( ( 𝑇𝑓 ) ‘ ( 𝑗 − 1 ) ) , 1 , 0 ) )
5 1 2 3 4 signstfval ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → ( ( 𝑇𝐹 ) ‘ 𝑁 ) = ( 𝑊 Σg ( 𝑖 ∈ ( 0 ... 𝑁 ) ↦ ( sgn ‘ ( 𝐹𝑖 ) ) ) ) )
6 1 2 signswbase { - 1 , 0 , 1 } = ( Base ‘ 𝑊 )
7 1 2 signswmnd 𝑊 ∈ Mnd
8 7 a1i ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → 𝑊 ∈ Mnd )
9 fzo0ssnn0 ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ⊆ ℕ0
10 nn0uz 0 = ( ℤ ‘ 0 )
11 9 10 sseqtri ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ⊆ ( ℤ ‘ 0 )
12 11 a1i ( 𝐹 ∈ Word ℝ → ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ⊆ ( ℤ ‘ 0 ) )
13 12 sselda ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → 𝑁 ∈ ( ℤ ‘ 0 ) )
14 wrdf ( 𝐹 ∈ Word ℝ → 𝐹 : ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ⟶ ℝ )
15 14 ad2antrr ( ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) ∧ 𝑖 ∈ ( 0 ... 𝑁 ) ) → 𝐹 : ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ⟶ ℝ )
16 fzssfzo ( 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) → ( 0 ... 𝑁 ) ⊆ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) )
17 16 adantl ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → ( 0 ... 𝑁 ) ⊆ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) )
18 17 sselda ( ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) ∧ 𝑖 ∈ ( 0 ... 𝑁 ) ) → 𝑖 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) )
19 15 18 ffvelrnd ( ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) ∧ 𝑖 ∈ ( 0 ... 𝑁 ) ) → ( 𝐹𝑖 ) ∈ ℝ )
20 19 rexrd ( ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) ∧ 𝑖 ∈ ( 0 ... 𝑁 ) ) → ( 𝐹𝑖 ) ∈ ℝ* )
21 sgncl ( ( 𝐹𝑖 ) ∈ ℝ* → ( sgn ‘ ( 𝐹𝑖 ) ) ∈ { - 1 , 0 , 1 } )
22 20 21 syl ( ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) ∧ 𝑖 ∈ ( 0 ... 𝑁 ) ) → ( sgn ‘ ( 𝐹𝑖 ) ) ∈ { - 1 , 0 , 1 } )
23 6 8 13 22 gsumncl ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → ( 𝑊 Σg ( 𝑖 ∈ ( 0 ... 𝑁 ) ↦ ( sgn ‘ ( 𝐹𝑖 ) ) ) ) ∈ { - 1 , 0 , 1 } )
24 5 23 eqeltrd ( ( 𝐹 ∈ Word ℝ ∧ 𝑁 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ) → ( ( 𝑇𝐹 ) ‘ 𝑁 ) ∈ { - 1 , 0 , 1 } )