Metamath Proof Explorer


Theorem signshnz

Description: H is not the empty word. (Contributed by Thierry Arnoux, 14-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 ) )
signs.h 𝐻 = ( ( ⟨“ 0 ”⟩ ++ 𝐹 ) ∘f − ( ( 𝐹 ++ ⟨“ 0 ”⟩ ) ∘f/c · 𝐶 ) )
Assertion signshnz ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → 𝐻 ≠ ∅ )

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 signs.h 𝐻 = ( ( ⟨“ 0 ”⟩ ++ 𝐹 ) ∘f − ( ( 𝐹 ++ ⟨“ 0 ”⟩ ) ∘f/c · 𝐶 ) )
6 1 2 3 4 5 signshlen ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ♯ ‘ 𝐻 ) = ( ( ♯ ‘ 𝐹 ) + 1 ) )
7 lencl ( 𝐹 ∈ Word ℝ → ( ♯ ‘ 𝐹 ) ∈ ℕ0 )
8 7 adantr ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ♯ ‘ 𝐹 ) ∈ ℕ0 )
9 nn0p1nn ( ( ♯ ‘ 𝐹 ) ∈ ℕ0 → ( ( ♯ ‘ 𝐹 ) + 1 ) ∈ ℕ )
10 8 9 syl ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ( ♯ ‘ 𝐹 ) + 1 ) ∈ ℕ )
11 6 10 eqeltrd ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ♯ ‘ 𝐻 ) ∈ ℕ )
12 11 nnne0d ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ♯ ‘ 𝐻 ) ≠ 0 )
13 1 2 3 4 5 signshwrd ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → 𝐻 ∈ Word ℝ )
14 hasheq0 ( 𝐻 ∈ Word ℝ → ( ( ♯ ‘ 𝐻 ) = 0 ↔ 𝐻 = ∅ ) )
15 13 14 syl ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ( ♯ ‘ 𝐻 ) = 0 ↔ 𝐻 = ∅ ) )
16 15 necon3bid ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → ( ( ♯ ‘ 𝐻 ) ≠ 0 ↔ 𝐻 ≠ ∅ ) )
17 12 16 mpbid ( ( 𝐹 ∈ Word ℝ ∧ 𝐶 ∈ ℝ+ ) → 𝐻 ≠ ∅ )