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

Theorem clwlknclwlkdifs 25364
Description: The set of walks of length n starting with a fixed vertex and ending not at this vertex is the difference between the set of walks of length n starting with this vertex and the set of walks of length n starting with this vertex and ending at this vertex. (Contributed by Alexander van der Vekens, 30-Sep-2018.)
Hypotheses
Ref Expression
clwlknclwlkdif.a  |-  A  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X ) }
clwlknclwlkdif.b  |-  B  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( ( lastS  `  w )  =  ( w ` 
0 )  /\  (
w `  0 )  =  X ) }
Assertion
Ref Expression
clwlknclwlkdifs  |-  A  =  ( { w  e.  ( ( V WWalksN  E
) `  N )  |  ( w ` 
0 )  =  X }  \  B )

Proof of Theorem clwlknclwlkdifs
StepHypRef Expression
1 clwlknclwlkdif.a . 2  |-  A  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X ) }
2 clwlknclwlkdif.b . . . 4  |-  B  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( ( lastS  `  w )  =  ( w ` 
0 )  /\  (
w `  0 )  =  X ) }
32difeq2i 3557 . . 3  |-  ( { w  e.  ( ( V WWalksN  E ) `  N
)  |  ( w `
 0 )  =  X }  \  B
)  =  ( { w  e.  ( ( V WWalksN  E ) `  N
)  |  ( w `
 0 )  =  X }  \  {
w  e.  ( ( V WWalksN  E ) `  N
)  |  ( ( lastS  `  w )  =  ( w `  0 )  /\  ( w ` 
0 )  =  X ) } )
4 difrab 3723 . . 3  |-  ( { w  e.  ( ( V WWalksN  E ) `  N
)  |  ( w `
 0 )  =  X }  \  {
w  e.  ( ( V WWalksN  E ) `  N
)  |  ( ( lastS  `  w )  =  ( w `  0 )  /\  ( w ` 
0 )  =  X ) } )  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( ( w `  0
)  =  X  /\  -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X ) ) }
5 ianor 486 . . . . . . . 8  |-  ( -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X )  <-> 
( -.  ( lastS  `  w
)  =  ( w `
 0 )  \/ 
-.  ( w ` 
0 )  =  X ) )
6 eqeq2 2417 . . . . . . . . . . . 12  |-  ( ( w `  0 )  =  X  ->  (
( lastS  `  w )  =  ( w `  0
)  <->  ( lastS  `  w )  =  X ) )
76notbid 292 . . . . . . . . . . 11  |-  ( ( w `  0 )  =  X  ->  ( -.  ( lastS  `  w )  =  ( w ` 
0 )  <->  -.  ( lastS  `  w )  =  X ) )
8 df-ne 2600 . . . . . . . . . . . . . 14  |-  ( ( lastS  `  w )  =/=  X  <->  -.  ( lastS  `  w )  =  X )
98biimpri 206 . . . . . . . . . . . . 13  |-  ( -.  ( lastS  `  w )  =  X  ->  ( lastS  `  w
)  =/=  X )
109anim2i 567 . . . . . . . . . . . 12  |-  ( ( ( w `  0
)  =  X  /\  -.  ( lastS  `  w )  =  X )  -> 
( ( w ` 
0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) )
1110ex 432 . . . . . . . . . . 11  |-  ( ( w `  0 )  =  X  ->  ( -.  ( lastS  `  w )  =  X  ->  (
( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X ) ) )
127, 11sylbid 215 . . . . . . . . . 10  |-  ( ( w `  0 )  =  X  ->  ( -.  ( lastS  `  w )  =  ( w ` 
0 )  ->  (
( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X ) ) )
1312com12 29 . . . . . . . . 9  |-  ( -.  ( lastS  `  w )  =  ( w ` 
0 )  ->  (
( w `  0
)  =  X  -> 
( ( w ` 
0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) ) )
14 pm2.21 108 . . . . . . . . 9  |-  ( -.  ( w `  0
)  =  X  -> 
( ( w ` 
0 )  =  X  ->  ( ( w `
 0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) ) )
1513, 14jaoi 377 . . . . . . . 8  |-  ( ( -.  ( lastS  `  w
)  =  ( w `
 0 )  \/ 
-.  ( w ` 
0 )  =  X )  ->  ( (
w `  0 )  =  X  ->  ( ( w `  0 )  =  X  /\  ( lastS  `  w )  =/=  X
) ) )
165, 15sylbi 195 . . . . . . 7  |-  ( -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X )  ->  ( ( w `
 0 )  =  X  ->  ( (
w `  0 )  =  X  /\  ( lastS  `  w )  =/=  X
) ) )
1716impcom 428 . . . . . 6  |-  ( ( ( w `  0
)  =  X  /\  -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X ) )  ->  ( (
w `  0 )  =  X  /\  ( lastS  `  w )  =/=  X
) )
18 simpl 455 . . . . . . 7  |-  ( ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X )  ->  (
w `  0 )  =  X )
19 neeq2 2686 . . . . . . . . . . 11  |-  ( X  =  ( w ` 
0 )  ->  (
( lastS  `  w )  =/= 
X  <->  ( lastS  `  w )  =/=  ( w ` 
0 ) ) )
2019eqcoms 2414 . . . . . . . . . 10  |-  ( ( w `  0 )  =  X  ->  (
( lastS  `  w )  =/= 
X  <->  ( lastS  `  w )  =/=  ( w ` 
0 ) ) )
21 df-ne 2600 . . . . . . . . . . 11  |-  ( ( lastS  `  w )  =/=  (
w `  0 )  <->  -.  ( lastS  `  w )  =  ( w ` 
0 ) )
2221biimpi 194 . . . . . . . . . 10  |-  ( ( lastS  `  w )  =/=  (
w `  0 )  ->  -.  ( lastS  `  w
)  =  ( w `
 0 ) )
2320, 22syl6bi 228 . . . . . . . . 9  |-  ( ( w `  0 )  =  X  ->  (
( lastS  `  w )  =/= 
X  ->  -.  ( lastS  `  w )  =  ( w `  0 ) ) )
2423imp 427 . . . . . . . 8  |-  ( ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X )  ->  -.  ( lastS  `  w )  =  ( w `  0
) )
2524intnanrd 918 . . . . . . 7  |-  ( ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X )  ->  -.  ( ( lastS  `  w )  =  ( w ` 
0 )  /\  (
w `  0 )  =  X ) )
2618, 25jca 530 . . . . . 6  |-  ( ( ( w `  0
)  =  X  /\  ( lastS  `  w )  =/= 
X )  ->  (
( w `  0
)  =  X  /\  -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X ) ) )
2717, 26impbii 188 . . . . 5  |-  ( ( ( w `  0
)  =  X  /\  -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X ) )  <->  ( ( w `
 0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) )
2827a1i 11 . . . 4  |-  ( w  e.  ( ( V WWalksN  E ) `  N
)  ->  ( (
( w `  0
)  =  X  /\  -.  ( ( lastS  `  w
)  =  ( w `
 0 )  /\  ( w `  0
)  =  X ) )  <->  ( ( w `
 0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) ) )
2928rabbiia 3047 . . 3  |-  { w  e.  ( ( V WWalksN  E
) `  N )  |  ( ( w `
 0 )  =  X  /\  -.  (
( lastS  `  w )  =  ( w `  0
)  /\  ( w `  0 )  =  X ) ) }  =  { w  e.  ( ( V WWalksN  E
) `  N )  |  ( ( w `
 0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) }
303, 4, 293eqtrri 2436 . 2  |-  { w  e.  ( ( V WWalksN  E
) `  N )  |  ( ( w `
 0 )  =  X  /\  ( lastS  `  w
)  =/=  X ) }  =  ( { w  e.  ( ( V WWalksN  E ) `  N
)  |  ( w `
 0 )  =  X }  \  B
)
311, 30eqtri 2431 1  |-  A  =  ( { w  e.  ( ( V WWalksN  E
) `  N )  |  ( w ` 
0 )  =  X }  \  B )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 366    /\ wa 367    = wceq 1405    e. wcel 1842    =/= wne 2598   {crab 2757    \ cdif 3410   ` cfv 5568  (class class class)co 6277   0cc0 9521   lastS clsw 12582   WWalksN cwwlkn 25082
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-tru 1408  df-ex 1634  df-nf 1638  df-sb 1764  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-ral 2758  df-rab 2762  df-v 3060  df-dif 3416
This theorem is referenced by:  clwlknclwlkdifnum  25365
  Copyright terms: Public domain W3C validator