MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  wrdind Unicode version

Theorem wrdind 11479
Description: Perform induction over the structure of a word. (Contributed by Mario Carneiro, 27-Sep-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
Hypotheses
Ref Expression
wrdind.1  |-  ( x  =  (/)  ->  ( ph  <->  ps ) )
wrdind.2  |-  ( x  =  y  ->  ( ph 
<->  ch ) )
wrdind.3  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
wrdind.4  |-  ( x  =  A  ->  ( ph 
<->  ta ) )
wrdind.5  |-  ps
wrdind.6  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( ch  ->  th )
)
Assertion
Ref Expression
wrdind  |-  ( A  e. Word  B  ->  ta )
Distinct variable groups:    x, A    x, y, z, B    ch, x    ph, y, z    ta, x    th, x
Allowed substitution hints:    ph( x)    ps( x, y, z)    ch( y,
z)    th( y, z)    ta( y, z)    A( y, z)

Proof of Theorem wrdind
Dummy variables  n  m are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 lencl 11423 . . 3  |-  ( A  e. Word  B  ->  ( # `
 A )  e. 
NN0 )
2 eqeq2 2294 . . . . . 6  |-  ( n  =  0  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  0 ) )
32imbi1d 308 . . . . 5  |-  ( n  =  0  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  0  ->  ph ) ) )
43ralbidv 2565 . . . 4  |-  ( n  =  0  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  0  ->  ph ) ) )
5 eqeq2 2294 . . . . . 6  |-  ( n  =  m  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  m ) )
65imbi1d 308 . . . . 5  |-  ( n  =  m  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  m  ->  ph ) ) )
76ralbidv 2565 . . . 4  |-  ( n  =  m  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  m  ->  ph ) ) )
8 eqeq2 2294 . . . . . 6  |-  ( n  =  ( m  + 
1 )  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  ( m  +  1 ) ) )
98imbi1d 308 . . . . 5  |-  ( n  =  ( m  + 
1 )  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  ( m  +  1 )  ->  ph ) ) )
109ralbidv 2565 . . . 4  |-  ( n  =  ( m  + 
1 )  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
11 eqeq2 2294 . . . . . 6  |-  ( n  =  ( # `  A
)  ->  ( ( # `
 x )  =  n  <->  ( # `  x
)  =  ( # `  A ) ) )
1211imbi1d 308 . . . . 5  |-  ( n  =  ( # `  A
)  ->  ( (
( # `  x )  =  n  ->  ph )  <->  ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
1312ralbidv 2565 . . . 4  |-  ( n  =  ( # `  A
)  ->  ( A. x  e. Word  B (
( # `  x )  =  n  ->  ph )  <->  A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
14 hasheq0 11355 . . . . . 6  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  <->  x  =  (/) ) )
15 wrdind.5 . . . . . . 7  |-  ps
16 wrdind.1 . . . . . . 7  |-  ( x  =  (/)  ->  ( ph  <->  ps ) )
1715, 16mpbiri 224 . . . . . 6  |-  ( x  =  (/)  ->  ph )
1814, 17syl6bi 219 . . . . 5  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  ->  ph )
)
1918rgen 2610 . . . 4  |-  A. x  e. Word  B ( ( # `  x )  =  0  ->  ph )
20 fveq2 5527 . . . . . . . 8  |-  ( x  =  y  ->  ( # `
 x )  =  ( # `  y
) )
2120eqeq1d 2293 . . . . . . 7  |-  ( x  =  y  ->  (
( # `  x )  =  m  <->  ( # `  y
)  =  m ) )
22 wrdind.2 . . . . . . 7  |-  ( x  =  y  ->  ( ph 
<->  ch ) )
2321, 22imbi12d 311 . . . . . 6  |-  ( x  =  y  ->  (
( ( # `  x
)  =  m  ->  ph )  <->  ( ( # `  y )  =  m  ->  ch ) ) )
2423cbvralv 2766 . . . . 5  |-  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  <->  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )
25 swrdcl 11454 . . . . . . . . . . . 12  |-  ( x  e. Word  B  ->  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  e. Word  B )
2625ad2antrl 708 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  e. Word  B
)
27 simplr 731 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )
28 simprl 732 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  e. Word  B
)
29 fzossfz 10894 . . . . . . . . . . . . . 14  |-  ( 0..^ ( # `  x
) )  C_  (
0 ... ( # `  x
) )
30 simprr 733 . . . . . . . . . . . . . . . 16  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  =  ( m  +  1 ) )
31 nn0p1nn 10005 . . . . . . . . . . . . . . . . 17  |-  ( m  e.  NN0  ->  ( m  +  1 )  e.  NN )
3231ad2antrr 706 . . . . . . . . . . . . . . . 16  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( m  + 
1 )  e.  NN )
3330, 32eqeltrd 2359 . . . . . . . . . . . . . . 15  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  e.  NN )
34 fzo0end 10917 . . . . . . . . . . . . . . 15  |-  ( (
# `  x )  e.  NN  ->  ( ( # `
 x )  - 
1 )  e.  ( 0..^ ( # `  x
) ) )
3533, 34syl 15 . . . . . . . . . . . . . 14  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( # `  x )  -  1 )  e.  ( 0..^ ( # `  x
) ) )
3629, 35sseldi 3180 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( # `  x )  -  1 )  e.  ( 0 ... ( # `  x
) ) )
37 swrd0len 11457 . . . . . . . . . . . . 13  |-  ( ( x  e. Word  B  /\  ( ( # `  x
)  -  1 )  e.  ( 0 ... ( # `  x
) ) )  -> 
( # `  ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) )  =  ( ( # `  x
)  -  1 ) )
3828, 36, 37syl2anc 642 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  ( ( # `  x
)  -  1 ) )
3930oveq1d 5875 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( # `  x )  -  1 )  =  ( ( m  +  1 )  -  1 ) )
40 nn0cn 9977 . . . . . . . . . . . . . 14  |-  ( m  e.  NN0  ->  m  e.  CC )
4140ad2antrr 706 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  m  e.  CC )
42 ax-1cn 8797 . . . . . . . . . . . . 13  |-  1  e.  CC
43 pncan 9059 . . . . . . . . . . . . 13  |-  ( ( m  e.  CC  /\  1  e.  CC )  ->  ( ( m  + 
1 )  -  1 )  =  m )
4441, 42, 43sylancl 643 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( m  +  1 )  - 
1 )  =  m )
4538, 39, 443eqtrd 2321 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m )
46 fveq2 5527 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( # `
 y )  =  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) ) )
