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

Theorem efgredlemg 15301
Description: Lemma for efgred 15307. (Contributed by Mario Carneiro, 4-Jun-2016.)
Hypotheses
Ref Expression
efgval.w  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
efgval.r  |-  .~  =  ( ~FG  `  I )
efgval2.m  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
efgval2.t  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
efgred.d  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
efgred.s  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
efgredlem.1  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
efgredlem.2  |-  ( ph  ->  A  e.  dom  S
)
efgredlem.3  |-  ( ph  ->  B  e.  dom  S
)
efgredlem.4  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
efgredlem.5  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
efgredlemb.k  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
efgredlemb.l  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
efgredlemb.p  |-  ( ph  ->  P  e.  ( 0 ... ( # `  ( A `  K )
) ) )
efgredlemb.q  |-  ( ph  ->  Q  e.  ( 0 ... ( # `  ( B `  L )
) ) )
efgredlemb.u  |-  ( ph  ->  U  e.  ( I  X.  2o ) )
efgredlemb.v  |-  ( ph  ->  V  e.  ( I  X.  2o ) )
efgredlemb.6  |-  ( ph  ->  ( S `  A
)  =  ( P ( T `  ( A `  K )
) U ) )
efgredlemb.7  |-  ( ph  ->  ( S `  B
)  =  ( Q ( T `  ( B `  L )
) V ) )
Assertion
Ref Expression
efgredlemg  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
Distinct variable groups:    a, b, A    y, a, z, b    L, a, b    K, a, b    t, n, v, w, y, z, P   
m, a, n, t, v, w, x, M, b    U, n, v, w, y, z    k, a, T, b, m, t, x    n, V, v, w, y, z    Q, n, t, v, w, y, z    W, a, b    k, n, v, w, y, z, W, m, t, x    .~ , a, b, m, t, x, y, z    B, a, b    S, a, b   
I, a, b, m, n, t, v, w, x, y, z    D, a, b, m, t
Allowed substitution hints:    ph( x, y, z, w, v, t, k, m, n, a, b)    A( x, y, z, w, v, t, k, m, n)    B( x, y, z, w, v, t, k, m, n)    D( x, y, z, w, v, k, n)    P( x, k, m, a, b)    Q( x, k, m, a, b)    .~ ( w, v, k, n)    S( x, y, z, w, v, t, k, m, n)    T( y, z, w, v, n)    U( x, t, k, m, a, b)    I( k)    K( x, y, z, w, v, t, k, m, n)    L( x, y, z, w, v, t, k, m, n)    M( y, z, k)    V( x, t, k, m, a, b)

Proof of Theorem efgredlemg
StepHypRef Expression
1 efgval.w . . . . . 6  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
2 fviss 5723 . . . . . 6  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
31, 2eqsstri 3321 . . . . 5  |-  W  C_ Word  ( I  X.  2o )
4 efgval.r . . . . . . 7  |-  .~  =  ( ~FG  `  I )
5 efgval2.m . . . . . . 7  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
6 efgval2.t . . . . . . 7  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
7 efgred.d . . . . . . 7  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
8 efgred.s . . . . . . 7  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
9 efgredlem.1 . . . . . . 7  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
10 efgredlem.2 . . . . . . 7  |-  ( ph  ->  A  e.  dom  S
)
11 efgredlem.3 . . . . . . 7  |-  ( ph  ->  B  e.  dom  S
)
12 efgredlem.4 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
13 efgredlem.5 . . . . . . 7  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
14 efgredlemb.k . . . . . . 7  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
15 efgredlemb.l . . . . . . 7  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
161, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15efgredlemf 15300 . . . . . 6  |-  ( ph  ->  ( ( A `  K )  e.  W  /\  ( B `  L
)  e.  W ) )
1716simpld 446 . . . . 5  |-  ( ph  ->  ( A `  K
)  e.  W )
183, 17sseldi 3289 . . . 4  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
19 lencl 11662 . . . 4  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
2018, 19syl 16 . . 3  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
2120nn0cnd 10208 . 2  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  CC )
2216simprd 450 . . . . 5  |-  ( ph  ->  ( B `  L
)  e.  W )
233, 22sseldi 3289 . . . 4  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
24 lencl 11662 . . . 4  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
2523, 24syl 16 . . 3  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
2625nn0cnd 10208 . 2  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  CC )
27 2cn 10002 . . 3  |-  2  e.  CC
2827a1i 11 . 2  |-  ( ph  ->  2  e.  CC )
291, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13efgredlema 15299 . . . . . . 7  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
3029simpld 446 . . . . . 6  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
311, 4, 5, 6, 7, 8efgsdmi 15291 . . . . . 6  |-  ( ( A  e.  dom  S  /\  ( ( # `  A
)  -  1 )  e.  NN )  -> 
( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3210, 30, 31syl2anc 643 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3314fveq2i 5671 . . . . . . 7  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
3433fveq2i 5671 . . . . . 6  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
3534rneqi 5036 . . . . 5  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
3632, 35syl6eleqr 2478 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
371, 4, 5, 6efgtlen 15285 . . . 4  |-  ( ( ( A `  K
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( A `  K ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3817, 36, 37syl2anc 643 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3929simprd 450 . . . . . . 7  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
401, 4, 5, 6, 7, 8efgsdmi 15291 . . . . . . 7  |-  ( ( B  e.  dom  S  /\  ( ( # `  B
)  -  1 )  e.  NN )  -> 
( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4111, 39, 40syl2anc 643 . . . . . 6  |-  ( ph  ->  ( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4212, 41eqeltrd 2461 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4315fveq2i 5671 . . . . . . 7  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
4443fveq2i 5671 . . . . . 6  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
4544rneqi 5036 . . . . 5  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
4642, 45syl6eleqr 2478 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
471, 4, 5, 6efgtlen 15285 . . . 4  |-  ( ( ( B `  L
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( B `  L ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4822, 46, 47syl2anc 643 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4938, 48eqtr3d 2421 . 2  |-  ( ph  ->  ( ( # `  ( A `  K )
)  +  2 )  =  ( ( # `  ( B `  L
) )  +  2 ) )
5021, 26, 28, 49addcan2ad 9204 1  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   A.wral 2649   {crab 2653    \ cdif 3260   (/)c0 3571   {csn 3757   <.cop 3760   <.cotp 3761   U_ciun 4035   class class class wbr 4153    e. cmpt 4207    _I cid 4434    X. cxp 4816   dom cdm 4818   ran crn 4819   ` cfv 5394  (class class class)co 6020    e. cmpt2 6022   1oc1o 6653   2oc2o 6654   CCcc 8921   0cc0 8923   1c1 8924    + caddc 8926    < clt 9053    - cmin 9223   NNcn 9932   2c2 9981   NN0cn0 10153   ...cfz 10975  ..^cfzo 11065   #chash 11545  Word cword 11644   splice csplice 11648   <"cs2 11732   ~FG cefg 15265
This theorem is referenced by:  efgredleme  15302
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 2368  ax-rep 4261  ax-sep 4271  ax-nul 4279  ax-pow 4318  ax-pr 4344  ax-un 4641  ax-cnex 8979  ax-resscn 8980  ax-1cn 8981  ax-icn 8982  ax-addcl 8983  ax-addrcl 8984  ax-mulcl 8985  ax-mulrcl 8986  ax-mulcom 8987  ax-addass 8988  ax-mulass 8989  ax-distr 8990  ax-i2m1 8991  ax-1ne0 8992  ax-1rid 8993  ax-rnegex 8994  ax-rrecex 8995  ax-cnre 8996  ax-pre-lttri 8997  ax-pre-lttrn 8998  ax-pre-ltadd 8999  ax-pre-mulgt0 9000
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 2242  df-mo 2243  df-clab 2374  df-cleq 2380  df-clel 2383  df-nfc 2512  df-ne 2552  df-nel 2553  df-ral 2654  df-rex 2655  df-reu 2656  df-rab 2658  df-v 2901  df-sbc 3105  df-csb 3195  df-dif 3266  df-un 3268  df-in 3270  df-ss 3277  df-pss 3279  df-nul 3572  df-if 3683  df-pw 3744  df-sn 3763  df-pr 3764  df-tp 3765  df-op 3766  df-ot 3767  df-uni 3958  df-int 3993  df-iun 4037  df-br 4154  df-opab 4208  df-mpt 4209  df-tr 4244  df-eprel 4435  df-id 4439  df-po 4444  df-so 4445  df-fr 4482  df-we 4484  df-ord 4525  df-on 4526  df-lim 4527  df-suc 4528  df-om 4786  df-xp 4824  df-rel 4825  df-cnv 4826  df-co 4827  df-dm 4828  df-rn 4829  df-res 4830  df-ima 4831  df-iota 5358  df-fun 5396  df-fn 5397  df-f 5398  df-f1 5399  df-fo 5400  df-f1o 5401  df-fv 5402  df-ov 6023  df-oprab 6024  df-mpt2 6025  df-1st 6288  df-2nd 6289  df-riota 6485  df-recs 6569  df-rdg 6604  df-1o 6660  df-2o 6661  df-oadd 6664  df-er 6841  df-map 6956  df-pm 6957  df-en 7046  df-dom 7047  df-sdom 7048  df-fin 7049  df-card 7759  df-pnf 9055  df-mnf 9056  df-xr 9057  df-ltxr 9058  df-le 9059  df-sub 9225  df-neg 9226  df-nn 9933  df-2 9990  df-n0 10154  df-z 10215  df-uz 10421  df-fz 10976  df-fzo 11066  df-hash 11546  df-word 11650  df-concat 11651  df-s1 11652  df-substr 11653  df-splice 11654  df-s2 11739
  Copyright terms: Public domain W3C validator