Metamath Proof Explorer


Theorem signstfvp

Description: Zero-skipping sign in a word compared to a shorter word. (Contributed by Thierry Arnoux, 8-Oct-2018)

Ref Expression
Hypotheses signsv.p ˙ = a 1 0 1 , b 1 0 1 if b = 0 a b
signsv.w W = Base ndx 1 0 1 + ndx ˙
signsv.t T = f Word n 0 ..^ f W i = 0 n sgn f i
signsv.v V = f Word j 1 ..^ f if T f j T f j 1 1 0
Assertion signstfvp F Word K N 0 ..^ F T F ++ ⟨“ K ”⟩ N = T F N

Proof

Step Hyp Ref Expression
1 signsv.p ˙ = a 1 0 1 , b 1 0 1 if b = 0 a b
2 signsv.w W = Base ndx 1 0 1 + ndx ˙
3 signsv.t T = f Word n 0 ..^ f W i = 0 n sgn f i
4 signsv.v V = f Word j 1 ..^ f if T f j T f j 1 1 0
5 simpl1 F Word K N 0 ..^ F i 0 N F Word
6 s1cl K ⟨“ K ”⟩ Word
7 6 3ad2ant2 F Word K N 0 ..^ F ⟨“ K ”⟩ Word
8 7 adantr F Word K N 0 ..^ F i 0 N ⟨“ K ”⟩ Word
9 fzssfzo N 0 ..^ F 0 N 0 ..^ F
10 9 3ad2ant3 F Word K N 0 ..^ F 0 N 0 ..^ F
11 10 sselda F Word K N 0 ..^ F i 0 N i 0 ..^ F
12 ccatval1 F Word ⟨“ K ”⟩ Word i 0 ..^ F F ++ ⟨“ K ”⟩ i = F i
13 5 8 11 12 syl3anc F Word K N 0 ..^ F i 0 N F ++ ⟨“ K ”⟩ i = F i
14 13 fveq2d F Word K N 0 ..^ F i 0 N sgn F ++ ⟨“ K ”⟩ i = sgn F i
15 14 mpteq2dva F Word K N 0 ..^ F i 0 N sgn F ++ ⟨“ K ”⟩ i = i 0 N sgn F i
16 15 oveq2d F Word K N 0 ..^ F W i = 0 N sgn F ++ ⟨“ K ”⟩ i = W i = 0 N sgn F i
17 ccatws1cl F Word K F ++ ⟨“ K ”⟩ Word
18 17 3adant3 F Word K N 0 ..^ F F ++ ⟨“ K ”⟩ Word
19 lencl F Word F 0
20 19 nn0zd F Word F
21 20 uzidd F Word F F
22 peano2uz F F F + 1 F
23 fzoss2 F + 1 F 0 ..^ F 0 ..^ F + 1
24 21 22 23 3syl F Word 0 ..^ F 0 ..^ F + 1
25 24 sselda F Word N 0 ..^ F N 0 ..^ F + 1
26 25 3adant2 F Word K N 0 ..^ F N 0 ..^ F + 1
27 ccatlen F Word ⟨“ K ”⟩ Word F ++ ⟨“ K ”⟩ = F + ⟨“ K ”⟩
28 6 27 sylan2 F Word K F ++ ⟨“ K ”⟩ = F + ⟨“ K ”⟩
29 28 3adant3 F Word K N 0 ..^ F F ++ ⟨“ K ”⟩ = F + ⟨“ K ”⟩
30 s1len ⟨“ K ”⟩ = 1
31 30 oveq2i F + ⟨“ K ”⟩ = F + 1
32 29 31 eqtrdi F Word K N 0 ..^ F F ++ ⟨“ K ”⟩ = F + 1
33 32 oveq2d F Word K N 0 ..^ F 0 ..^ F ++ ⟨“ K ”⟩ = 0 ..^ F + 1
34 26 33 eleqtrrd F Word K N 0 ..^ F N 0 ..^ F ++ ⟨“ K ”⟩
35 1 2 3 4 signstfval F ++ ⟨“ K ”⟩ Word N 0 ..^ F ++ ⟨“ K ”⟩ T F ++ ⟨“ K ”⟩ N = W i = 0 N sgn F ++ ⟨“ K ”⟩ i
36 18 34 35 syl2anc F Word K N 0 ..^ F T F ++ ⟨“ K ”⟩ N = W i = 0 N sgn F ++ ⟨“ K ”⟩ i
37 1 2 3 4 signstfval F Word N 0 ..^ F T F N = W i = 0 N sgn F i
38 37 3adant2 F Word K N 0 ..^ F T F N = W i = 0 N sgn F i
39 16 36 38 3eqtr4d F Word K N 0 ..^ F T F ++ ⟨“ K ”⟩ N = T F N