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

Theorem wrdind 11719
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 11663 . . 3  |-  ( A  e. Word  B  ->  ( # `
 A )  e. 
NN0 )
2 eqeq2 2397 . . . . . 6  |-  ( n  =  0  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  0 ) )
32imbi1d 309 . . . . 5  |-  ( n  =  0  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  0  ->  ph ) ) )
43ralbidv 2670 . . . 4  |-  ( n  =  0  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  0  ->  ph ) ) )
5 eqeq2 2397 . . . . . 6  |-  ( n  =  m  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  m ) )
65imbi1d 309 . . . . 5  |-  ( n  =  m  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  m  ->  ph ) ) )
76ralbidv 2670 . . . 4  |-  ( n  =  m  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  m  ->  ph ) ) )
8 eqeq2 2397 . . . . . 6  |-  ( n  =  ( m  + 
1 )  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  ( m  +  1 ) ) )
98imbi1d 309 . . . . 5  |-  ( n  =  ( m  + 
1 )  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  ( m  +  1 )  ->  ph ) ) )
109ralbidv 2670 . . . 4  |-  ( n  =  ( m  + 
1 )  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
11 eqeq2 2397 . . . . . 6  |-  ( n  =  ( # `  A
)  ->  ( ( # `
 x )  =  n  <->  ( # `  x
)  =  ( # `  A ) ) )
1211imbi1d 309 . . . . 5  |-  ( n  =  ( # `  A
)  ->  ( (
( # `  x )  =  n  ->  ph )  <->  ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
1312ralbidv 2670 . . . 4  |-  ( n  =  ( # `  A
)  ->  ( A. x  e. Word  B (
( # `  x )  =  n  ->  ph )  <->  A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
14 hasheq0 11572 . . . . . 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 2715 . . . 4  |-  A. x  e. Word  B ( ( # `  x )  =  0  ->  ph )
20 fveq2 5669 . . . . . . . 8  |-  ( x  =  y  ->  ( # `
 x )  =  ( # `  y
) )
2120eqeq1d 2396 . . . . . . 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 2876 . . . . 5  |-  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  <->  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )
25 swrdcl 11694 . . . . . . . . . . . 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 11088 . . . . . . . . . . . . . 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 10192 . . . . . . . . . . . . . . . . 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 2462 . . . . . . . . . . . . . . 15  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  e.  NN )
34 fzo0end 11116 . . . . . . . . . . . . . . 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 3290 . . . . . . . . . . . . 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 11697 . . . . . . . . . . . . 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 6036 . . . . . . . . . . . 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 10164 . . . . . . . . . . . . . 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 8982 . . . . . . . . . . . . 13  |-  1  e.  CC
43 pncan 9244 . . . . . . . . . . . . 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 2424 . . . . . . . . . . 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 5669 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( # `
 y )  =  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) ) )
4746eqeq1d 2396 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( # `  y )  =  m  <->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m ) )
48 vex 2903 . . . . . . . . . . . . . . 15  |-  y  e. 
_V
4948, 22sbcie 3139 . . . . . . . . . . . . . 14  |-  ( [. y  /  x ]. ph  <->  ch )
50 dfsbcq 3107 . . . . . . . . . . . . . 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 2992 . . . . . . . . . . 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 11661 . . . . . . . . . . . . 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 5811 . . . . . . . . . . 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 6028 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> ) )
59 dfsbcq 3107 . . . . . . . . . . . . . 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 11681 . . . . . . . . . . . . . . 15  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  <" z ">  =  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )
6362oveq2d 6037 . . . . . . . . . . . . . 14  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
64 dfsbcq 3107 . . . . . . . . . . . . . 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 6046 . . . . . . . . . . . . . 14  |-  ( y concat  <" z "> )  e.  _V
69 wrdind.3 . . . . . . . . . . . . . 14  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
7068, 69sbcie 3139 . . . . . . . . . . . . 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 2963 . . . . . . . . . . 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 11662 . . . . . . . . . . . . . 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 11573 . . . . . . . . . . . . 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 11716 . . . . . . . . . . 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 3115 . . . . . . . . . 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 2733 . . . . . 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 10299 . . 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 2389 . 2  |-  ( A  e. Word  B  ->  ( # `
 A )  =  ( # `  A
) )
92 fveq2 5669 . . . . 5  |-  ( x  =  A  ->  ( # `
 x )  =  ( # `  A
) )
9392eqeq1d 2396 . . . 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 2992 . 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 1649    e. wcel 1717    =/= wne 2551   A.wral 2650   [.wsbc 3105   (/)c0 3572   <.cop 3761   -->wf 5391   ` cfv 5395  (class class class)co 6021   Fincfn 7046   CCcc 8922   0cc0 8924   1c1 8925    + caddc 8927    - cmin 9224   NNcn 9933   NN0cn0 10154   ...cfz 10976  ..^cfzo 11066   #chash 11546  Word cword 11645   concat cconcat 11646   <"cs1 11647   substr csubstr 11648
This theorem is referenced by:  frmdgsum  14735  gsumwrev  15090  efginvrel2  15287
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2369  ax-rep 4262  ax-sep 4272  ax-nul 4280  ax-pow 4319  ax-pr 4345  ax-un 4642  ax-cnex 8980  ax-resscn 8981  ax-1cn 8982  ax-icn 8983  ax-addcl 8984  ax-addrcl 8985  ax-mulcl 8986  ax-mulrcl 8987  ax-mulcom 8988  ax-addass 8989  ax-mulass 8990  ax-distr 8991  ax-i2m1 8992  ax-1ne0 8993  ax-1rid 8994  ax-rnegex 8995  ax-rrecex 8996  ax-cnre 8997  ax-pre-lttri 8998  ax-pre-lttrn 8999  ax-pre-ltadd 9000  ax-pre-mulgt0 9001
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2243  df-mo 2244  df-clab 2375  df-cleq 2381  df-clel 2384  df-nfc 2513  df-ne 2553  df-nel 2554  df-ral 2655  df-rex 2656  df-reu 2657  df-rab 2659  df-v 2902  df-sbc 3106  df-csb 3196  df-dif 3267  df-un 3269  df-in 3271  df-ss 3278  df-pss 3280  df-nul 3573  df-if 3684  df-pw 3745  df-sn 3764  df-pr 3765  df-tp 3766  df-op 3767  df-uni 3959  df-int 3994  df-iun 4038  df-br 4155  df-opab 4209  df-mpt 4210  df-tr 4245  df-eprel 4436  df-id 4440  df-po 4445  df-so 4446  df-fr 4483  df-we 4485  df-ord 4526  df-on 4527  df-lim 4528  df-suc 4529  df-om 4787  df-xp 4825  df-rel 4826  df-cnv 4827  df-co 4828  df-dm 4829  df-rn 4830  df-res 4831  df-ima 4832  df-iota 5359  df-fun 5397  df-fn 5398  df-f 5399  df-f1 5400  df-fo 5401  df-f1o 5402  df-fv 5403  df-ov 6024  df-oprab 6025  df-mpt2 6026  df-1st 6289  df-2nd 6290  df-riota 6486  df-recs 6570  df-rdg 6605  df-1o 6661  df-oadd 6665  df-er 6842  df-en 7047  df-dom 7048  df-sdom 7049  df-fin 7050  df-card 7760  df-pnf 9056  df-mnf 9057  df-xr 9058  df-ltxr 9059  df-le 9060  df-sub 9226  df-neg 9227  df-nn 9934  df-n0 10155  df-z 10216  df-uz 10422  df-fz 10977  df-fzo 11067  df-hash 11547  df-word 11651  df-concat 11652  df-s1 11653  df-substr 11654
  Copyright terms: Public domain W3C validator