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

Theorem clwlknclwlkdifs 26253
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 𝐴 = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)}
clwlknclwlkdif.b 𝐵 = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)}
Assertion
Ref Expression
clwlknclwlkdifs 𝐴 = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵)

Proof of Theorem clwlknclwlkdifs
StepHypRef Expression
1 clwlknclwlkdif.a . 2 𝐴 = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)}
2 clwlknclwlkdif.b . . . 4 𝐵 = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)}
32difeq2i 3686 . . 3 ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵) = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)})
4 difrab 3859 . . 3 ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)}) = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))}
5 ianor 507 . . . . . . . 8 (¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋) ↔ (¬ ( lastS ‘𝑤) = (𝑤‘0) ∨ ¬ (𝑤‘0) = 𝑋))
6 eqeq2 2620 . . . . . . . . . . . 12 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) = (𝑤‘0) ↔ ( lastS ‘𝑤) = 𝑋))
76notbid 306 . . . . . . . . . . 11 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = (𝑤‘0) ↔ ¬ ( lastS ‘𝑤) = 𝑋))
8 df-ne 2781 . . . . . . . . . . . . . 14 (( lastS ‘𝑤) ≠ 𝑋 ↔ ¬ ( lastS ‘𝑤) = 𝑋)
98biimpri 216 . . . . . . . . . . . . 13 (¬ ( lastS ‘𝑤) = 𝑋 → ( lastS ‘𝑤) ≠ 𝑋)
109anim2i 590 . . . . . . . . . . . 12 (((𝑤‘0) = 𝑋 ∧ ¬ ( lastS ‘𝑤) = 𝑋) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
1110ex 448 . . . . . . . . . . 11 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
127, 11sylbid 228 . . . . . . . . . 10 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = (𝑤‘0) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1312com12 32 . . . . . . . . 9 (¬ ( lastS ‘𝑤) = (𝑤‘0) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
14 pm2.21 118 . . . . . . . . 9 (¬ (𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1513, 14jaoi 392 . . . . . . . 8 ((¬ ( lastS ‘𝑤) = (𝑤‘0) ∨ ¬ (𝑤‘0) = 𝑋) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
165, 15sylbi 205 . . . . . . 7 (¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1716impcom 444 . . . . . 6 (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
18 simpl 471 . . . . . . 7 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → (𝑤‘0) = 𝑋)
19 neeq2 2844 . . . . . . . . . . 11 (𝑋 = (𝑤‘0) → (( lastS ‘𝑤) ≠ 𝑋 ↔ ( lastS ‘𝑤) ≠ (𝑤‘0)))
2019eqcoms 2617 . . . . . . . . . 10 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) ≠ 𝑋 ↔ ( lastS ‘𝑤) ≠ (𝑤‘0)))
21 df-ne 2781 . . . . . . . . . . 11 (( lastS ‘𝑤) ≠ (𝑤‘0) ↔ ¬ ( lastS ‘𝑤) = (𝑤‘0))
2221biimpi 204 . . . . . . . . . 10 (( lastS ‘𝑤) ≠ (𝑤‘0) → ¬ ( lastS ‘𝑤) = (𝑤‘0))
2320, 22syl6bi 241 . . . . . . . . 9 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) ≠ 𝑋 → ¬ ( lastS ‘𝑤) = (𝑤‘0)))
2423imp 443 . . . . . . . 8 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ¬ ( lastS ‘𝑤) = (𝑤‘0))
2524intnanrd 953 . . . . . . 7 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))
2618, 25jca 552 . . . . . 6 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)))
2717, 26impbii 197 . . . . 5 (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
2827a1i 11 . . . 4 (𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
2928rabbiia 3160 . . 3 {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))} = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)}
303, 4, 293eqtrri 2636 . 2 {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)} = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵)
311, 30eqtri 2631 1 𝐴 = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 194  wo 381  wa 382   = wceq 1474  wcel 1976  wne 2779  {crab 2899  cdif 3536  cfv 5790  (class class class)co 6527  0cc0 9792   lastS clsw 13093   WWalksN cwwlkn 25972
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-10 2005  ax-11 2020  ax-12 2032  ax-13 2232  ax-ext 2589
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-ral 2900  df-rab 2904  df-v 3174  df-dif 3542
This theorem is referenced by:  clwlknclwlkdifnum  26254
  Copyright terms: Public domain W3C validator