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

Theorem clwlkfclwwlk 26371
 Description: There is a function between the set of closed walks (defined as words) of length n and the set of closed walks of length n (in an undirected simple graph). (Contributed by Alexander van der Vekens, 25-Jun-2018.)
Hypotheses
Ref Expression
clwlkfclwwlk.1 𝐴 = (1st𝑐)
clwlkfclwwlk.2 𝐵 = (2nd𝑐)
clwlkfclwwlk.c 𝐶 = {𝑐 ∈ (𝑉 ClWalks 𝐸) ∣ (#‘𝐴) = 𝑁}
clwlkfclwwlk.f 𝐹 = (𝑐𝐶 ↦ (𝐵 substr ⟨0, (#‘𝐴)⟩))
Assertion
Ref Expression
clwlkfclwwlk ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶⟶((𝑉 ClWWalksN 𝐸)‘𝑁))
Distinct variable groups:   𝐸,𝑐   𝑁,𝑐   𝑉,𝑐   𝐶,𝑐
Allowed substitution hints:   𝐴(𝑐)   𝐵(𝑐)   𝐹(𝑐)

Proof of Theorem clwlkfclwwlk
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 clwlkfclwwlk.c . . . . . 6 𝐶 = {𝑐 ∈ (𝑉 ClWalks 𝐸) ∣ (#‘𝐴) = 𝑁}
21rabeq2i 3170 . . . . 5 (𝑐𝐶 ↔ (𝑐 ∈ (𝑉 ClWalks 𝐸) ∧ (#‘𝐴) = 𝑁))
3 clwlkfclwwlk.1 . . . . . . . 8 𝐴 = (1st𝑐)
4 clwlkfclwwlk.2 . . . . . . . 8 𝐵 = (2nd𝑐)
53, 4clwlkcompim 26292 . . . . . . 7 (𝑐 ∈ (𝑉 ClWalks 𝐸) → ((𝐴 ∈ Word dom 𝐸𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))))
6 lencl 13179 . . . . . . . . 9 (𝐴 ∈ Word dom 𝐸 → (#‘𝐴) ∈ ℕ0)
7 clwlkfclwwlk.f . . . . . . . . . . . . . . . . . 18 𝐹 = (𝑐𝐶 ↦ (𝐵 substr ⟨0, (#‘𝐴)⟩))
83, 4, 1, 7clwlkfclwwlk2wrd 26367 . . . . . . . . . . . . . . . . 17 (𝑐𝐶𝐵 ∈ Word 𝑉)
98ad2antlr 759 . . . . . . . . . . . . . . . 16 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 𝐵 ∈ Word 𝑉)
10 swrdcl 13271 . . . . . . . . . . . . . . . 16 (𝐵 ∈ Word 𝑉 → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉)
119, 10syl 17 . . . . . . . . . . . . . . 15 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉)
12 simp-5r 805 . . . . . . . . . . . . . . . . . . 19 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 𝐴 ∈ Word dom 𝐸)
13 simp1 1054 . . . . . . . . . . . . . . . . . . 19 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → 𝑉 USGrph 𝐸)
1412, 13anim12ci 589 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 USGrph 𝐸𝐴 ∈ Word dom 𝐸))
15 simp-5r 805 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 𝐵:(0...(#‘𝐴))⟶𝑉)
16 prmuz2 15246 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℙ → 𝑁 ∈ (ℤ‘2))
17 ffz0hash 13088 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ ℕ0𝐵:(0...(#‘𝐴))⟶𝑉) → (#‘𝐵) = ((#‘𝐴) + 1))
1817adantlr 747 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) → (#‘𝐵) = ((#‘𝐴) + 1))
19 eluz2 11569 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((#‘𝐴) ∈ (ℤ‘2) ↔ (2 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)))
20 2re 10967 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2 ∈ ℝ
2120a1i 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → 2 ∈ ℝ)
22 zre 11258 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ ℝ)
23 peano2re 10088 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((#‘𝐴) ∈ ℝ → ((#‘𝐴) + 1) ∈ ℝ)
2422, 23syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) + 1) ∈ ℝ)
2521, 22, 243jca 1235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ))
2625adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → (2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ))
27 simpr 476 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ (#‘𝐴))
2822lep1d 10834 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ≤ ((#‘𝐴) + 1))
2928adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → (#‘𝐴) ≤ ((#‘𝐴) + 1))
30 letr 10010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ) → ((2 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ ((#‘𝐴) + 1)) → 2 ≤ ((#‘𝐴) + 1)))
3130imp 444 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ) ∧ (2 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ ((#‘𝐴) + 1))) → 2 ≤ ((#‘𝐴) + 1))
3226, 27, 29, 31syl12anc 1316 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ ((#‘𝐴) + 1))
33323adant1 1072 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((2 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ ((#‘𝐴) + 1))
3419, 33sylbi 206 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ (ℤ‘2) → 2 ≤ ((#‘𝐴) + 1))
3534a1i 11 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → ((#‘𝐴) ∈ (ℤ‘2) → 2 ≤ ((#‘𝐴) + 1)))
36 eleq1 2676 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑁 = (#‘𝐴) → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
3736eqcoms 2618 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
3837adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
39 breq2 4587 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐵) = ((#‘𝐴) + 1) → (2 ≤ (#‘𝐵) ↔ 2 ≤ ((#‘𝐴) + 1)))
4039adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (2 ≤ (#‘𝐵) ↔ 2 ≤ ((#‘𝐴) + 1)))
4135, 38, 403imtr4d 282 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4241ex 449 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((#‘𝐵) = ((#‘𝐴) + 1) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4318, 42syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4443adantr 480 . . . . . . . . . . . . . . . . . . . . . . 23 (((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4544imp 444 . . . . . . . . . . . . . . . . . . . . . 22 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4645adantr 480 . . . . . . . . . . . . . . . . . . . . 21 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4716, 46syl5com 31 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℙ → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 2 ≤ (#‘𝐵)))
48473ad2ant3 1077 . . . . . . . . . . . . . . . . . . 19 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 2 ≤ (#‘𝐵)))
4948impcom 445 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 2 ≤ (#‘𝐵))
50 simp-4r 803 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))))
51 clwlkisclwwlklem1 26315 . . . . . . . . . . . . . . . . . 18 (((𝑉 USGrph 𝐸𝐴 ∈ Word dom 𝐸) ∧ (𝐵:(0...(#‘𝐴))⟶𝑉 ∧ 2 ≤ (#‘𝐵)) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸))
5214, 15, 49, 50, 51syl121anc 1323 . . . . . . . . . . . . . . . . 17 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸))
533, 4, 1, 7clwlkfclwwlk1hash 26369 . . . . . . . . . . . . . . . . . . . . . . . 24 (𝑐𝐶 → (#‘𝐴) ∈ (0...(#‘𝐵)))
54 simp2 1055 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝐵 ∈ Word 𝑉)
55 simp1 1054 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (#‘𝐴) ∈ (0...(#‘𝐵)))
56 elfzelz 12213 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (#‘𝐴) ∈ ℤ)
57 peano2zm 11297 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) − 1) ∈ ℤ)
58 id 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ ℤ)
5922lem1d 10836 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) − 1) ≤ (#‘𝐴))
60 eluz2 11569 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)) ↔ (((#‘𝐴) − 1) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ ((#‘𝐴) − 1) ≤ (#‘𝐴)))
6157, 58, 59, 60syl3anbrc 1239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)))
62 fzoss2 12365 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)) → (0..^((#‘𝐴) − 1)) ⊆ (0..^(#‘𝐴)))
6356, 61, 623syl 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (0..^((#‘𝐴) − 1)) ⊆ (0..^(#‘𝐴)))
6463sselda 3568 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝑖 ∈ (0..^(#‘𝐴)))
65643adant2 1073 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝑖 ∈ (0..^(#‘𝐴)))
66 swrd0fv 13291 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^(#‘𝐴))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖) = (𝐵𝑖))
6754, 55, 65, 66syl3anc 1318 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖) = (𝐵𝑖))
6867eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝐵𝑖) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖))
69 elfzom1elp1fzo 12402 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (((#‘𝐴) ∈ ℤ ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
7056, 69sylan 487 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
71703adant2 1073 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
72 swrd0fv 13291 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (𝑖 + 1) ∈ (0..^(#‘𝐴))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)) = (𝐵‘(𝑖 + 1)))
7372eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (𝑖 + 1) ∈ (0..^(#‘𝐴))) → (𝐵‘(𝑖 + 1)) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)))
7454, 55, 71, 73syl3anc 1318 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝐵‘(𝑖 + 1)) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)))
7568, 74preq12d 4220 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})
76753exp 1256 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (𝐵 ∈ Word 𝑉 → (𝑖 ∈ (0..^((#‘𝐴) − 1)) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})))
7753, 8, 76sylc 63 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑐𝐶 → (𝑖 ∈ (0..^((#‘𝐴) − 1)) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))}))
7877imp 444 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑐𝐶𝑖 ∈ (0..^((#‘𝐴) − 1))) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})
7978eleq1d 2672 . . . . . . . . . . . . . . . . . . . . 21 ((𝑐𝐶𝑖 ∈ (0..^((#‘𝐴) − 1))) → ({(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
8079ralbidva 2968 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐶 → (∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
8180ad2antlr 759 . . . . . . . . . . . . . . . . . . 19 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
823, 4, 1, 7clwlkfclwwlk2sswd 26370 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑐𝐶 → (#‘𝐴) = (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)))
8382oveq1d 6564 . . . . . . . . . . . . . . . . . . . . . 22 (𝑐𝐶 → ((#‘𝐴) − 1) = ((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1))
8483ad2antlr 759 . . . . . . . . . . . . . . . . . . . . 21 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((#‘𝐴) − 1) = ((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1))
8584oveq2d 6565 . . . . . . . . . . . . . . . . . . . 20 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (0..^((#‘𝐴) − 1)) = (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)))
8685raleqdv 3121 . . . . . . . . . . . . . . . . . . 19 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^((#‘𝐴) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
8781, 86bitrd 267 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
88 eleq1 2676 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝑁 = (#‘𝐴) → (𝑁 ∈ ℙ ↔ (#‘𝐴) ∈ ℙ))
8988biimpd 218 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑁 = (#‘𝐴) → (𝑁 ∈ ℙ → (#‘𝐴) ∈ ℙ))
9089eqcoms 2618 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((#‘𝐴) = 𝑁 → (𝑁 ∈ ℙ → (#‘𝐴) ∈ ℙ))
91 prmnn 15226 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((#‘𝐴) ∈ ℙ → (#‘𝐴) ∈ ℕ)
92 elfz2nn0 12300 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ (0...(#‘𝐵)) ↔ ((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)))
93 1zzd 11285 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → 1 ∈ ℤ)
94 nn0z 11277 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((#‘𝐵) ∈ ℕ0 → (#‘𝐵) ∈ ℤ)
9594adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (#‘𝐵) ∈ ℤ)
96 nn0z 11277 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((#‘𝐴) ∈ ℕ0 → (#‘𝐴) ∈ ℤ)
9796adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (#‘𝐴) ∈ ℤ)
9893, 95, 973jca 1235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
99983adant3 1074 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
10099adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
101 simp3 1056 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) → (#‘𝐴) ≤ (#‘𝐵))
102 nnge1 10923 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((#‘𝐴) ∈ ℕ → 1 ≤ (#‘𝐴))
103101, 102anim12ci 589 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵)))
104100, 103jca 553 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
10592, 104sylanb 488 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
106 elfz2 12204 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ (1...(#‘𝐵)) ↔ ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
107105, 106sylibr 223 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (#‘𝐴) ∈ (1...(#‘𝐵)))
108 swrd0fvlsw 13295 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → ( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = (𝐵‘((#‘𝐴) − 1)))
109108eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → (𝐵‘((#‘𝐴) − 1)) = ( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)))
110 swrd0fv0 13292 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0) = (𝐵‘0))
111110eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → (𝐵‘0) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0))
112109, 111preq12d 4220 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})
113112expcom 450 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ (1...(#‘𝐵)) → (𝐵 ∈ Word 𝑉 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
114107, 113syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (𝐵 ∈ Word 𝑉 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
115114ex 449 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((#‘𝐴) ∈ (0...(#‘𝐵)) → ((#‘𝐴) ∈ ℕ → (𝐵 ∈ Word 𝑉 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
116115com23 84 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (𝐵 ∈ Word 𝑉 → ((#‘𝐴) ∈ ℕ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
11753, 8, 116sylc 63 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑐𝐶 → ((#‘𝐴) ∈ ℕ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
11891, 117syl5com 31 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((#‘𝐴) ∈ ℙ → (𝑐𝐶 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
11990, 118syl6 34 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((#‘𝐴) = 𝑁 → (𝑁 ∈ ℙ → (𝑐𝐶 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
120119com23 84 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝐴) = 𝑁 → (𝑐𝐶 → (𝑁 ∈ ℙ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
121120adantl 481 . . . . . . . . . . . . . . . . . . . . . . 23 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → (𝑁 ∈ ℙ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
122121imp 444 . . . . . . . . . . . . . . . . . . . . . 22 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → (𝑁 ∈ ℙ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
123122com12 32 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℙ → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
1241233ad2ant3 1077 . . . . . . . . . . . . . . . . . . . 20 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
125124impcom 445 . . . . . . . . . . . . . . . . . . 19 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})
126125eleq1d 2672 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ({(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸 ↔ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
12787, 1263anbi23d 1394 . . . . . . . . . . . . . . . . 17 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸) ↔ (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸)))
12852, 127mpbid 221 . . . . . . . . . . . . . . . 16 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
129 3simpc 1053 . . . . . . . . . . . . . . . 16 ((( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸) → (∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
130128, 129syl 17 . . . . . . . . . . . . . . 15 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
131 3anass 1035 . . . . . . . . . . . . . . 15 (((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸) ↔ ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉 ∧ (∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸)))
13211, 130, 131sylanbrc 695 . . . . . . . . . . . . . 14 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
133 usgrav 25867 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸 → (𝑉 ∈ V ∧ 𝐸 ∈ V))
1341333ad2ant1 1075 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V))
135134adantl 481 . . . . . . . . . . . . . . 15 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 ∈ V ∧ 𝐸 ∈ V))
136 isclwwlk 26296 . . . . . . . . . . . . . . 15 ((𝑉 ∈ V ∧ 𝐸 ∈ V) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ↔ ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸)))
137135, 136syl 17 . . . . . . . . . . . . . 14 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ↔ ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸)))
138132, 137mpbird 246 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸))
13982eqeq1d 2612 . . . . . . . . . . . . . . . . 17 (𝑐𝐶 → ((#‘𝐴) = 𝑁 ↔ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
140139biimpcd 238 . . . . . . . . . . . . . . . 16 ((#‘𝐴) = 𝑁 → (𝑐𝐶 → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
141140adantl 481 . . . . . . . . . . . . . . 15 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
142141imp 444 . . . . . . . . . . . . . 14 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)
143142adantr 480 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)
144138, 143jca 553 . . . . . . . . . . . 12 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
145133simpld 474 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸𝑉 ∈ V)
146145adantr 480 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝑉 ∈ V)
147133simprd 478 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸𝐸 ∈ V)
148147adantr 480 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝐸 ∈ V)
149 prmnn 15226 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℙ → 𝑁 ∈ ℕ)
150149nnnn0d 11228 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℙ → 𝑁 ∈ ℕ0)
151150adantl 481 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝑁 ∈ ℕ0)
152146, 148, 1513jca 1235 . . . . . . . . . . . . . . 15 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
1531523adant2 1073 . . . . . . . . . . . . . 14 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
154153adantl 481 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
155 isclwwlkn 26297 . . . . . . . . . . . . 13 ((𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁) ↔ ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)))
156154, 155syl 17 . . . . . . . . . . . 12 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁) ↔ ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)))
157144, 156mpbird 246 . . . . . . . . . . 11 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))
158157exp31 628 . . . . . . . . . 10 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
159158exp41 636 . . . . . . . . 9 (((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) → (𝐵:(0...(#‘𝐴))⟶𝑉 → ((∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))))
1606, 159mpancom 700 . . . . . . . 8 (𝐴 ∈ Word dom 𝐸 → (𝐵:(0...(#‘𝐴))⟶𝑉 → ((∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))))
161160imp31 447 . . . . . . 7 (((𝐴 ∈ Word dom 𝐸𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))
1625, 161syl 17 . . . . . 6 (𝑐 ∈ (𝑉 ClWalks 𝐸) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))
163162imp 444 . . . . 5 ((𝑐 ∈ (𝑉 ClWalks 𝐸) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
1642, 163sylbi 206 . . . 4 (𝑐𝐶 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
165164pm2.43i 50 . . 3 (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))
166165impcom 445 . 2 (((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) ∧ 𝑐𝐶) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))
167166, 7fmptd 6292 1 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶⟶((𝑉 ClWWalksN 𝐸)‘𝑁))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 195   ∧ wa 383   ∧ w3a 1031   = wceq 1475   ∈ wcel 1977  ∀wral 2896  {crab 2900  Vcvv 3173   ⊆ wss 3540  {cpr 4127  ⟨cop 4131   class class class wbr 4583   ↦ cmpt 4643  dom cdm 5038  ran crn 5039  ⟶wf 5800  ‘cfv 5804  (class class class)co 6549  1st c1st 7057  2nd c2nd 7058  Fincfn 7841  ℝcr 9814  0cc0 9815  1c1 9816   + caddc 9818   ≤ cle 9954   − cmin 10145  ℕcn 10897  2c2 10947  ℕ0cn0 11169  ℤcz 11254  ℤ≥cuz 11563  ...cfz 12197  ..^cfzo 12334  #chash 12979  Word cword 13146   lastS clsw 13147   substr csubstr 13150  ℙcprime 15223   USGrph cusg 25859   ClWalks cclwlk 26275   ClWWalks cclwwlk 26276   ClWWalksN cclwwlkn 26277 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-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847  ax-cnex 9871  ax-resscn 9872  ax-1cn 9873  ax-icn 9874  ax-addcl 9875  ax-addrcl 9876  ax-mulcl 9877  ax-mulrcl 9878  ax-mulcom 9879  ax-addass 9880  ax-mulass 9881  ax-distr 9882  ax-i2m1 9883  ax-1ne0 9884  ax-1rid 9885  ax-rnegex 9886  ax-rrecex 9887  ax-cnre 9888  ax-pre-lttri 9889  ax-pre-lttrn 9890  ax-pre-ltadd 9891  ax-pre-mulgt0 9892  ax-pre-sup 9893 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3or 1032  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-nel 2783  df-ral 2901  df-rex 2902  df-reu 2903  df-rmo 2904  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-pss 3556  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-tp 4130  df-op 4132  df-uni 4373  df-int 4411  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-tr 4681  df-eprel 4949  df-id 4953  df-po 4959  df-so 4960  df-fr 4997  df-we 4999  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-pred 5597  df-ord 5643  df-on 5644  df-lim 5645  df-suc 5646  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-riota 6511  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-om 6958  df-1st 7059  df-2nd 7060  df-wrecs 7294  df-recs 7355  df-rdg 7393  df-1o 7447  df-2o 7448  df-oadd 7451  df-er 7629  df-map 7746  df-pm 7747  df-en 7842  df-dom 7843  df-sdom 7844  df-fin 7845  df-sup 8231  df-card 8648  df-pnf 9955  df-mnf 9956  df-xr 9957  df-ltxr 9958  df-le 9959  df-sub 10147  df-neg 10148  df-div 10564  df-nn 10898  df-2 10956  df-3 10957  df-n0 11170  df-z 11255  df-uz 11564  df-rp 11709  df-fz 12198  df-fzo 12335  df-seq 12664  df-exp 12723  df-hash 12980  df-word 13154  df-lsw 13155  df-substr 13158  df-cj 13687  df-re 13688  df-im 13689  df-sqrt 13823  df-abs 13824  df-dvds 14822  df-prm 15224  df-usgra 25862  df-wlk 26036  df-clwlk 26278  df-clwwlk 26279  df-clwwlkn 26280 This theorem is referenced by:  clwlkfoclwwlk  26372  clwlkf1clwwlk  26377
 Copyright terms: Public domain W3C validator