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

Theorem clwlkfclwwlk 26133
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 3165 . . . . 5 (𝑐𝐶 ↔ (𝑐 ∈ (𝑉 ClWalks 𝐸) ∧ (#‘𝐴) = 𝑁))
3 clwlkfclwwlk.1 . . . . . . . 8 𝐴 = (1st𝑐)
4 clwlkfclwwlk.2 . . . . . . . 8 𝐵 = (2nd𝑐)
53, 4clwlkcompim 26054 . . . . . . 7 (𝑐 ∈ (𝑉 ClWalks 𝐸) → ((𝐴 ∈ Word dom 𝐸𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))))
6 lencl 13121 . . . . . . . . 9 (𝐴 ∈ Word dom 𝐸 → (#‘𝐴) ∈ ℕ0)
7 clwlkfclwwlk.f . . . . . . . . . . . . . . . . . 18 𝐹 = (𝑐𝐶 ↦ (𝐵 substr ⟨0, (#‘𝐴)⟩))
83, 4, 1, 7clwlkfclwwlk2wrd 26129 . . . . . . . . . . . . . . . . 17 (𝑐𝐶𝐵 ∈ Word 𝑉)
98ad2antlr 758 . . . . . . . . . . . . . . . 16 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 𝐵 ∈ Word 𝑉)
10 swrdcl 13213 . . . . . . . . . . . . . . . 16 (𝐵 ∈ Word 𝑉 → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉)
119, 10syl 17 . . . . . . . . . . . . . . 15 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ Word 𝑉)
12 simp-5r 804 . . . . . . . . . . . . . . . . . . 19 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 𝐴 ∈ Word dom 𝐸)
13 simp1 1053 . . . . . . . . . . . . . . . . . . 19 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → 𝑉 USGrph 𝐸)
1412, 13anim12ci 588 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 USGrph 𝐸𝐴 ∈ Word dom 𝐸))
15 simp-5r 804 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 𝐵:(0...(#‘𝐴))⟶𝑉)
16 prmuz2 15188 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℙ → 𝑁 ∈ (ℤ‘2))
17 ffz0hash 13036 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ ℕ0𝐵:(0...(#‘𝐴))⟶𝑉) → (#‘𝐵) = ((#‘𝐴) + 1))
1817adantlr 746 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) → (#‘𝐵) = ((#‘𝐴) + 1))
19 eluz2 11521 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((#‘𝐴) ∈ (ℤ‘2) ↔ (2 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)))
20 2re 10933 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2 ∈ ℝ
2120a1i 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → 2 ∈ ℝ)
22 zre 11210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ ℝ)
23 peano2re 10056 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((#‘𝐴) ∈ ℝ → ((#‘𝐴) + 1) ∈ ℝ)
2422, 23syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) + 1) ∈ ℝ)
2521, 22, 243jca 1234 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ))
2625adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → (2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ))
27 simpr 475 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ (#‘𝐴))
2822lep1d 10800 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ≤ ((#‘𝐴) + 1))
2928adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → (#‘𝐴) ≤ ((#‘𝐴) + 1))
30 letr 9978 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ) → ((2 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ ((#‘𝐴) + 1)) → 2 ≤ ((#‘𝐴) + 1)))
3130imp 443 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((2 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ ∧ ((#‘𝐴) + 1) ∈ ℝ) ∧ (2 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ ((#‘𝐴) + 1))) → 2 ≤ ((#‘𝐴) + 1))
3226, 27, 29, 31syl12anc 1315 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (((#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ ((#‘𝐴) + 1))
33323adant1 1071 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((2 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ 2 ≤ (#‘𝐴)) → 2 ≤ ((#‘𝐴) + 1))
3419, 33sylbi 205 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ (ℤ‘2) → 2 ≤ ((#‘𝐴) + 1))
3534a1i 11 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → ((#‘𝐴) ∈ (ℤ‘2) → 2 ≤ ((#‘𝐴) + 1)))
36 eleq1 2671 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑁 = (#‘𝐴) → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
3736eqcoms 2613 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
3837adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) ↔ (#‘𝐴) ∈ (ℤ‘2)))
39 breq2 4577 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐵) = ((#‘𝐴) + 1) → (2 ≤ (#‘𝐵) ↔ 2 ≤ ((#‘𝐴) + 1)))
4039adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (2 ≤ (#‘𝐵) ↔ 2 ≤ ((#‘𝐴) + 1)))
4135, 38, 403imtr4d 281 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐵) = ((#‘𝐴) + 1) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4241ex 448 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((#‘𝐵) = ((#‘𝐴) + 1) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4318, 42syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4443adantr 479 . . . . . . . . . . . . . . . . . . . . . . 23 (((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → ((#‘𝐴) = 𝑁 → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵))))
4544imp 443 . . . . . . . . . . . . . . . . . . . . . 22 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4645adantr 479 . . . . . . . . . . . . . . . . . . . . 21 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → (𝑁 ∈ (ℤ‘2) → 2 ≤ (#‘𝐵)))
4716, 46syl5com 31 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℙ → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 2 ≤ (#‘𝐵)))
48473ad2ant3 1076 . . . . . . . . . . . . . . . . . . 19 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → 2 ≤ (#‘𝐵)))
4948impcom 444 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → 2 ≤ (#‘𝐵))
50 simp-4r 802 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))))
51 clwlkisclwwlklem1 26077 . . . . . . . . . . . . . . . . . 18 (((𝑉 USGrph 𝐸𝐴 ∈ Word dom 𝐸) ∧ (𝐵:(0...(#‘𝐴))⟶𝑉 ∧ 2 ≤ (#‘𝐵)) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸))
5214, 15, 49, 50, 51syl121anc 1322 . . . . . . . . . . . . . . . . 17 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (( lastS ‘𝐵) = (𝐵‘0) ∧ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸))
533, 4, 1, 7clwlkfclwwlk1hash 26131 . . . . . . . . . . . . . . . . . . . . . . . 24 (𝑐𝐶 → (#‘𝐴) ∈ (0...(#‘𝐵)))
54 simp2 1054 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝐵 ∈ Word 𝑉)
55 simp1 1053 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (#‘𝐴) ∈ (0...(#‘𝐵)))
56 elfzelz 12164 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (#‘𝐴) ∈ ℤ)
57 peano2zm 11249 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) − 1) ∈ ℤ)
58 id 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ ℤ)
5922lem1d 10802 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ ℤ → ((#‘𝐴) − 1) ≤ (#‘𝐴))
60 eluz2 11521 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)) ↔ (((#‘𝐴) − 1) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ ((#‘𝐴) − 1) ≤ (#‘𝐴)))
6157, 58, 59, 60syl3anbrc 1238 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ ℤ → (#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)))
62 fzoss2 12316 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((#‘𝐴) ∈ (ℤ‘((#‘𝐴) − 1)) → (0..^((#‘𝐴) − 1)) ⊆ (0..^(#‘𝐴)))
6356, 61, 623syl 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (0..^((#‘𝐴) − 1)) ⊆ (0..^(#‘𝐴)))
6463sselda 3563 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝑖 ∈ (0..^(#‘𝐴)))
65643adant2 1072 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → 𝑖 ∈ (0..^(#‘𝐴)))
66 swrd0fv 13233 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^(#‘𝐴))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖) = (𝐵𝑖))
6754, 55, 65, 66syl3anc 1317 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖) = (𝐵𝑖))
6867eqcomd 2611 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝐵𝑖) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖))
69 elfzom1elp1fzo 12353 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (((#‘𝐴) ∈ ℤ ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
7056, 69sylan 486 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
71703adant2 1072 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝑖 + 1) ∈ (0..^(#‘𝐴)))
72 swrd0fv 13233 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (𝑖 + 1) ∈ (0..^(#‘𝐴))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)) = (𝐵‘(𝑖 + 1)))
7372eqcomd 2611 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (𝑖 + 1) ∈ (0..^(#‘𝐴))) → (𝐵‘(𝑖 + 1)) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)))
7454, 55, 71, 73syl3anc 1317 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → (𝐵‘(𝑖 + 1)) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1)))
7568, 74preq12d 4215 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ 𝐵 ∈ Word 𝑉𝑖 ∈ (0..^((#‘𝐴) − 1))) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})
76753exp 1255 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (𝐵 ∈ Word 𝑉 → (𝑖 ∈ (0..^((#‘𝐴) − 1)) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})))
7753, 8, 76sylc 62 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑐𝐶 → (𝑖 ∈ (0..^((#‘𝐴) − 1)) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))}))
7877imp 443 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑐𝐶𝑖 ∈ (0..^((#‘𝐴) − 1))) → {(𝐵𝑖), (𝐵‘(𝑖 + 1))} = {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))})
7978eleq1d 2667 . . . . . . . . . . . . . . . . . . . . 21 ((𝑐𝐶𝑖 ∈ (0..^((#‘𝐴) − 1))) → ({(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
8079ralbidva 2963 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐶 → (∀𝑖 ∈ (0..^((#‘𝐴) − 1)){(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^((#‘𝐴) − 1)){((𝐵 substr ⟨0, (#‘𝐴)⟩)‘𝑖), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
8180ad2antlr 758 . . . . . . . . . . . . . . . . . . 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 26132 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑐𝐶 → (#‘𝐴) = (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)))
8382oveq1d 6538 . . . . . . . . . . . . . . . . . . . . . 22 (𝑐𝐶 → ((#‘𝐴) − 1) = ((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1))
8483ad2antlr 758 . . . . . . . . . . . . . . . . . . . . 21 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((#‘𝐴) − 1) = ((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1))
8584oveq2d 6539 . . . . . . . . . . . . . . . . . . . 20 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (0..^((#‘𝐴) − 1)) = (0..^((#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) − 1)))
8685raleqdv 3116 . . . . . . . . . . . . . . . . . . 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 266 . . . . . . . . . . . . . . . . . 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 2671 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝑁 = (#‘𝐴) → (𝑁 ∈ ℙ ↔ (#‘𝐴) ∈ ℙ))
8988biimpd 217 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑁 = (#‘𝐴) → (𝑁 ∈ ℙ → (#‘𝐴) ∈ ℙ))
9089eqcoms 2613 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((#‘𝐴) = 𝑁 → (𝑁 ∈ ℙ → (#‘𝐴) ∈ ℙ))
91 prmnn 15168 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((#‘𝐴) ∈ ℙ → (#‘𝐴) ∈ ℕ)
92 elfz2nn0 12251 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((#‘𝐴) ∈ (0...(#‘𝐵)) ↔ ((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)))
93 1zzd 11237 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → 1 ∈ ℤ)
94 nn0z 11229 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((#‘𝐵) ∈ ℕ0 → (#‘𝐵) ∈ ℤ)
9594adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (#‘𝐵) ∈ ℤ)
96 nn0z 11229 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((#‘𝐴) ∈ ℕ0 → (#‘𝐴) ∈ ℤ)
9796adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (#‘𝐴) ∈ ℤ)
9893, 95, 973jca 1234 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
99983adant3 1073 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
10099adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
101 simp3 1055 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 (((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) → (#‘𝐴) ≤ (#‘𝐵))
102 nnge1 10889 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((#‘𝐴) ∈ ℕ → 1 ≤ (#‘𝐴))
103101, 102anim12ci 588 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵)))
104100, 103jca 552 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐵) ∈ ℕ0 ∧ (#‘𝐴) ≤ (#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
10592, 104sylanb 487 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
106 elfz2 12155 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝐴) ∈ (1...(#‘𝐵)) ↔ ((1 ∈ ℤ ∧ (#‘𝐵) ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) ∧ (1 ≤ (#‘𝐴) ∧ (#‘𝐴) ≤ (#‘𝐵))))
107105, 106sylibr 222 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (((#‘𝐴) ∈ (0...(#‘𝐵)) ∧ (#‘𝐴) ∈ ℕ) → (#‘𝐴) ∈ (1...(#‘𝐵)))
108 swrd0fvlsw 13237 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → ( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = (𝐵‘((#‘𝐴) − 1)))
109108eqcomd 2611 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → (𝐵‘((#‘𝐴) − 1)) = ( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)))
110 swrd0fv0 13234 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0) = (𝐵‘0))
111110eqcomd 2611 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → (𝐵‘0) = ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0))
112109, 111preq12d 4215 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝐵 ∈ Word 𝑉 ∧ (#‘𝐴) ∈ (1...(#‘𝐵))) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})
113112expcom 449 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 448 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((#‘𝐴) ∈ (0...(#‘𝐵)) → ((#‘𝐴) ∈ ℕ → (𝐵 ∈ Word 𝑉 → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
116115com23 83 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ (0...(#‘𝐵)) → (𝐵 ∈ Word 𝑉 → ((#‘𝐴) ∈ ℕ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
11753, 8, 116sylc 62 . . . . . . . . . . . . . . . . . . . . . . . . . . 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 83 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝐴) = 𝑁 → (𝑐𝐶 → (𝑁 ∈ ℙ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
121120adantl 480 . . . . . . . . . . . . . . . . . . . . . . 23 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → (𝑁 ∈ ℙ → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})))
122121imp 443 . . . . . . . . . . . . . . . . . . . . . 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 1076 . . . . . . . . . . . . . . . . . . . 20 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)}))
125124impcom 444 . . . . . . . . . . . . . . . . . . 19 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → {(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} = {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)})
126125eleq1d 2667 . . . . . . . . . . . . . . . . . 18 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ({(𝐵‘((#‘𝐴) − 1)), (𝐵‘0)} ∈ ran 𝐸 ↔ {( lastS ‘(𝐵 substr ⟨0, (#‘𝐴)⟩)), ((𝐵 substr ⟨0, (#‘𝐴)⟩)‘0)} ∈ ran 𝐸))
12787, 1263anbi23d 1393 . . . . . . . . . . . . . . . . 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 220 . . . . . . . . . . . . . . . 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 1052 . . . . . . . . . . . . . . . 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 1034 . . . . . . . . . . . . . . 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 694 . . . . . . . . . . . . . 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 25629 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸 → (𝑉 ∈ V ∧ 𝐸 ∈ V))
1341333ad2ant1 1074 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V))
135134adantl 480 . . . . . . . . . . . . . . 15 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 ∈ V ∧ 𝐸 ∈ V))
136 isclwwlk 26058 . . . . . . . . . . . . . . 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 245 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸))
13982eqeq1d 2607 . . . . . . . . . . . . . . . . 17 (𝑐𝐶 → ((#‘𝐴) = 𝑁 ↔ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
140139biimpcd 237 . . . . . . . . . . . . . . . 16 ((#‘𝐴) = 𝑁 → (𝑐𝐶 → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
141140adantl 480 . . . . . . . . . . . . . . 15 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
142141imp 443 . . . . . . . . . . . . . 14 (((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)
143142adantr 479 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁)
144138, 143jca 552 . . . . . . . . . . . 12 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → ((𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝐵 substr ⟨0, (#‘𝐴)⟩)) = 𝑁))
145133simpld 473 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸𝑉 ∈ V)
146145adantr 479 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝑉 ∈ V)
147133simprd 477 . . . . . . . . . . . . . . . . 17 (𝑉 USGrph 𝐸𝐸 ∈ V)
148147adantr 479 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝐸 ∈ V)
149 prmnn 15168 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℙ → 𝑁 ∈ ℕ)
150149nnnn0d 11194 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℙ → 𝑁 ∈ ℕ0)
151150adantl 480 . . . . . . . . . . . . . . . 16 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → 𝑁 ∈ ℕ0)
152146, 148, 1513jca 1234 . . . . . . . . . . . . . . 15 ((𝑉 USGrph 𝐸𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
1531523adant2 1072 . . . . . . . . . . . . . 14 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
154153adantl 480 . . . . . . . . . . . . 13 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ 𝑁 ∈ ℕ0))
155 isclwwlkn 26059 . . . . . . . . . . . . 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 245 . . . . . . . . . . 11 ((((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) ∧ 𝑐𝐶) ∧ (𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ)) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))
158157exp31 627 . . . . . . . . . 10 ((((((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) ∧ 𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
159158exp41 635 . . . . . . . . 9 (((#‘𝐴) ∈ ℕ0𝐴 ∈ Word dom 𝐸) → (𝐵:(0...(#‘𝐴))⟶𝑉 → ((∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))))
1606, 159mpancom 699 . . . . . . . 8 (𝐴 ∈ Word dom 𝐸 → (𝐵:(0...(#‘𝐴))⟶𝑉 → ((∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))))
161160imp31 446 . . . . . . 7 (((𝐴 ∈ Word dom 𝐸𝐵:(0...(#‘𝐴))⟶𝑉) ∧ (∀𝑖 ∈ (0..^(#‘𝐴))(𝐸‘(𝐴𝑖)) = {(𝐵𝑖), (𝐵‘(𝑖 + 1))} ∧ (𝐵‘0) = (𝐵‘(#‘𝐴)))) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))
1625, 161syl 17 . . . . . 6 (𝑐 ∈ (𝑉 ClWalks 𝐸) → ((#‘𝐴) = 𝑁 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))))
163162imp 443 . . . . 5 ((𝑐 ∈ (𝑉 ClWalks 𝐸) ∧ (#‘𝐴) = 𝑁) → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
1642, 163sylbi 205 . . . 4 (𝑐𝐶 → (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))))
165164pm2.43i 49 . . 3 (𝑐𝐶 → ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁)))
166165impcom 444 . 2 (((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) ∧ 𝑐𝐶) → (𝐵 substr ⟨0, (#‘𝐴)⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘𝑁))
167166, 7fmptd 6273 1 ((𝑉 USGrph 𝐸𝑉 ∈ Fin ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶⟶((𝑉 ClWWalksN 𝐸)‘𝑁))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 194  wa 382  w3a 1030   = wceq 1474  wcel 1975  wral 2891  {crab 2895  Vcvv 3168  wss 3535  {cpr 4122  cop 4126   class class class wbr 4573  cmpt 4633  dom cdm 5024  ran crn 5025  wf 5782  cfv 5786  (class class class)co 6523  1st c1st 7030  2nd c2nd 7031  Fincfn 7814  cr 9787  0cc0 9788  1c1 9789   + caddc 9791  cle 9927  cmin 10113  cn 10863  2c2 10913  0cn0 11135  cz 11206  cuz 11515  ...cfz 12148  ..^cfzo 12285  #chash 12930  Word cword 13088   lastS clsw 13089   substr csubstr 13092  cprime 15165   USGrph cusg 25621   ClWalks cclwlk 26037   ClWWalks cclwwlk 26038   ClWWalksN cclwwlkn 26039
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1711  ax-4 1726  ax-5 1825  ax-6 1873  ax-7 1920  ax-8 1977  ax-9 1984  ax-10 2004  ax-11 2019  ax-12 2031  ax-13 2228  ax-ext 2585  ax-rep 4689  ax-sep 4699  ax-nul 4708  ax-pow 4760  ax-pr 4824  ax-un 6820  ax-cnex 9844  ax-resscn 9845  ax-1cn 9846  ax-icn 9847  ax-addcl 9848  ax-addrcl 9849  ax-mulcl 9850  ax-mulrcl 9851  ax-mulcom 9852  ax-addass 9853  ax-mulass 9854  ax-distr 9855  ax-i2m1 9856  ax-1ne0 9857  ax-1rid 9858  ax-rnegex 9859  ax-rrecex 9860  ax-cnre 9861  ax-pre-lttri 9862  ax-pre-lttrn 9863  ax-pre-ltadd 9864  ax-pre-mulgt0 9865  ax-pre-sup 9866
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1866  df-eu 2457  df-mo 2458  df-clab 2592  df-cleq 2598  df-clel 2601  df-nfc 2735  df-ne 2777  df-nel 2778  df-ral 2896  df-rex 2897  df-reu 2898  df-rmo 2899  df-rab 2900  df-v 3170  df-sbc 3398  df-csb 3495  df-dif 3538  df-un 3540  df-in 3542  df-ss 3549  df-pss 3551  df-nul 3870  df-if 4032  df-pw 4105  df-sn 4121  df-pr 4123  df-tp 4125  df-op 4127  df-uni 4363  df-int 4401  df-iun 4447  df-br 4574  df-opab 4634  df-mpt 4635  df-tr 4671  df-eprel 4935  df-id 4939  df-po 4945  df-so 4946  df-fr 4983  df-we 4985  df-xp 5030  df-rel 5031  df-cnv 5032  df-co 5033  df-dm 5034  df-rn 5035  df-res 5036  df-ima 5037  df-pred 5579  df-ord 5625  df-on 5626  df-lim 5627  df-suc 5628  df-iota 5750  df-fun 5788  df-fn 5789  df-f 5790  df-f1 5791  df-fo 5792  df-f1o 5793  df-fv 5794  df-riota 6485  df-ov 6526  df-oprab 6527  df-mpt2 6528  df-om 6931  df-1st 7032  df-2nd 7033  df-wrecs 7267  df-recs 7328  df-rdg 7366  df-1o 7420  df-2o 7421  df-oadd 7424  df-er 7602  df-map 7719  df-pm 7720  df-en 7815  df-dom 7816  df-sdom 7817  df-fin 7818  df-sup 8204  df-card 8621  df-pnf 9928  df-mnf 9929  df-xr 9930  df-ltxr 9931  df-le 9932  df-sub 10115  df-neg 10116  df-div 10530  df-nn 10864  df-2 10922  df-3 10923  df-n0 11136  df-z 11207  df-uz 11516  df-rp 11661  df-fz 12149  df-fzo 12286  df-seq 12615  df-exp 12674  df-hash 12931  df-word 13096  df-lsw 13097  df-substr 13100  df-cj 13629  df-re 13630  df-im 13631  df-sqrt 13765  df-abs 13766  df-dvds 14764  df-prm 15166  df-usgra 25624  df-wlk 25798  df-clwlk 26040  df-clwwlk 26041  df-clwwlkn 26042
This theorem is referenced by:  clwlkfoclwwlk  26134  clwlkf1clwwlk  26139
  Copyright terms: Public domain W3C validator