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

Theorem clwwlknonclwlknonf1o 28154
 Description: 𝐹 is a bijection between the two representations of closed walks of a fixed positive length on a fixed vertex. (Contributed by AV, 26-May-2022.) (Proof shortened by AV, 7-Aug-2022.) (Revised by AV, 1-Nov-2022.)
Hypotheses
Ref Expression
clwwlknonclwlknonf1o.v 𝑉 = (Vtx‘𝐺)
clwwlknonclwlknonf1o.w 𝑊 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋)}
clwwlknonclwlknonf1o.f 𝐹 = (𝑐𝑊 ↦ ((2nd𝑐) prefix (♯‘(1st𝑐))))
Assertion
Ref Expression
clwwlknonclwlknonf1o ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → 𝐹:𝑊1-1-onto→(𝑋(ClWWalksNOn‘𝐺)𝑁))
Distinct variable groups:   𝐺,𝑐,𝑤   𝑁,𝑐,𝑤   𝑉,𝑐   𝑊,𝑐   𝑋,𝑐,𝑤
Allowed substitution hints:   𝐹(𝑤,𝑐)   𝑉(𝑤)   𝑊(𝑤)

Proof of Theorem clwwlknonclwlknonf1o
Dummy variable 𝑠 is distinct from all other variables.
StepHypRef Expression
1 clwwlknonclwlknonf1o.w . . 3 𝑊 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋)}
2 eqid 2798 . . 3 {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} = {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁}
3 clwwlknonclwlknonf1o.f . . 3 𝐹 = (𝑐𝑊 ↦ ((2nd𝑐) prefix (♯‘(1st𝑐))))
4 eqid 2798 . . 3 (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ↦ ((2nd𝑐) prefix (♯‘(1st𝑐)))) = (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ↦ ((2nd𝑐) prefix (♯‘(1st𝑐))))
5 eqid 2798 . . . . 5 (1st𝑐) = (1st𝑐)
6 eqid 2798 . . . . 5 (2nd𝑐) = (2nd𝑐)
75, 6, 2, 4clwlknf1oclwwlkn 27876 . . . 4 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ) → (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ↦ ((2nd𝑐) prefix (♯‘(1st𝑐)))):{𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁}–1-1-onto→(𝑁 ClWWalksN 𝐺))
873adant2 1128 . . 3 ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ↦ ((2nd𝑐) prefix (♯‘(1st𝑐)))):{𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁}–1-1-onto→(𝑁 ClWWalksN 𝐺))
9 fveq1 6644 . . . . . . 7 (𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐))) → (𝑠‘0) = (((2nd𝑐) prefix (♯‘(1st𝑐)))‘0))
1093ad2ant3 1132 . . . . . 6 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ∧ 𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐)))) → (𝑠‘0) = (((2nd𝑐) prefix (♯‘(1st𝑐)))‘0))
11 2fveq3 6650 . . . . . . . . . . . 12 (𝑤 = 𝑐 → (♯‘(1st𝑤)) = (♯‘(1st𝑐)))
1211eqeq1d 2800 . . . . . . . . . . 11 (𝑤 = 𝑐 → ((♯‘(1st𝑤)) = 𝑁 ↔ (♯‘(1st𝑐)) = 𝑁))
1312elrab 3628 . . . . . . . . . 10 (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ↔ (𝑐 ∈ (ClWalks‘𝐺) ∧ (♯‘(1st𝑐)) = 𝑁))
14 clwlkwlk 27571 . . . . . . . . . . . 12 (𝑐 ∈ (ClWalks‘𝐺) → 𝑐 ∈ (Walks‘𝐺))
15 wlkcpr 27425 . . . . . . . . . . . . 13 (𝑐 ∈ (Walks‘𝐺) ↔ (1st𝑐)(Walks‘𝐺)(2nd𝑐))
16 eqid 2798 . . . . . . . . . . . . . . . . 17 (Vtx‘𝐺) = (Vtx‘𝐺)
1716wlkpwrd 27414 . . . . . . . . . . . . . . . 16 ((1st𝑐)(Walks‘𝐺)(2nd𝑐) → (2nd𝑐) ∈ Word (Vtx‘𝐺))
18173ad2ant1 1130 . . . . . . . . . . . . . . 15 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → (2nd𝑐) ∈ Word (Vtx‘𝐺))
19 elnnuz 12272 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ ↔ 𝑁 ∈ (ℤ‘1))
20 eluzfz2 12912 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ (ℤ‘1) → 𝑁 ∈ (1...𝑁))
2119, 20sylbi 220 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ → 𝑁 ∈ (1...𝑁))
22 fzelp1 12956 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ (1...𝑁) → 𝑁 ∈ (1...(𝑁 + 1)))
2321, 22syl 17 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ → 𝑁 ∈ (1...(𝑁 + 1)))
24233ad2ant3 1132 . . . . . . . . . . . . . . . . . 18 ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → 𝑁 ∈ (1...(𝑁 + 1)))
25243ad2ant3 1132 . . . . . . . . . . . . . . . . 17 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → 𝑁 ∈ (1...(𝑁 + 1)))
26 id 22 . . . . . . . . . . . . . . . . . . 19 ((♯‘(1st𝑐)) = 𝑁 → (♯‘(1st𝑐)) = 𝑁)
27 oveq1 7142 . . . . . . . . . . . . . . . . . . . 20 ((♯‘(1st𝑐)) = 𝑁 → ((♯‘(1st𝑐)) + 1) = (𝑁 + 1))
2827oveq2d 7151 . . . . . . . . . . . . . . . . . . 19 ((♯‘(1st𝑐)) = 𝑁 → (1...((♯‘(1st𝑐)) + 1)) = (1...(𝑁 + 1)))
2926, 28eleq12d 2884 . . . . . . . . . . . . . . . . . 18 ((♯‘(1st𝑐)) = 𝑁 → ((♯‘(1st𝑐)) ∈ (1...((♯‘(1st𝑐)) + 1)) ↔ 𝑁 ∈ (1...(𝑁 + 1))))
30293ad2ant2 1131 . . . . . . . . . . . . . . . . 17 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → ((♯‘(1st𝑐)) ∈ (1...((♯‘(1st𝑐)) + 1)) ↔ 𝑁 ∈ (1...(𝑁 + 1))))
3125, 30mpbird 260 . . . . . . . . . . . . . . . 16 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → (♯‘(1st𝑐)) ∈ (1...((♯‘(1st𝑐)) + 1)))
32 wlklenvp1 27415 . . . . . . . . . . . . . . . . . . 19 ((1st𝑐)(Walks‘𝐺)(2nd𝑐) → (♯‘(2nd𝑐)) = ((♯‘(1st𝑐)) + 1))
3332oveq2d 7151 . . . . . . . . . . . . . . . . . 18 ((1st𝑐)(Walks‘𝐺)(2nd𝑐) → (1...(♯‘(2nd𝑐))) = (1...((♯‘(1st𝑐)) + 1)))
3433eleq2d 2875 . . . . . . . . . . . . . . . . 17 ((1st𝑐)(Walks‘𝐺)(2nd𝑐) → ((♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐))) ↔ (♯‘(1st𝑐)) ∈ (1...((♯‘(1st𝑐)) + 1))))
35343ad2ant1 1130 . . . . . . . . . . . . . . . 16 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → ((♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐))) ↔ (♯‘(1st𝑐)) ∈ (1...((♯‘(1st𝑐)) + 1))))
3631, 35mpbird 260 . . . . . . . . . . . . . . 15 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐))))
3718, 36jca 515 . . . . . . . . . . . . . 14 (((1st𝑐)(Walks‘𝐺)(2nd𝑐) ∧ (♯‘(1st𝑐)) = 𝑁 ∧ (𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ)) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))))
38373exp 1116 . . . . . . . . . . . . 13 ((1st𝑐)(Walks‘𝐺)(2nd𝑐) → ((♯‘(1st𝑐)) = 𝑁 → ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))))))
3915, 38sylbi 220 . . . . . . . . . . . 12 (𝑐 ∈ (Walks‘𝐺) → ((♯‘(1st𝑐)) = 𝑁 → ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))))))
4014, 39syl 17 . . . . . . . . . . 11 (𝑐 ∈ (ClWalks‘𝐺) → ((♯‘(1st𝑐)) = 𝑁 → ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))))))
4140imp 410 . . . . . . . . . 10 ((𝑐 ∈ (ClWalks‘𝐺) ∧ (♯‘(1st𝑐)) = 𝑁) → ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐))))))
4213, 41sylbi 220 . . . . . . . . 9 (𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} → ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐))))))
4342impcom 411 . . . . . . . 8 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁}) → ((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))))
44 pfxfv0 14047 . . . . . . . 8 (((2nd𝑐) ∈ Word (Vtx‘𝐺) ∧ (♯‘(1st𝑐)) ∈ (1...(♯‘(2nd𝑐)))) → (((2nd𝑐) prefix (♯‘(1st𝑐)))‘0) = ((2nd𝑐)‘0))
4543, 44syl 17 . . . . . . 7 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁}) → (((2nd𝑐) prefix (♯‘(1st𝑐)))‘0) = ((2nd𝑐)‘0))
46453adant3 1129 . . . . . 6 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ∧ 𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐)))) → (((2nd𝑐) prefix (♯‘(1st𝑐)))‘0) = ((2nd𝑐)‘0))
4710, 46eqtrd 2833 . . . . 5 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ∧ 𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐)))) → (𝑠‘0) = ((2nd𝑐)‘0))
4847eqeq1d 2800 . . . 4 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ∧ 𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐)))) → ((𝑠‘0) = 𝑋 ↔ ((2nd𝑐)‘0) = 𝑋))
49 nfv 1915 . . . . 5 𝑤((2nd𝑐)‘0) = 𝑋
50 fveq2 6645 . . . . . . 7 (𝑤 = 𝑐 → (2nd𝑤) = (2nd𝑐))
5150fveq1d 6647 . . . . . 6 (𝑤 = 𝑐 → ((2nd𝑤)‘0) = ((2nd𝑐)‘0))
5251eqeq1d 2800 . . . . 5 (𝑤 = 𝑐 → (((2nd𝑤)‘0) = 𝑋 ↔ ((2nd𝑐)‘0) = 𝑋))
5349, 52sbiev 2322 . . . 4 ([𝑐 / 𝑤]((2nd𝑤)‘0) = 𝑋 ↔ ((2nd𝑐)‘0) = 𝑋)
5448, 53bitr4di 292 . . 3 (((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) ∧ 𝑐 ∈ {𝑤 ∈ (ClWalks‘𝐺) ∣ (♯‘(1st𝑤)) = 𝑁} ∧ 𝑠 = ((2nd𝑐) prefix (♯‘(1st𝑐)))) → ((𝑠‘0) = 𝑋 ↔ [𝑐 / 𝑤]((2nd𝑤)‘0) = 𝑋))
551, 2, 3, 4, 8, 54f1ossf1o 6867 . 2 ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → 𝐹:𝑊1-1-onto→{𝑠 ∈ (𝑁 ClWWalksN 𝐺) ∣ (𝑠‘0) = 𝑋})
56 clwwlknon 27882 . . 3 (𝑋(ClWWalksNOn‘𝐺)𝑁) = {𝑠 ∈ (𝑁 ClWWalksN 𝐺) ∣ (𝑠‘0) = 𝑋}
57 f1oeq3 6581 . . 3 ((𝑋(ClWWalksNOn‘𝐺)𝑁) = {𝑠 ∈ (𝑁 ClWWalksN 𝐺) ∣ (𝑠‘0) = 𝑋} → (𝐹:𝑊1-1-onto→(𝑋(ClWWalksNOn‘𝐺)𝑁) ↔ 𝐹:𝑊1-1-onto→{𝑠 ∈ (𝑁 ClWWalksN 𝐺) ∣ (𝑠‘0) = 𝑋}))
5856, 57ax-mp 5 . 2 (𝐹:𝑊1-1-onto→(𝑋(ClWWalksNOn‘𝐺)𝑁) ↔ 𝐹:𝑊1-1-onto→{𝑠 ∈ (𝑁 ClWWalksN 𝐺) ∣ (𝑠‘0) = 𝑋})
5955, 58sylibr 237 1 ((𝐺 ∈ USPGraph ∧ 𝑋𝑉𝑁 ∈ ℕ) → 𝐹:𝑊1-1-onto→(𝑋(ClWWalksNOn‘𝐺)𝑁))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 209   ∧ wa 399   ∧ w3a 1084   = wceq 1538  [wsb 2069   ∈ wcel 2111  {crab 3110   class class class wbr 5030   ↦ cmpt 5110  –1-1-onto→wf1o 6323  ‘cfv 6324  (class class class)co 7135  1st c1st 7671  2nd c2nd 7672  0cc0 10528  1c1 10529   + caddc 10531  ℕcn 11627  ℤ≥cuz 12233  ...cfz 12887  ♯chash 13688  Word cword 13859   prefix cpfx 14025  Vtxcvtx 26796  USPGraphcuspgr 26948  Walkscwlks 27393  ClWalkscclwlks 27566   ClWWalksN cclwwlkn 27816  ClWWalksNOncclwwlknon 27879 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 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-rep 5154  ax-sep 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295  ax-un 7443  ax-cnex 10584  ax-resscn 10585  ax-1cn 10586  ax-icn 10587  ax-addcl 10588  ax-addrcl 10589  ax-mulcl 10590  ax-mulrcl 10591  ax-mulcom 10592  ax-addass 10593  ax-mulass 10594  ax-distr 10595  ax-i2m1 10596  ax-1ne0 10597  ax-1rid 10598  ax-rnegex 10599  ax-rrecex 10600  ax-cnre 10601  ax-pre-lttri 10602  ax-pre-lttrn 10603  ax-pre-ltadd 10604  ax-pre-mulgt0 10605 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-ifp 1059  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4801  df-int 4839  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-tr 5137  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-pred 6116  df-ord 6162  df-on 6163  df-lim 6164  df-suc 6165  df-iota 6283  df-fun 6326  df-fn 6327  df-f 6328  df-f1 6329  df-fo 6330  df-f1o 6331  df-fv 6332  df-riota 7093  df-ov 7138  df-oprab 7139  df-mpo 7140  df-om 7563  df-1st 7673  df-2nd 7674  df-wrecs 7932  df-recs 7993  df-rdg 8031  df-1o 8087  df-2o 8088  df-oadd 8091  df-er 8274  df-map 8393  df-pm 8394  df-en 8495  df-dom 8496  df-sdom 8497  df-fin 8498  df-dju 9316  df-card 9354  df-pnf 10668  df-mnf 10669  df-xr 10670  df-ltxr 10671  df-le 10672  df-sub 10863  df-neg 10864  df-nn 11628  df-2 11690  df-n0 11888  df-xnn0 11958  df-z 11972  df-uz 12234  df-rp 12380  df-fz 12888  df-fzo 13031  df-hash 13689  df-word 13860  df-lsw 13908  df-concat 13916  df-s1 13943  df-substr 13996  df-pfx 14026  df-edg 26848  df-uhgr 26858  df-upgr 26882  df-uspgr 26950  df-wlks 27396  df-clwlks 27567  df-clwwlk 27774  df-clwwlkn 27817  df-clwwlknon 27880 This theorem is referenced by:  clwwlknonclwlknonen  28155  dlwwlknondlwlknonf1o  28157
 Copyright terms: Public domain W3C validator