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

Theorem efgredlemg 15366
Description: Lemma for efgred 15372. (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 5776 . . . . . 6  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
31, 2eqsstri 3370 . . . . 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 15365 . . . . . 6  |-  ( ph  ->  ( ( A `  K )  e.  W  /\  ( B `  L
)  e.  W ) )
1716simpld 446 . . . . 5  |-  ( ph  ->  ( A `  K
)  e.  W )
183, 17sseldi 3338 . . . 4  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
19 lencl 11727 . . . 4  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
2018, 19syl 16 . . 3  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
2120nn0cnd 10268 . 2  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  CC )
2216simprd 450 . . . . 5  |-  ( ph  ->  ( B `  L
)  e.  W )
233, 22sseldi 3338 . . . 4  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
24 lencl 11727 . . . 4  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
2523, 24syl 16 . . 3  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
2625nn0cnd 10268 . 2  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  CC )
27 2cn 10062 . . 3  |-  2  e.  CC
2827a1i 11 . 2  |-  ( ph  ->  2  e.  CC )
291, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13efgredlema 15364 . . . . . . 7  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
3029simpld 446 . . . . . 6  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
311, 4, 5, 6, 7, 8efgsdmi 15356 . . . . . 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 5723 . . . . . . 7  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
3433fveq2i 5723 . . . . . 6  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
3534rneqi 5088 . . . . 5  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
3632, 35syl6eleqr 2526 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
371, 4, 5, 6efgtlen 15350 . . . 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 15356 . . . . . . 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 2509 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4315fveq2i 5723 . . . . . . 7  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
4443fveq2i 5723 . . . . . 6  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
4544rneqi 5088 . . . . 5  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
4642, 45syl6eleqr 2526 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
471, 4, 5, 6efgtlen 15350 . . . 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 2469 . 2  |-  ( ph  ->  ( ( # `  ( A `  K )
)  +  2 )  =  ( ( # `  ( B `  L
) )  +  2 ) )
5021, 26, 28, 49addcan2ad 9264 1  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    = wceq 1652    e. wcel 1725   A.wral 2697   {crab 2701    \ cdif 3309   (/)c0 3620   {csn 3806   <.cop 3809   <.cotp 3810   U_ciun 4085   class class class wbr 4204    e. cmpt 4258    _I cid 4485    X. cxp 4868   dom cdm 4870   ran crn 4871   ` cfv 5446  (class class class)co 6073    e. cmpt2 6075   1oc1o 6709   2oc2o 6710   CCcc 8980   0cc0 8982   1c1 8983    + caddc 8985    < clt 9112    - cmin 9283   NNcn 9992   2c2 10041   NN0cn0 10213   ...cfz 11035  ..^cfzo 11127   #chash 11610  Word cword 11709   splice csplice 11713   <"cs2 11797   ~FG cefg 15330
This theorem is referenced by:  efgredleme  15367
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 2416  ax-rep 4312  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693  ax-cnex 9038  ax-resscn 9039  ax-1cn 9040  ax-icn 9041  ax-addcl 9042  ax-addrcl 9043  ax-mulcl 9044  ax-mulrcl 9045  ax-mulcom 9046  ax-addass 9047  ax-mulass 9048  ax-distr 9049  ax-i2m1 9050  ax-1ne0 9051  ax-1rid 9052  ax-rnegex 9053  ax-rrecex 9054  ax-cnre 9055  ax-pre-lttri 9056  ax-pre-lttrn 9057  ax-pre-ltadd 9058  ax-pre-mulgt0 9059
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 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-ot 3816  df-uni 4008  df-int 4043  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4838  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-1st 6341  df-2nd 6342  df-riota 6541  df-recs 6625  df-rdg 6660  df-1o 6716  df-2o 6717  df-oadd 6720  df-er 6897  df-map 7012  df-pm 7013  df-en 7102  df-dom 7103  df-sdom 7104  df-fin 7105  df-card 7818  df-pnf 9114  df-mnf 9115  df-xr 9116  df-ltxr 9117  df-le 9118  df-sub 9285  df-neg 9286  df-nn 9993  df-2 10050  df-n0 10214  df-z 10275  df-uz 10481  df-fz 11036  df-fzo 11128  df-hash 11611  df-word 11715  df-concat 11716  df-s1 11717  df-substr 11718  df-splice 11719  df-s2 11804
  Copyright terms: Public domain W3C validator