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

Theorem ccatopth 11509
Description: An opth 4282-like theorem for recovering the two halves of a concatenated word. (Contributed by Mario Carneiro, 1-Oct-2015.)
Assertion
Ref Expression
ccatopth  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
)  =  ( C concat  D )  <->  ( A  =  C  /\  B  =  D ) ) )

Proof of Theorem ccatopth
StepHypRef Expression
1 oveq1 5907 . . . 4  |-  ( ( A concat  B )  =  ( C concat  D )  ->  ( ( A concat  B ) substr  <. 0 ,  ( # `  A
) >. )  =  ( ( C concat  D ) substr  <. 0 ,  ( # `  A ) >. )
)
2 swrdccat1 11507 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e. Word  X )  ->  ( ( A concat  B
) substr  <. 0 ,  (
# `  A ) >. )  =  A )
323ad2ant1 976 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
) substr  <. 0 ,  (
# `  A ) >. )  =  A )
4 simp3 957 . . . . . . . 8  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( # `  A )  =  ( # `  C
) )
54opeq2d 3840 . . . . . . 7  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  ->  <. 0 ,  ( # `  A ) >.  =  <. 0 ,  ( # `  C
) >. )
65oveq2d 5916 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( C concat  D
) substr  <. 0 ,  (
# `  A ) >. )  =  ( ( C concat  D ) substr  <. 0 ,  ( # `  C
) >. ) )
7 swrdccat1 11507 . . . . . . 7  |-  ( ( C  e. Word  X  /\  D  e. Word  X )  ->  ( ( C concat  D
) substr  <. 0 ,  (
# `  C ) >. )  =  C )
873ad2ant2 977 . . . . . 6  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( C concat  D
) substr  <. 0 ,  (
# `  C ) >. )  =  C )
96, 8eqtrd 2348 . . . . 5  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( C concat  D
) substr  <. 0 ,  (
# `  A ) >. )  =  C )
103, 9eqeq12d 2330 . . . 4  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( ( A concat  B ) substr  <. 0 ,  ( # `  A
) >. )  =  ( ( C concat  D ) substr  <. 0 ,  ( # `  A ) >. )  <->  A  =  C ) )
111, 10syl5ib 210 . . 3  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
)  =  ( C concat  D )  ->  A  =  C ) )
12 simpr 447 . . . . . 6  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( A concat  B
)  =  ( C concat  D ) )
13 simpl3 960 . . . . . . 7  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( # `  A
)  =  ( # `  C ) )
1412fveq2d 5567 . . . . . . . 8  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( # `  ( A concat  B ) )  =  ( # `  ( C concat  D ) ) )
15 simpl1 958 . . . . . . . . 9  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( A  e. Word  X  /\  B  e. Word  X
) )
16 ccatlen 11477 . . . . . . . . 9  |-  ( ( A  e. Word  X  /\  B  e. Word  X )  ->  ( # `  ( A concat  B ) )  =  ( ( # `  A
)  +  ( # `  B ) ) )
1715, 16syl 15 . . . . . . . 8  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( # `  ( A concat  B ) )  =  ( ( # `  A
)  +  ( # `  B ) ) )
18 simpl2 959 . . . . . . . . 9  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( C  e. Word  X  /\  D  e. Word  X
) )
19 ccatlen 11477 . . . . . . . . 9  |-  ( ( C  e. Word  X  /\  D  e. Word  X )  ->  ( # `  ( C concat  D ) )  =  ( ( # `  C
)  +  ( # `  D ) ) )
2018, 19syl 15 . . . . . . . 8  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( # `  ( C concat  D ) )  =  ( ( # `  C
)  +  ( # `  D ) ) )
2114, 17, 203eqtr3d 2356 . . . . . . 7  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( ( # `  A )  +  (
# `  B )
)  =  ( (
# `  C )  +  ( # `  D
) ) )
2213, 21opeq12d 3841 . . . . . 6  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  <. ( # `  A
) ,  ( (
# `  A )  +  ( # `  B
) ) >.  =  <. (
# `  C ) ,  ( ( # `  C )  +  (
# `  D )
) >. )
2312, 22oveq12d 5918 . . . . 5  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( ( A concat  B ) substr  <. ( # `  A ) ,  ( ( # `  A
)  +  ( # `  B ) ) >.
)  =  ( ( C concat  D ) substr  <. (
# `  C ) ,  ( ( # `  C )  +  (
# `  D )
) >. ) )
24 swrdccat2 11508 . . . . . 6  |-  ( ( A  e. Word  X  /\  B  e. Word  X )  ->  ( ( A concat  B
) substr  <. ( # `  A
) ,  ( (
# `  A )  +  ( # `  B
) ) >. )  =  B )
2515, 24syl 15 . . . . 5  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( ( A concat  B ) substr  <. ( # `  A ) ,  ( ( # `  A
)  +  ( # `  B ) ) >.
)  =  B )
26 swrdccat2 11508 . . . . . 6  |-  ( ( C  e. Word  X  /\  D  e. Word  X )  ->  ( ( C concat  D
) substr  <. ( # `  C
) ,  ( (
# `  C )  +  ( # `  D
) ) >. )  =  D )
2718, 26syl 15 . . . . 5  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  ( ( C concat  D ) substr  <. ( # `  C ) ,  ( ( # `  C
)  +  ( # `  D ) ) >.
)  =  D )
2823, 25, 273eqtr3d 2356 . . . 4  |-  ( ( ( ( A  e. Word  X  /\  B  e. Word  X
)  /\  ( C  e. Word  X  /\  D  e. Word  X )  /\  ( # `
 A )  =  ( # `  C
) )  /\  ( A concat  B )  =  ( C concat  D ) )  ->  B  =  D )
2928ex 423 . . 3  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
)  =  ( C concat  D )  ->  B  =  D ) )
3011, 29jcad 519 . 2  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
)  =  ( C concat  D )  ->  ( A  =  C  /\  B  =  D )
) )
31 oveq12 5909 . 2  |-  ( ( A  =  C  /\  B  =  D )  ->  ( A concat  B )  =  ( C concat  D
) )
3230, 31impbid1 194 1  |-  ( ( ( A  e. Word  X  /\  B  e. Word  X )  /\  ( C  e. Word  X  /\  D  e. Word  X
)  /\  ( # `  A
)  =  ( # `  C ) )  -> 
( ( A concat  B
)  =  ( C concat  D )  <->  ( A  =  C  /\  B  =  D ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    /\ w3a 934    = wceq 1633    e. wcel 1701   <.cop 3677   ` cfv 5292  (class class class)co 5900   0cc0 8782    + caddc 8785   #chash 11384  Word cword 11450   concat cconcat 11451   substr csubstr 11453
This theorem is referenced by:  ccatopth2  11510  ccatlcan  11511  splval2  11519  efgredleme  15101  efgredlemc  15103
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1537  ax-5 1548  ax-17 1607  ax-9 1645  ax-8 1666  ax-13 1703  ax-14 1705  ax-6 1720  ax-7 1725  ax-11 1732  ax-12 1897  ax-ext 2297  ax-rep 4168  ax-sep 4178  ax-nul 4186  ax-pow 4225  ax-pr 4251  ax-un 4549  ax-cnex 8838  ax-resscn 8839  ax-1cn 8840  ax-icn 8841  ax-addcl 8842  ax-addrcl 8843  ax-mulcl 8844  ax-mulrcl 8845  ax-mulcom 8846  ax-addass 8847  ax-mulass 8848  ax-distr 8849  ax-i2m1 8850  ax-1ne0 8851  ax-1rid 8852  ax-rnegex 8853  ax-rrecex 8854  ax-cnre 8855  ax-pre-lttri 8856  ax-pre-lttrn 8857  ax-pre-ltadd 8858  ax-pre-mulgt0 8859
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1533  df-nf 1536  df-sb 1640  df-eu 2180  df-mo 2181  df-clab 2303  df-cleq 2309  df-clel 2312  df-nfc 2441  df-ne 2481  df-nel 2482  df-ral 2582  df-rex 2583  df-reu 2584  df-rab 2586  df-v 2824  df-sbc 3026  df-csb 3116  df-dif 3189  df-un 3191  df-in 3193  df-ss 3200  df-pss 3202  df-nul 3490  df-if 3600  df-pw 3661  df-sn 3680  df-pr 3681  df-tp 3682  df-op 3683  df-uni 3865  df-int 3900  df-iun 3944  df-br 4061  df-opab 4115  df-mpt 4116  df-tr 4151  df-eprel 4342  df-id 4346  df-po 4351  df-so 4352  df-fr 4389  df-we 4391  df-ord 4432  df-on 4433  df-lim 4434  df-suc 4435  df-om 4694  df-xp 4732  df-rel 4733  df-cnv 4734  df-co 4735  df-dm 4736  df-rn 4737  df-res 4738  df-ima 4739  df-iota 5256  df-fun 5294  df-fn 5295  df-f 5296  df-f1 5297  df-fo 5298  df-f1o 5299  df-fv 5300  df-ov 5903  df-oprab 5904  df-mpt2 5905  df-1st 6164  df-2nd 6165  df-riota 6346  df-recs 6430  df-rdg 6465  df-1o 6521  df-oadd 6525  df-er 6702  df-en 6907  df-dom 6908  df-sdom 6909  df-fin 6910  df-card 7617  df-pnf 8914  df-mnf 8915  df-xr 8916  df-ltxr 8917  df-le 8918  df-sub 9084  df-neg 9085  df-nn 9792  df-n0 10013  df-z 10072  df-uz 10278  df-fz 10830  df-fzo 10918  df-hash 11385  df-word 11456  df-concat 11457  df-substr 11459
  Copyright terms: Public domain W3C validator