4746eqeq1d 2293 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( # `  y )  =  m  <->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m ) )
48 vex 2793 . . . . . . . . . . . . . . 15  |-  y  e. 
_V
4948, 22sbcie 3027 . . . . . . . . . . . . . 14  |-  ( [. y  /  x ]. ph  <->  ch )
50 dfsbcq 2995 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( [. y  /  x ]. ph  <->  [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5149, 50syl5bbr 250 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( ch 
<-> 
[. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5247, 51imbi12d 311 . . . . . . . . . . . 12  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( ( # `  y
)  =  m  ->  ch )  <->  ( ( # `  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) )  =  m  ->  [. ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
)  /  x ]. ph ) ) )
5352rspcv 2882 . . . . . . . . . . 11  |-  ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  e. Word  B  -> 
( A. y  e. Word  B ( ( # `  y )  =  m  ->  ch )  -> 
( ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m  ->  [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) ) )
5426, 27, 45, 53syl3c 57 . . . . . . . . . 10  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph )
55 wrdf 11421 . . . . . . . . . . . . 13  |-  ( x  e. Word  B  ->  x : ( 0..^ (
# `  x )
) --> B )
5655ad2antrl 708 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x : ( 0..^ ( # `  x
) ) --> B )
57 ffvelrn 5665 . . . . . . . . . . . 12  |-  ( ( x : ( 0..^ ( # `  x
) ) --> B  /\  ( ( # `  x
)  -  1 )  e.  ( 0..^ (
# `  x )
) )  ->  (
x `  ( ( # `
 x )  - 
1 ) )  e.  B )
5856, 35, 57syl2anc 642 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( x `  ( ( # `  x
)  -  1 ) )  e.  B )
59 oveq1 5867 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> ) )
60 dfsbcq 2995 . . . . . . . . . . . . . 14  |-  ( ( y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> )  ->  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" z "> )  /  x ]. ph ) )
6159, 60syl 15 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" z "> )  /  x ]. ph ) )
6250, 61imbi12d 311 . . . . . . . . . . . 12  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( [. y  /  x ]. ph  ->  [. ( y concat  <" z "> )  /  x ]. ph )  <->  (
[. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph  ->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  /  x ]. ph ) ) )
63 s1eq 11441 . . . . . . . . . . . . . . 15  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  <" z ">  =  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )
6463oveq2d 5876 . . . . . . . . . . . . . 14  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
65 dfsbcq 2995 . . . . . . . . . . . . . 14  |-  ( ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  ->  ( [. ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> )  /  x ]. ph  <->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> )  /  x ]. ph )
)
6664, 65syl 15 . . . . . . . . . . . . 13  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( [. ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> )  /  x ]. ph  <->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> )  /  x ]. ph )
)
6766imbi2d 307 . . . . . . . . . . . 12  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( ( [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph  ->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  /  x ]. ph )  <->  ( [. ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  /  x ]. ph  ->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) ) )
68 wrdind.6 . . . . . . . . . . . . 13  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( ch  ->  th )
)
69 ovex 5885 . . . . . . . . . . . . . 14  |-  ( y concat  <" z "> )  e.  _V
70 wrdind.3 . . . . . . . . . . . . . 14  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
7169, 70sbcie 3027 . . . . . . . . . . . . 13  |-  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  th )
7268, 49, 713imtr4g 261 . . . . . . . . . . . 12  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( [. y  /  x ]. ph  ->  [. (
y concat  <" z "> )  /  x ]. ph ) )
7362, 67, 72vtocl2ga 2853 . . . . . . . . . . 11  |-  ( ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  e. Word  B  /\  ( x `  (
( # `  x )  -  1 ) )  e.  B )  -> 
( [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph  ->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) )
7426, 58, 73syl2anc 642 . . . . . . . . . 10  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( [. (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  /  x ]. ph  ->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) )
7554, 74mpd 14 . . . . . . . . 9  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> )  /  x ]. ph )
76 wrdfin 11422 . . . . . . . . . . . . . 14  |-  ( x  e. Word  B  ->  x  e.  Fin )
7776ad2antrl 708 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  e.  Fin )
78 hashnncl 11356 . . . . . . . . . . . . 13  |-  ( x  e.  Fin  ->  (
( # `  x )  e.  NN  <->  x  =/=  (/) ) )
7977, 78syl 15 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( # `  x )  e.  NN  <->  x  =/=  (/) ) )
8033, 79mpbid 201 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  =/=  (/) )
81 wrdeqcats1 11476 . . . . . . . . . . 11  |-  ( ( x  e. Word  B  /\  x  =/=  (/) )  ->  x  =  ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> ) )
8228, 80, 81syl2anc 642 . . . . . . . . . 10  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
83 sbceq1a 3003 . . . . . . . . . 10  |-  ( x  =  ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> )  ->  ( ph  <->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) )
8482, 83syl 15 . . . . . . . . 9  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ph  <->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) )
8575, 84mpbird 223 . . . . . . . 8  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ph )
8685expr 598 . . . . . . 7  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  x  e. Word  B )  ->  (
( # `  x )  =  ( m  + 
1 )  ->  ph )
)
8786ralrimiva 2628 . . . . . 6  |-  ( ( m  e.  NN0  /\  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )  ->  A. x  e. Word  B ( ( # `  x )  =  ( m  +  1 )  ->  ph ) )
8887ex 423 . . . . 5  |-  ( m  e.  NN0  ->  ( A. y  e. Word  B (
( # `  y )  =  m  ->  ch )  ->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
8924, 88syl5bi 208 . . . 4  |-  ( m  e.  NN0  ->  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  ->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
904, 7, 10, 13, 19, 89nn0ind 10110 . . 3  |-  ( (
# `  A )  e.  NN0  ->  A. x  e. Word  B ( ( # `  x )  =  (
# `  A )  ->  ph ) )
911, 90syl 15 . 2  |-  ( A  e. Word  B  ->  A. x  e. Word  B ( ( # `  x )  =  (
# `  A )  ->  ph ) )
92 eqidd 2286 . 2  |-  ( A  e. Word  B  ->  ( # `
 A )  =  ( # `  A
) )
93 fveq2 5527 . . . . 5  |-  ( x  =  A  ->  ( # `
 x )  =  ( # `  A
) )
9493eqeq1d 2293 . . . 4  |-  ( x  =  A  ->  (
( # `  x )  =  ( # `  A
)  <->  ( # `  A
)  =  ( # `  A ) ) )
95 wrdind.4 . . . 4  |-  ( x  =  A  ->  ( ph 
<->  ta ) )
9694, 95imbi12d 311 . . 3  |-  ( x  =  A  ->  (
( ( # `  x
)  =  ( # `  A )  ->  ph )  <->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9796rspcv 2882 . 2  |-  ( A  e. Word  B  ->  ( A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )  ->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9891, 92, 97mp2d 41 1  |-  ( A  e. Word  B  ->  ta )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1625    e. wcel 1686    =/= wne 2448   A.wral 2545   [.wsbc 2993   (/)c0 3457   <.cop 3645   -->wf 5253   ` cfv 5257  (class class class)co 5860   Fincfn 6865   CCcc 8737   0cc0 8739   1c1 8740    + caddc 8742    - cmin 9039   NNcn 9748   NN0cn0 9967   ...cfz 10784  ..^cfzo 10872   #chash 11339  Word cword 11405   concat cconcat 11406   <"cs1 11407   substr csubstr 11408
This theorem is referenced by:  frmdgsum  14486  gsumwrev  14841  efginvrel2  15038
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1535  ax-5 1546  ax-17 1605  ax-9 1637  ax-8 1645  ax-13 1688  ax-14 1690  ax-6 1705  ax-7 1710  ax-11 1717  ax-12 1868  ax-ext 2266  ax-rep 4133  ax-sep 4143  ax-nul 4151  ax-pow 4190  ax-pr 4216  ax-un 4514  ax-cnex 8795  ax-resscn 8796  ax-1cn 8797  ax-icn 8798  ax-addcl 8799  ax-addrcl 8800  ax-mulcl 8801  ax-mulrcl 8802  ax-mulcom 8803  ax-addass 8804  ax-mulass 8805  ax-distr 8806  ax-i2m1 8807  ax-1ne0 8808  ax-1rid 8809  ax-rnegex 8810  ax-rrecex 8811  ax-cnre 8812  ax-pre-lttri 8813  ax-pre-lttrn 8814  ax-pre-ltadd 8815  ax-pre-mulgt0 8816
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1531  df-nf 1534  df-sb 1632  df-eu 2149  df-mo 2150  df-clab 2272  df-cleq 2278  df-clel 2281  df-nfc 2410  df-ne 2450  df-nel 2451  df-ral 2550  df-rex 2551  df-reu 2552  df-rab 2554  df-v 2792  df-sbc 2994  df-csb 3084  df-dif 3157  df-un 3159  df-in 3161  df-ss 3168  df-pss 3170  df-nul 3458  df-if 3568  df-pw 3629  df-sn 3648  df-pr 3649  df-tp 3650  df-op 3651  df-uni 3830  df-int 3865  df-iun 3909  df-br 4026  df-opab 4080  df-mpt 4081  df-tr 4116  df-eprel 4307  df-id 4311  df-po 4316  df-so 4317  df-fr 4354  df-we 4356  df-ord 4397  df-on 4398  df-lim 4399  df-suc 4400  df-om 4659  df-xp 4697  df-rel 4698  df-cnv 4699  df-co 4700  df-dm 4701  df-rn 4702  df-res 4703  df-ima 4704  df-iota 5221  df-fun 5259  df-fn 5260  df-f 5261  df-f1 5262  df-fo 5263  df-f1o 5264  df-fv 5265  df-ov 5863  df-oprab 5864  df-mpt2 5865  df-1st 6124  df-2nd 6125  df-riota 6306  df-recs 6390  df-rdg 6425  df-1o 6481  df-oadd 6485  df-er 6662  df-en 6866  df-dom 6867  df-sdom 6868  df-fin 6869  df-card 7574  df-pnf 8871  df-mnf 8872  df-xr 8873  df-ltxr 8874  df-le 8875  df-sub 9041  df-neg 9042  df-nn 9749  df-n0 9968  df-z 10027  df-uz 10233  df-fz 10785  df-fzo 10873  df-hash 11340  df-word 11411  df-concat 11412  df-s1 11413  df-substr 11414
  Copyright terms: Public domain W3C validator