MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  clwwlknclwwlkdif Structured version   Visualization version   GIF version

Theorem clwwlknclwwlkdif 27762
Description: The set 𝐴 of walks of length 𝑁 starting with a fixed vertex 𝑉 and ending not at this vertex is the difference between the set 𝐶 of walks of length 𝑁 starting with this vertex 𝑋 and the set 𝐵 of closed walks of length 𝑁 anchored at this vertex 𝑋. (Contributed by Alexander van der Vekens, 30-Sep-2018.) (Revised by AV, 7-May-2021.) (Revised by AV, 16-Mar-2022.)
Hypotheses
Ref Expression
clwwlknclwwlkdif.a 𝐴 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)}
clwwlknclwwlkdif.b 𝐵 = (𝑋(𝑁 WWalksNOn 𝐺)𝑋)
clwwlknclwwlkdif.c 𝐶 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑋}
Assertion
Ref Expression
clwwlknclwwlkdif 𝐴 = (𝐶𝐵)
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑋
Allowed substitution hints:   𝐴(𝑤)   𝐵(𝑤)   𝐶(𝑤)

Proof of Theorem clwwlknclwwlkdif
StepHypRef Expression
1 clwwlknclwwlkdif.a . 2 𝐴 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)}
2 clwwlknclwwlkdif.c . . . 4 𝐶 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑋}
3 clwwlknclwwlkdif.b . . . . 5 𝐵 = (𝑋(𝑁 WWalksNOn 𝐺)𝑋)
4 eqid 2822 . . . . . 6 (Vtx‘𝐺) = (Vtx‘𝐺)
54iswwlksnon 27637 . . . . 5 (𝑋(𝑁 WWalksNOn 𝐺)𝑋) = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)}
63, 5eqtri 2845 . . . 4 𝐵 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)}
72, 6difeq12i 4072 . . 3 (𝐶𝐵) = ({𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)})
8 difrab 4251 . . 3 ({𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)}) = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋))}
9 annotanannot 833 . . . . 5 (((𝑤‘0) = 𝑋 ∧ ¬ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ ¬ (𝑤𝑁) = 𝑋))
10 df-ne 3012 . . . . . . 7 ((𝑤𝑁) ≠ 𝑋 ↔ ¬ (𝑤𝑁) = 𝑋)
11 wwlknlsw 27631 . . . . . . . 8 (𝑤 ∈ (𝑁 WWalksN 𝐺) → (𝑤𝑁) = (lastS‘𝑤))
1211neeq1d 3070 . . . . . . 7 (𝑤 ∈ (𝑁 WWalksN 𝐺) → ((𝑤𝑁) ≠ 𝑋 ↔ (lastS‘𝑤) ≠ 𝑋))
1310, 12bitr3id 288 . . . . . 6 (𝑤 ∈ (𝑁 WWalksN 𝐺) → (¬ (𝑤𝑁) = 𝑋 ↔ (lastS‘𝑤) ≠ 𝑋))
1413anbi2d 631 . . . . 5 (𝑤 ∈ (𝑁 WWalksN 𝐺) → (((𝑤‘0) = 𝑋 ∧ ¬ (𝑤𝑁) = 𝑋) ↔ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)))
159, 14syl5bb 286 . . . 4 (𝑤 ∈ (𝑁 WWalksN 𝐺) → (((𝑤‘0) = 𝑋 ∧ ¬ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)))
1615rabbiia 3447 . . 3 {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ ((𝑤‘0) = 𝑋 ∧ (𝑤𝑁) = 𝑋))} = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)}
177, 8, 163eqtrri 2850 . 2 {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ((𝑤‘0) = 𝑋 ∧ (lastS‘𝑤) ≠ 𝑋)} = (𝐶𝐵)
181, 17eqtri 2845 1 𝐴 = (𝐶𝐵)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 399   = wceq 1538  wcel 2114  wne 3011  {crab 3134  cdif 3905  cfv 6334  (class class class)co 7140  0cc0 10526  lastSclsw 13905  Vtxcvtx 26787   WWalksN cwwlksn 27610   WWalksNOn cwwlksnon 27611
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2178  ax-ext 2794  ax-rep 5166  ax-sep 5179  ax-nul 5186  ax-pow 5243  ax-pr 5307  ax-un 7446  ax-cnex 10582  ax-resscn 10583  ax-1cn 10584  ax-icn 10585  ax-addcl 10586  ax-addrcl 10587  ax-mulcl 10588  ax-mulrcl 10589  ax-mulcom 10590  ax-addass 10591  ax-mulass 10592  ax-distr 10593  ax-i2m1 10594  ax-1ne0 10595  ax-1rid 10596  ax-rnegex 10597  ax-rrecex 10598  ax-cnre 10599  ax-pre-lttri 10600  ax-pre-lttrn 10601  ax-pre-ltadd 10602  ax-pre-mulgt0 10603
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2622  df-eu 2653  df-clab 2801  df-cleq 2815  df-clel 2894  df-nfc 2962  df-ne 3012  df-nel 3116  df-ral 3135  df-rex 3136  df-reu 3137  df-rab 3139  df-v 3471  df-sbc 3748  df-csb 3856  df-dif 3911  df-un 3913  df-in 3915  df-ss 3925  df-pss 3927  df-nul 4266  df-if 4440  df-pw 4513  df-sn 4540  df-pr 4542  df-tp 4544  df-op 4546  df-uni 4814  df-int 4852  df-iun 4896  df-br 5043  df-opab 5105  df-mpt 5123  df-tr 5149  df-id 5437  df-eprel 5442  df-po 5451  df-so 5452  df-fr 5491  df-we 5493  df-xp 5538  df-rel 5539  df-cnv 5540  df-co 5541  df-dm 5542  df-rn 5543  df-res 5544  df-ima 5545  df-pred 6126  df-ord 6172  df-on 6173  df-lim 6174  df-suc 6175  df-iota 6293  df-fun 6336  df-fn 6337  df-f 6338  df-f1 6339  df-fo 6340  df-f1o 6341  df-fv 6342  df-riota 7098  df-ov 7143  df-oprab 7144  df-mpo 7145  df-om 7566  df-1st 7675  df-2nd 7676  df-wrecs 7934  df-recs 7995  df-rdg 8033  df-1o 8089  df-er 8276  df-map 8395  df-en 8497  df-dom 8498  df-sdom 8499  df-fin 8500  df-card 9356  df-pnf 10666  df-mnf 10667  df-xr 10668  df-ltxr 10669  df-le 10670  df-sub 10861  df-neg 10862  df-nn 11626  df-n0 11886  df-z 11970  df-uz 12232  df-fz 12886  df-fzo 13029  df-hash 13687  df-word 13858  df-lsw 13906  df-wwlks 27614  df-wwlksn 27615  df-wwlksnon 27616
This theorem is referenced by:  clwwlknclwwlkdifnum  27763
  Copyright terms: Public domain W3C validator