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

Theorem wrdind 11791
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 11735 . . 3  |-  ( A  e. Word  B  ->  ( # `
 A )  e. 
NN0 )
2 eqeq2 2445 . . . . . 6  |-  ( n  =  0  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  0 ) )
32imbi1d 309 . . . . 5  |-  ( n  =  0  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  0  ->  ph ) ) )
43ralbidv 2725 . . . 4  |-  ( n  =  0  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  0  ->  ph ) ) )
5 eqeq2 2445 . . . . . 6  |-  ( n  =  m  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  m ) )
65imbi1d 309 . . . . 5  |-  ( n  =  m  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  m  ->  ph ) ) )
76ralbidv 2725 . . . 4  |-  ( n  =  m  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  m  ->  ph ) ) )
8 eqeq2 2445 . . . . . 6  |-  ( n  =  ( m  + 
1 )  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  ( m  +  1 ) ) )
98imbi1d 309 . . . . 5  |-  ( n  =  ( m  + 
1 )  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  ( m  +  1 )  ->  ph ) ) )
109ralbidv 2725 . . . 4  |-  ( n  =  ( m  + 
1 )  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
11 eqeq2 2445 . . . . . 6  |-  ( n  =  ( # `  A
)  ->  ( ( # `
 x )  =  n  <->  ( # `  x
)  =  ( # `  A ) ) )
1211imbi1d 309 . . . . 5  |-  ( n  =  ( # `  A
)  ->  ( (
( # `  x )  =  n  ->  ph )  <->  ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
1312ralbidv 2725 . . . 4  |-  ( n  =  ( # `  A
)  ->  ( A. x  e. Word  B (
( # `  x )  =  n  ->  ph )  <->  A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
14 hasheq0 11644 . . . . . 6  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  <->  x  =  (/) ) )
15 wrdind.5 . . . . . . 7  |-  ps
16 wrdind.1 . . . . . . 7  |-  ( x  =  (/)  ->  ( ph  <->  ps ) )
1715, 16mpbiri 225 . . . . . 6  |-  ( x  =  (/)  ->  ph )
1814, 17syl6bi 220 . . . . 5  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  ->  ph )
)
1918rgen 2771 . . . 4  |-  A. x  e. Word  B ( ( # `  x )  =  0  ->  ph )
20 fveq2 5728 . . . . . . . 8  |-  ( x  =  y  ->  ( # `
 x )  =  ( # `  y
) )
2120eqeq1d 2444 . . . . . . 7  |-  ( x  =  y  ->  (
( # `  x )  =  m  <->  ( # `  y
)  =  m ) )
22 wrdind.2 . . . . . . 7  |-  ( x  =  y  ->  ( ph 
<->  ch ) )
2321, 22imbi12d 312 . . . . . 6  |-  ( x  =  y  ->  (
( ( # `  x
)  =  m  ->  ph )  <->  ( ( # `  y )  =  m  ->  ch ) ) )
2423cbvralv 2932 . . . . 5  |-  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  <->  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )
25 swrdcl 11766 . . . . . . . . . . . 12  |-  ( x  e. Word  B  ->  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  e. Word  B )
2625ad2antrl 709 . . . . . . . . . . 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 732 . . . . . . . . . . 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 733 . . . . . . . . . . . . 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 11157 . . . . . . . . . . . . . 14  |-  ( 0..^ ( # `  x
) )  C_  (
0 ... ( # `  x
) )
30 simprr 734 . . . . . . . . . . . . . . . 16  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  =  ( m  +  1 ) )
31 nn0p1nn 10259 . . . . . . . . . . . . . . . . 17  |-  ( m  e.  NN0  ->  ( m  +  1 )  e.  NN )
3231ad2antrr 707 . . . . . . . . . . . . . . . 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 2510 . . . . . . . . . . . . . . 15  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  e.  NN )
34 fzo0end 11188 . . . . . . . . . . . . . . 15  |-  ( (
# `  x )  e.  NN  ->  ( ( # `
 x )  - 
1 )  e.  ( 0..^ ( # `  x
) ) )
3533, 34syl 16 . . . . . . . . . . . . . 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 3346 . . . . . . . . . . . . 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 11769 . . . . . . . . . . . . 13  |-  ( ( x  e. Word  B  /\  ( ( # `  x
)  -  1 )  e.  ( 0 ... ( # `  x
) ) )  -> 
( # `  ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) )  =  ( ( # `  x
)  -  1 ) )
3828, 36, 37syl2anc 643 . . . . . . . . . . . 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 6096 . . . . . . . . . . . 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 10231 . . . . . . . . . . . . . 14  |-  ( m  e.  NN0  ->  m  e.  CC )
4140ad2antrr 707 . . . . . . . . . . . . 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 9048 . . . . . . . . . . . . 13  |-  1  e.  CC
43 pncan 9311 . . . . . . . . . . . . 13  |-  ( ( m  e.  CC  /\  1  e.  CC )  ->  ( ( m  + 
1 )  -  1 )  =  m )
4441, 42, 43sylancl 644 . . . . . . . . . . . 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 2472 . . . . . . . . . . 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 5728 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( # `
 y )  =  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) ) )
4746eqeq1d 2444 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( # `  y )  =  m  <->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m ) )
48 vex 2959 . . . . . . . . . . . . . . 15  |-  y  e. 
_V
4948, 22sbcie 3195 . . . . . . . . . . . . . 14  |-  ( [. y  /  x ]. ph  <->  ch )
50 dfsbcq 3163 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( [. y  /  x ]. ph  <->  [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5149, 50syl5bbr 251 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( ch 
<-> 
[. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5247, 51imbi12d 312 . . . . . . . . . . . 12  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( ( # `  y
)  =  m  ->  ch )  <->  ( ( # `  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) )  =  m  ->  [. ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
)  /  x ]. ph ) ) )
5352rspcv 3048 . . . . . . . . . . 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 59 . . . . . . . . . 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 11733 . . . . . . . . . . . . 13  |-  ( x  e. Word  B  ->  x : ( 0..^ (
# `  x )
) --> B )
5655ad2antrl 709 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x : ( 0..^ ( # `  x
) ) --> B )
5756, 35ffvelrnd 5871 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( x `  ( ( # `  x
)  -  1 ) )  e.  B )
58 oveq1 6088 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> ) )
59 dfsbcq 3163 . . . . . . . . . . . . . 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 ) )
6058, 59syl 16 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  [. ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" z "> )  /  x ]. ph ) )
6150, 60imbi12d 312 . . . . . . . . . . . 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 ) ) )
62 s1eq 11753 . . . . . . . . . . . . . . 15  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  <" z ">  =  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )
6362oveq2d 6097 . . . . . . . . . . . . . 14  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
64 dfsbcq 3163 . . . . . . . . . . . . . 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 )
)
6563, 64syl 16 . . . . . . . . . . . . 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 )
)
6665imbi2d 308 . . . . . . . . . . . 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 ) ) )
67 wrdind.6 . . . . . . . . . . . . 13  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( ch  ->  th )
)
68 ovex 6106 . . . . . . . . . . . . . 14  |-  ( y concat  <" z "> )  e.  _V
69 wrdind.3 . . . . . . . . . . . . . 14  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
7068, 69sbcie 3195 . . . . . . . . . . . . 13  |-  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  th )
7167, 49, 703imtr4g 262 . . . . . . . . . . . 12  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( [. y  /  x ]. ph  ->  [. (
y concat  <" z "> )  /  x ]. ph ) )
7261, 66, 71vtocl2ga 3019 . . . . . . . . . . 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 ) )
7326, 57, 72syl2anc 643 . . . . . . . . . 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 ) )
7454, 73mpd 15 . . . . . . . . 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 )
75 wrdfin 11734 . . . . . . . . . . . . . 14  |-  ( x  e. Word  B  ->  x  e.  Fin )
7675ad2antrl 709 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  e.  Fin )
77 hashnncl 11645 . . . . . . . . . . . . 13  |-  ( x  e.  Fin  ->  (
( # `  x )  e.  NN  <->  x  =/=  (/) ) )
7876, 77syl 16 . . . . . . . . . . . 12  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( ( # `  x )  e.  NN  <->  x  =/=  (/) ) )
7933, 78mpbid 202 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  =/=  (/) )
80 wrdeqcats1 11788 . . . . . . . . . . 11  |-  ( ( x  e. Word  B  /\  x  =/=  (/) )  ->  x  =  ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> ) )
8128, 79, 80syl2anc 643 . . . . . . . . . 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 ) ) "> ) )
82 sbceq1a 3171 . . . . . . . . . 10  |-  ( x  =  ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> )  ->  ( ph  <->  [. ( ( x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )  /  x ]. ph ) )
8381, 82syl 16 . . . . . . . . 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 ) )
8474, 83mpbird 224 . . . . . . . 8  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ph )
8584expr 599 . . . . . . 7  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  x  e. Word  B )  ->  (
( # `  x )  =  ( m  + 
1 )  ->  ph )
)
8685ralrimiva 2789 . . . . . 6  |-  ( ( m  e.  NN0  /\  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )  ->  A. x  e. Word  B ( ( # `  x )  =  ( m  +  1 )  ->  ph ) )
8786ex 424 . . . . 5  |-  ( m  e.  NN0  ->  ( A. y  e. Word  B (
( # `  y )  =  m  ->  ch )  ->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
8824, 87syl5bi 209 . . . 4  |-  ( m  e.  NN0  ->  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  ->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
894, 7, 10, 13, 19, 88nn0ind 10366 . . 3  |-  ( (
# `  A )  e.  NN0  ->  A. x  e. Word  B ( ( # `  x )  =  (
# `  A )  ->  ph ) )
901, 89syl 16 . 2  |-  ( A  e. Word  B  ->  A. x  e. Word  B ( ( # `  x )  =  (
# `  A )  ->  ph ) )
91 eqidd 2437 . 2  |-  ( A  e. Word  B  ->  ( # `
 A )  =  ( # `  A
) )
92 fveq2 5728 . . . . 5  |-  ( x  =  A  ->  ( # `
 x )  =  ( # `  A
) )
9392eqeq1d 2444 . . . 4  |-  ( x  =  A  ->  (
( # `  x )  =  ( # `  A
)  <->  ( # `  A
)  =  ( # `  A ) ) )
94 wrdind.4 . . . 4  |-  ( x  =  A  ->  ( ph 
<->  ta ) )
9593, 94imbi12d 312 . . 3  |-  ( x  =  A  ->  (
( ( # `  x
)  =  ( # `  A )  ->  ph )  <->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9695rspcv 3048 . 2  |-  ( A  e. Word  B  ->  ( A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )  ->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9790, 91, 96mp2d 43 1  |-  ( A  e. Word  B  ->  ta )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1652    e. wcel 1725    =/= wne 2599   A.wral 2705   [.wsbc 3161   (/)c0 3628   <.cop 3817   -->wf 5450   ` cfv 5454  (class class class)co 6081   Fincfn 7109   CCcc 8988   0cc0 8990   1c1 8991    + caddc 8993    - cmin 9291   NNcn 10000   NN0cn0 10221   ...cfz 11043  ..^cfzo 11135   #chash 11618  Word cword 11717   concat cconcat 11718   <"cs1 11719   substr csubstr 11720
This theorem is referenced by:  frmdgsum  14807  gsumwrev  15162  efginvrel2  15359
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-rep 4320  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-1cn 9048  ax-icn 9049  ax-addcl 9050  ax-addrcl 9051  ax-mulcl 9052  ax-mulrcl 9053  ax-mulcom 9054  ax-addass 9055  ax-mulass 9056  ax-distr 9057  ax-i2m1 9058  ax-1ne0 9059  ax-1rid 9060  ax-rnegex 9061  ax-rrecex 9062  ax-cnre 9063  ax-pre-lttri 9064  ax-pre-lttrn 9065  ax-pre-ltadd 9066  ax-pre-mulgt0 9067
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2710  df-rex 2711  df-reu 2712  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-int 4051  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-1st 6349  df-2nd 6350  df-riota 6549  df-recs 6633  df-rdg 6668  df-1o 6724  df-oadd 6728  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-fin 7113  df-card 7826  df-pnf 9122  df-mnf 9123  df-xr 9124  df-ltxr 9125  df-le 9126  df-sub 9293  df-neg 9294  df-nn 10001  df-n0 10222  df-z 10283  df-uz 10489  df-fz 11044  df-fzo 11136  df-hash 11619  df-word 11723  df-concat 11724  df-s1 11725  df-substr 11726
  Copyright terms: Public domain W3C validator