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

Theorem wrdind 11746
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 11690 . . 3  |-  ( A  e. Word  B  ->  ( # `
 A )  e. 
NN0 )
2 eqeq2 2413 . . . . . 6  |-  ( n  =  0  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  0 ) )
32imbi1d 309 . . . . 5  |-  ( n  =  0  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  0  ->  ph ) ) )
43ralbidv 2686 . . . 4  |-  ( n  =  0  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  0  ->  ph ) ) )
5 eqeq2 2413 . . . . . 6  |-  ( n  =  m  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  m ) )
65imbi1d 309 . . . . 5  |-  ( n  =  m  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  m  ->  ph ) ) )
76ralbidv 2686 . . . 4  |-  ( n  =  m  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  m  ->  ph ) ) )
8 eqeq2 2413 . . . . . 6  |-  ( n  =  ( m  + 
1 )  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  ( m  +  1 ) ) )
98imbi1d 309 . . . . 5  |-  ( n  =  ( m  + 
1 )  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  ( m  +  1 )  ->  ph ) ) )
109ralbidv 2686 . . . 4  |-  ( n  =  ( m  + 
1 )  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
11 eqeq2 2413 . . . . . 6  |-  ( n  =  ( # `  A
)  ->  ( ( # `
 x )  =  n  <->  ( # `  x
)  =  ( # `  A ) ) )
1211imbi1d 309 . . . . 5  |-  ( n  =  ( # `  A
)  ->  ( (
( # `  x )  =  n  ->  ph )  <->  ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
1312ralbidv 2686 . . . 4  |-  ( n  =  ( # `  A
)  ->  ( A. x  e. Word  B (
( # `  x )  =  n  ->  ph )  <->  A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
14 hasheq0 11599 . . . . . 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 2731 . . . 4  |-  A. x  e. Word  B ( ( # `  x )  =  0  ->  ph )
20 fveq2 5687 . . . . . . . 8  |-  ( x  =  y  ->  ( # `
 x )  =  ( # `  y
) )
2120eqeq1d 2412 . . . . . . 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 2892 . . . . 5  |-  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  <->  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )
25 swrdcl 11721 . . . . . . . . . . . 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 11112 . . . . . . . . . . . . . 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 10215 . . . . . . . . . . . . . . . . 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 2478 . . . . . . . . . . . . . . 15  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  e.  NN )
34 fzo0end 11143 . . . . . . . . . . . . . . 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 3306 . . . . . . . . . . . . 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 11724 . . . . . . . . . . . . 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 6055 . . . . . . . . . . . 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 10187 . . . . . . . . . . . . . 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 9004 . . . . . . . . . . . . 13  |-  1  e.  CC
43 pncan 9267 . . . . . . . . . . . . 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 2440 . . . . . . . . . . 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 5687 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( # `
 y )  =  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) ) )
4746eqeq1d 2412 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( # `  y )  =  m  <->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m ) )
48 vex 2919 . . . . . . . . . . . . . . 15  |-  y  e. 
_V
4948, 22sbcie 3155 . . . . . . . . . . . . . 14  |-  ( [. y  /  x ]. ph  <->  ch )
50 dfsbcq 3123 . . . . . . . . . . . . . 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 3008 . . . . . . . . . . 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 11688 . . . . . . . . . . . . 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 5830 . . . . . . . . . . 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 6047 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> ) )
59 dfsbcq 3123 . . . . . . . . . . . . . 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 11708 . . . . . . . . . . . . . . 15  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  <" z ">  =  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )
6362oveq2d 6056 . . . . . . . . . . . . . 14  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
64 dfsbcq 3123 . . . . . . . . . . . . . 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 6065 . . . . . . . . . . . . . 14  |-  ( y concat  <" z "> )  e.  _V
69 wrdind.3 . . . . . . . . . . . . . 14  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
7068, 69sbcie 3155 . . . . . . . . . . . . 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 2979 . . . . . . . . . . 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 11689 . . . . . . . . . . . . . 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 11600 . . . . . . . . . . . . 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 11743 . . . . . . . . . . 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 3131 . . . . . . . . . 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 2749 . . . . . 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 10322 . . 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 2405 . 2  |-  ( A  e. Word  B  ->  ( # `
 A )  =  ( # `  A
) )
92 fveq2 5687 . . . . 5  |-  ( x  =  A  ->  ( # `
 x )  =  ( # `  A
) )
9392eqeq1d 2412 . . . 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 3008 . 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 1721    =/= wne 2567   A.wral 2666   [.wsbc 3121   (/)c0 3588   <.cop 3777   -->wf 5409   ` cfv 5413  (class class class)co 6040   Fincfn 7068   CCcc 8944   0cc0 8946   1c1 8947    + caddc 8949    - cmin 9247   NNcn 9956   NN0cn0 10177   ...cfz 10999  ..^cfzo 11090   #chash 11573  Word cword 11672   concat cconcat 11673   <"cs1 11674   substr csubstr 11675
This theorem is referenced by:  frmdgsum  14762  gsumwrev  15117  efginvrel2  15314
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 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2385  ax-rep 4280  ax-sep 4290  ax-nul 4298  ax-pow 4337  ax-pr 4363  ax-un 4660  ax-cnex 9002  ax-resscn 9003  ax-1cn 9004  ax-icn 9005  ax-addcl 9006  ax-addrcl 9007  ax-mulcl 9008  ax-mulrcl 9009  ax-mulcom 9010  ax-addass 9011  ax-mulass 9012  ax-distr 9013  ax-i2m1 9014  ax-1ne0 9015  ax-1rid 9016  ax-rnegex 9017  ax-rrecex 9018  ax-cnre 9019  ax-pre-lttri 9020  ax-pre-lttrn 9021  ax-pre-ltadd 9022  ax-pre-mulgt0 9023
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 2258  df-mo 2259  df-clab 2391  df-cleq 2397  df-clel 2400  df-nfc 2529  df-ne 2569  df-nel 2570  df-ral 2671  df-rex 2672  df-reu 2673  df-rab 2675  df-v 2918  df-sbc 3122  df-csb 3212  df-dif 3283  df-un 3285  df-in 3287  df-ss 3294  df-pss 3296  df-nul 3589  df-if 3700  df-pw 3761  df-sn 3780  df-pr 3781  df-tp 3782  df-op 3783  df-uni 3976  df-int 4011  df-iun 4055  df-br 4173  df-opab 4227  df-mpt 4228  df-tr 4263  df-eprel 4454  df-id 4458  df-po 4463  df-so 4464  df-fr 4501  df-we 4503  df-ord 4544  df-on 4545  df-lim 4546  df-suc 4547  df-om 4805  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5377  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-ov 6043  df-oprab 6044  df-mpt2 6045  df-1st 6308  df-2nd 6309  df-riota 6508  df-recs 6592  df-rdg 6627  df-1o 6683  df-oadd 6687  df-er 6864  df-en 7069  df-dom 7070  df-sdom 7071  df-fin 7072  df-card 7782  df-pnf 9078  df-mnf 9079  df-xr 9080  df-ltxr 9081  df-le 9082  df-sub 9249  df-neg 9250  df-nn 9957  df-n0 10178  df-z 10239  df-uz 10445  df-fz 11000  df-fzo 11091  df-hash 11574  df-word 11678  df-concat 11679  df-s1 11680  df-substr 11681
  Copyright terms: Public domain W3C validator