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

Theorem wrdind 12359
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 12237 . . 3  |-  ( A  e. Word  B  ->  ( # `
 A )  e. 
NN0 )
2 eqeq2 2446 . . . . . 6  |-  ( n  =  0  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  0 ) )
32imbi1d 317 . . . . 5  |-  ( n  =  0  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  0  ->  ph ) ) )
43ralbidv 2729 . . . 4  |-  ( n  =  0  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  0  ->  ph ) ) )
5 eqeq2 2446 . . . . . 6  |-  ( n  =  m  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  m ) )
65imbi1d 317 . . . . 5  |-  ( n  =  m  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  m  ->  ph ) ) )
76ralbidv 2729 . . . 4  |-  ( n  =  m  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  m  ->  ph ) ) )
8 eqeq2 2446 . . . . . 6  |-  ( n  =  ( m  + 
1 )  ->  (
( # `  x )  =  n  <->  ( # `  x
)  =  ( m  +  1 ) ) )
98imbi1d 317 . . . . 5  |-  ( n  =  ( m  + 
1 )  ->  (
( ( # `  x
)  =  n  ->  ph )  <->  ( ( # `  x )  =  ( m  +  1 )  ->  ph ) ) )
109ralbidv 2729 . . . 4  |-  ( n  =  ( m  + 
1 )  ->  ( A. x  e. Word  B ( ( # `  x
)  =  n  ->  ph )  <->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
11 eqeq2 2446 . . . . . 6  |-  ( n  =  ( # `  A
)  ->  ( ( # `
 x )  =  n  <->  ( # `  x
)  =  ( # `  A ) ) )
1211imbi1d 317 . . . . 5  |-  ( n  =  ( # `  A
)  ->  ( (
( # `  x )  =  n  ->  ph )  <->  ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
1312ralbidv 2729 . . . 4  |-  ( n  =  ( # `  A
)  ->  ( A. x  e. Word  B (
( # `  x )  =  n  ->  ph )  <->  A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )
) )
14 hasheq0 12119 . . . . . 6  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  <->  x  =  (/) ) )
15 wrdind.5 . . . . . . 7  |-  ps
16 wrdind.1 . . . . . . 7  |-  ( x  =  (/)  ->  ( ph  <->  ps ) )
1715, 16mpbiri 233 . . . . . 6  |-  ( x  =  (/)  ->  ph )
1814, 17syl6bi 228 . . . . 5  |-  ( x  e. Word  B  ->  (
( # `  x )  =  0  ->  ph )
)
1918rgen 2775 . . . 4  |-  A. x  e. Word  B ( ( # `  x )  =  0  ->  ph )
20 fveq2 5683 . . . . . . . 8  |-  ( x  =  y  ->  ( # `
 x )  =  ( # `  y
) )
2120eqeq1d 2445 . . . . . . 7  |-  ( x  =  y  ->  (
( # `  x )  =  m  <->  ( # `  y
)  =  m ) )
22 wrdind.2 . . . . . . 7  |-  ( x  =  y  ->  ( ph 
<->  ch ) )
2321, 22imbi12d 320 . . . . . 6  |-  ( x  =  y  ->  (
( ( # `  x
)  =  m  ->  ph )  <->  ( ( # `  y )  =  m  ->  ch ) ) )
2423cbvralv 2941 . . . . 5  |-  ( A. x  e. Word  B (
( # `  x )  =  m  ->  ph )  <->  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )
25 swrdcl 12303 . . . . . . . . . . . 12  |-  ( x  e. Word  B  ->  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. )  e. Word  B )
2625ad2antrl 722 . . . . . . . . . . 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 749 . . . . . . . . . . 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 750 . . . . . . . . . . . . 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 11558 . . . . . . . . . . . . . 14  |-  ( 0..^ ( # `  x
) )  C_  (
0 ... ( # `  x
) )
30 simprr 751 . . . . . . . . . . . . . . . 16  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  =  ( m  +  1 ) )
31 nn0p1nn 10611 . . . . . . . . . . . . . . . . 17  |-  ( m  e.  NN0  ->  ( m  +  1 )  e.  NN )
3231ad2antrr 720 . . . . . . . . . . . . . . . 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 2511 . . . . . . . . . . . . . . 15  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ( # `  x
)  e.  NN )
34 fzo0end 11607 . . . . . . . . . . . . . . 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 12306 . . . . . . . . . . . . 13  |-  ( ( x  e. Word  B  /\  ( ( # `  x
)  -  1 )  e.  ( 0 ... ( # `  x
) ) )  -> 
( # `  ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) )  =  ( ( # `  x
)  -  1 ) )
3828, 36, 37syl2anc 656 . . . . . . . . . . . 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 6099 . . . . . . . . . . . 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 10581 . . . . . . . . . . . . . 14  |-  ( m  e.  NN0  ->  m  e.  CC )
4140ad2antrr 720 . . . . . . . . . . . . 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 9332 . . . . . . . . . . . . 13  |-  1  e.  CC
43 pncan 9608 . . . . . . . . . . . . 13  |-  ( ( m  e.  CC  /\  1  e.  CC )  ->  ( ( m  + 
1 )  -  1 )  =  m )
4441, 42, 43sylancl 657 . . . . . . . . . . . 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 2473 . . . . . . . . . . 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 5683 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( # `
 y )  =  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) ) )
4746eqeq1d 2445 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( # `  y )  =  m  <->  ( # `  (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) )  =  m ) )
48 vex 2969 . . . . . . . . . . . . . . 15  |-  y  e. 
_V
4948, 22sbcie 3213 . . . . . . . . . . . . . 14  |-  ( [. y  /  x ]. ph  <->  ch )
50 dfsbcq 3181 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( [. y  /  x ]. ph  <->  [. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5149, 50syl5bbr 259 . . . . . . . . . . . . 13  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  ( ch 
<-> 
[. ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  /  x ]. ph ) )
5247, 51imbi12d 320 . . . . . . . . . . . 12  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
( ( # `  y
)  =  m  ->  ch )  <->  ( ( # `  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) )  =  m  ->  [. ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
)  /  x ]. ph ) ) )
5352rspcv 3062 . . . . . . . . . . 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 61 . . . . . . . . . 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 12228 . . . . . . . . . . . . 13  |-  ( x  e. Word  B  ->  x : ( 0..^ (
# `  x )
) --> B )
5655ad2antrl 722 . . . . . . . . . . . 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 5836 . . . . . . . . . . 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 6091 . . . . . . . . . . . . . 14  |-  ( y  =  ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. )  ->  (
y concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" z "> ) )
59 dfsbcq 3181 . . . . . . . . . . . . . 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 320 . . . . . . . . . . . 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 12279 . . . . . . . . . . . . . . 15  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  <" z ">  =  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> )
6362oveq2d 6100 . . . . . . . . . . . . . 14  |-  ( z  =  ( x `  ( ( # `  x
)  -  1 ) )  ->  ( (
x substr  <. 0 ,  ( ( # `  x
)  -  1 )
>. ) concat  <" z "> )  =  ( ( x substr  <. 0 ,  ( ( # `  x )  -  1 ) >. ) concat  <" (
x `  ( ( # `
 x )  - 
1 ) ) "> ) )
64 dfsbcq 3181 . . . . . . . . . . . . . 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 316 . . . . . . . . . . . 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 6109 . . . . . . . . . . . . . 14  |-  ( y concat  <" z "> )  e.  _V
69 wrdind.3 . . . . . . . . . . . . . 14  |-  ( x  =  ( y concat  <" z "> )  ->  ( ph  <->  th )
)
7068, 69sbcie 3213 . . . . . . . . . . . . 13  |-  ( [. ( y concat  <" z "> )  /  x ]. ph  <->  th )
7167, 49, 703imtr4g 270 . . . . . . . . . . . 12  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( [. y  /  x ]. ph  ->  [. (
y concat  <" z "> )  /  x ]. ph ) )
7261, 66, 71vtocl2ga 3031 . . . . . . . . . . 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 656 . . . . . . . . . 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 12236 . . . . . . . . . . . . . 14  |-  ( x  e. Word  B  ->  x  e.  Fin )
7675ad2antrl 722 . . . . . . . . . . . . 13  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  e.  Fin )
77 hashnncl 12122 . . . . . . . . . . . . 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 210 . . . . . . . . . . 11  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  x  =/=  (/) )
80 wrdeqcats1 12356 . . . . . . . . . . 11  |-  ( ( x  e. Word  B  /\  x  =/=  (/) )  ->  x  =  ( ( x substr  <. 0 ,  ( (
# `  x )  -  1 ) >.
) concat  <" ( x `
 ( ( # `  x )  -  1 ) ) "> ) )
8128, 79, 80syl2anc 656 . . . . . . . . . 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 3189 . . . . . . . . . 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 232 . . . . . . . 8  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  (
x  e. Word  B  /\  ( # `  x )  =  ( m  + 
1 ) ) )  ->  ph )
8584expr 612 . . . . . . 7  |-  ( ( ( m  e.  NN0  /\ 
A. y  e. Word  B
( ( # `  y
)  =  m  ->  ch ) )  /\  x  e. Word  B )  ->  (
( # `  x )  =  ( m  + 
1 )  ->  ph )
)
8685ralrimiva 2793 . . . . . 6  |-  ( ( m  e.  NN0  /\  A. y  e. Word  B ( ( # `  y
)  =  m  ->  ch ) )  ->  A. x  e. Word  B ( ( # `  x )  =  ( m  +  1 )  ->  ph ) )
8786ex 434 . . . . 5  |-  ( m  e.  NN0  ->  ( A. y  e. Word  B (
( # `  y )  =  m  ->  ch )  ->  A. x  e. Word  B
( ( # `  x
)  =  ( m  +  1 )  ->  ph ) ) )
8824, 87syl5bi 217 . . . 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 10730 . . 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 2438 . 2  |-  ( A  e. Word  B  ->  ( # `
 A )  =  ( # `  A
) )
92 fveq2 5683 . . . . 5  |-  ( x  =  A  ->  ( # `
 x )  =  ( # `  A
) )
9392eqeq1d 2445 . . . 4  |-  ( x  =  A  ->  (
( # `  x )  =  ( # `  A
)  <->  ( # `  A
)  =  ( # `  A ) ) )
94 wrdind.4 . . . 4  |-  ( x  =  A  ->  ( ph 
<->  ta ) )
9593, 94imbi12d 320 . . 3  |-  ( x  =  A  ->  (
( ( # `  x
)  =  ( # `  A )  ->  ph )  <->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9695rspcv 3062 . 2  |-  ( A  e. Word  B  ->  ( A. x  e. Word  B ( ( # `  x
)  =  ( # `  A )  ->  ph )  ->  ( ( # `  A
)  =  ( # `  A )  ->  ta ) ) )
9790, 91, 96mp2d 45 1  |-  ( A  e. Word  B  ->  ta )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1364    e. wcel 1757    =/= wne 2600   A.wral 2709   [.wsbc 3179   (/)c0 3629   <.cop 3875   -->wf 5406   ` cfv 5410  (class class class)co 6084   Fincfn 7302   CCcc 9272   0cc0 9274   1c1 9275    + caddc 9277    - cmin 9587   NNcn 10314   NN0cn0 10571   ...cfz 11428  ..^cfzo 11536   #chash 12091  Word cword 12209   concat cconcat 12211   <"cs1 12212   substr csubstr 12213
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1671  ax-6 1709  ax-7 1729  ax-8 1759  ax-9 1761  ax-10 1776  ax-11 1781  ax-12 1793  ax-13 1944  ax-ext 2418  ax-rep 4395  ax-sep 4405  ax-nul 4413  ax-pow 4462  ax-pr 4523  ax-un 6365  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1702  df-eu 2260  df-mo 2261  df-clab 2424  df-cleq 2430  df-clel 2433  df-nfc 2562  df-ne 2602  df-nel 2603  df-ral 2714  df-rex 2715  df-reu 2716  df-rab 2718  df-v 2968  df-sbc 3180  df-csb 3281  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3630  df-if 3784  df-pw 3854  df-sn 3870  df-pr 3872  df-tp 3874  df-op 3876  df-uni 4084  df-int 4121  df-iun 4165  df-br 4285  df-opab 4343  df-mpt 4344  df-tr 4378  df-eprel 4623  df-id 4627  df-po 4632  df-so 4633  df-fr 4670  df-we 4672  df-ord 4713  df-on 4714  df-lim 4715  df-suc 4716  df-xp 4837  df-rel 4838  df-cnv 4839  df-co 4840  df-dm 4841  df-rn 4842  df-res 4843  df-ima 4844  df-iota 5373  df-fun 5412  df-fn 5413  df-f 5414  df-f1 5415  df-fo 5416  df-f1o 5417  df-fv 5418  df-riota 6043  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-om 6470  df-1st 6570  df-2nd 6571  df-recs 6822  df-rdg 6856  df-1o 6912  df-oadd 6916  df-er 7093  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-card 8101  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-nn 10315  df-n0 10572  df-z 10639  df-uz 10854  df-fz 11429  df-fzo 11537  df-hash 12092  df-word 12217  df-concat 12219  df-s1 12220  df-substr 12221
This theorem is referenced by:  frmdgsum  15524  gsumwrev  15865  gsmsymgrfix  15917  efginvrel2  16208  signstfvneq0  26825  signstfvc  26827
  Copyright terms: Public domain W3C validator