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

Theorem clwlknclwlkdifs 26487
 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 3687 . . 3 ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵) = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)})
4 difrab 3860 . . 3 ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)}) = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))}
5 ianor 508 . . . . . . . 8 (¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋) ↔ (¬ ( lastS ‘𝑤) = (𝑤‘0) ∨ ¬ (𝑤‘0) = 𝑋))
6 eqeq2 2621 . . . . . . . . . . . 12 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) = (𝑤‘0) ↔ ( lastS ‘𝑤) = 𝑋))
76notbid 307 . . . . . . . . . . 11 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = (𝑤‘0) ↔ ¬ ( lastS ‘𝑤) = 𝑋))
8 df-ne 2782 . . . . . . . . . . . . . 14 (( lastS ‘𝑤) ≠ 𝑋 ↔ ¬ ( lastS ‘𝑤) = 𝑋)
98biimpri 217 . . . . . . . . . . . . 13 (¬ ( lastS ‘𝑤) = 𝑋 → ( lastS ‘𝑤) ≠ 𝑋)
109anim2i 591 . . . . . . . . . . . 12 (((𝑤‘0) = 𝑋 ∧ ¬ ( lastS ‘𝑤) = 𝑋) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
1110ex 449 . . . . . . . . . . 11 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
127, 11sylbid 229 . . . . . . . . . 10 ((𝑤‘0) = 𝑋 → (¬ ( lastS ‘𝑤) = (𝑤‘0) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1312com12 32 . . . . . . . . 9 (¬ ( lastS ‘𝑤) = (𝑤‘0) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
14 pm2.21 119 . . . . . . . . 9 (¬ (𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1513, 14jaoi 393 . . . . . . . 8 ((¬ ( lastS ‘𝑤) = (𝑤‘0) ∨ ¬ (𝑤‘0) = 𝑋) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
165, 15sylbi 206 . . . . . . 7 (¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋) → ((𝑤‘0) = 𝑋 → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
1716impcom 445 . . . . . 6 (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) → ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
18 simpl 472 . . . . . . 7 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → (𝑤‘0) = 𝑋)
19 neeq2 2845 . . . . . . . . . . 11 (𝑋 = (𝑤‘0) → (( lastS ‘𝑤) ≠ 𝑋 ↔ ( lastS ‘𝑤) ≠ (𝑤‘0)))
2019eqcoms 2618 . . . . . . . . . 10 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) ≠ 𝑋 ↔ ( lastS ‘𝑤) ≠ (𝑤‘0)))
21 df-ne 2782 . . . . . . . . . . 11 (( lastS ‘𝑤) ≠ (𝑤‘0) ↔ ¬ ( lastS ‘𝑤) = (𝑤‘0))
2221biimpi 205 . . . . . . . . . 10 (( lastS ‘𝑤) ≠ (𝑤‘0) → ¬ ( lastS ‘𝑤) = (𝑤‘0))
2320, 22syl6bi 242 . . . . . . . . 9 ((𝑤‘0) = 𝑋 → (( lastS ‘𝑤) ≠ 𝑋 → ¬ ( lastS ‘𝑤) = (𝑤‘0)))
2423imp 444 . . . . . . . 8 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ¬ ( lastS ‘𝑤) = (𝑤‘0))
2524intnanrd 954 . . . . . . 7 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))
2618, 25jca 553 . . . . . 6 (((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋) → ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)))
2717, 26impbii 198 . . . . 5 (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋))
2827a1i 11 . . . 4 (𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → (((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋)) ↔ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)))
2928rabbiia 3161 . . 3 {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ¬ (( lastS ‘𝑤) = (𝑤‘0) ∧ (𝑤‘0) = 𝑋))} = {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)}
303, 4, 293eqtrri 2637 . 2 {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ ((𝑤‘0) = 𝑋 ∧ ( lastS ‘𝑤) ≠ 𝑋)} = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵)
311, 30eqtri 2632 1 𝐴 = ({𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∣ (𝑤‘0) = 𝑋} ∖ 𝐵)
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ↔ wb 195   ∨ wo 382   ∧ wa 383   = wceq 1475   ∈ wcel 1977   ≠ wne 2780  {crab 2900   ∖ cdif 3537  ‘cfv 5804  (class class class)co 6549  0cc0 9815   lastS clsw 13147   WWalksN cwwlkn 26206 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-ral 2901  df-rab 2905  df-v 3175  df-dif 3543 This theorem is referenced by:  clwlknclwlkdifnum  26488
 Copyright terms: Public domain W3C validator