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

Theorem efgredlemg 16230
Description: Lemma for efgred 16236. (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 5744 . . . . . 6  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
31, 2eqsstri 3381 . . . . 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 16229 . . . . . 6  |-  ( ph  ->  ( ( A `  K )  e.  W  /\  ( B `  L
)  e.  W ) )
1716simpld 459 . . . . 5  |-  ( ph  ->  ( A `  K
)  e.  W )
183, 17sseldi 3349 . . . 4  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
19 lencl 12241 . . . 4  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
2018, 19syl 16 . . 3  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
2120nn0cnd 10630 . 2  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  CC )
2216simprd 463 . . . . 5  |-  ( ph  ->  ( B `  L
)  e.  W )
233, 22sseldi 3349 . . . 4  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
24 lencl 12241 . . . 4  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
2523, 24syl 16 . . 3  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
2625nn0cnd 10630 . 2  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  CC )
27 2cnd 10386 . 2  |-  ( ph  ->  2  e.  CC )
281, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13efgredlema 16228 . . . . . . 7  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
2928simpld 459 . . . . . 6  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
301, 4, 5, 6, 7, 8efgsdmi 16220 . . . . . 6  |-  ( ( A  e.  dom  S  /\  ( ( # `  A
)  -  1 )  e.  NN )  -> 
( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3110, 29, 30syl2anc 661 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3214fveq2i 5689 . . . . . . 7  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
3332fveq2i 5689 . . . . . 6  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
3433rneqi 5061 . . . . 5  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
3531, 34syl6eleqr 2529 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
361, 4, 5, 6efgtlen 16214 . . . 4  |-  ( ( ( A `  K
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( A `  K ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3717, 35, 36syl2anc 661 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3828simprd 463 . . . . . . 7  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
391, 4, 5, 6, 7, 8efgsdmi 16220 . . . . . . 7  |-  ( ( B  e.  dom  S  /\  ( ( # `  B
)  -  1 )  e.  NN )  -> 
( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4011, 38, 39syl2anc 661 . . . . . 6  |-  ( ph  ->  ( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4112, 40eqeltrd 2512 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4215fveq2i 5689 . . . . . . 7  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
4342fveq2i 5689 . . . . . 6  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
4443rneqi 5061 . . . . 5  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
4541, 44syl6eleqr 2529 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
461, 4, 5, 6efgtlen 16214 . . . 4  |-  ( ( ( B `  L
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( B `  L ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4722, 45, 46syl2anc 661 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4837, 47eqtr3d 2472 . 2  |-  ( ph  ->  ( ( # `  ( A `  K )
)  +  2 )  =  ( ( # `  ( B `  L
) )  +  2 ) )
4921, 26, 27, 48addcan2ad 9567 1  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 369    = wceq 1369    e. wcel 1756   A.wral 2710   {crab 2714    \ cdif 3320   (/)c0 3632   {csn 3872   <.cop 3878   <.cotp 3880   U_ciun 4166   class class class wbr 4287    e. cmpt 4345    _I cid 4626    X. cxp 4833   dom cdm 4835   ran crn 4836   ` cfv 5413  (class class class)co 6086    e. cmpt2 6088   1oc1o 6905   2oc2o 6906   0cc0 9274   1c1 9275    + caddc 9277    < clt 9410    - cmin 9587   NNcn 10314   2c2 10363   NN0cn0 10571   ...cfz 11429  ..^cfzo 11540   #chash 12095  Word cword 12213   splice csplice 12218   <"cs2 12460   ~FG cefg 16194
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2419  ax-rep 4398  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  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 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-ot 3881  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-2o 6913  df-oadd 6916  df-er 7093  df-map 7208  df-pm 7209  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-2 10372  df-n0 10572  df-z 10639  df-uz 10854  df-fz 11430  df-fzo 11541  df-hash 12096  df-word 12221  df-concat 12223  df-s1 12224  df-substr 12225  df-splice 12226  df-s2 12467
This theorem is referenced by:  efgredleme  16231
  Copyright terms: Public domain W3C validator