Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  gsumwrd2dccatlem Structured version   Visualization version   GIF version

Theorem gsumwrd2dccatlem 33638
Description: Lemma for gsumwrd2dccat 33639. Expose a bijection 𝐹 between (ordered) pairs of words and words with a length of a subword. (Contributed by Thierry Arnoux, 5-Oct-2025.)
Hypotheses
Ref Expression
gsumwrd2dccatlem.u 𝑈 = ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤)))
gsumwrd2dccatlem.f 𝐹 = (𝑎 ∈ (Word 𝐴 × Word 𝐴) ↦ ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩)
gsumwrd2dccatlem.g 𝐺 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩)
gsumwrd2dccatlem.a (𝜑 → 𝐴 ∈ 𝑉)
Assertion
Ref Expression
gsumwrd2dccatlem (𝜑 → (𝐹:(Word 𝐴 × Word 𝐴)–1-1-onto→𝑈 ∧ ◡𝐹 = 𝐺))
Distinct variable groups:   𝐴,𝑎,𝑏,𝑤   𝐹,𝑏   𝑈,𝑎,𝑏   𝜑,𝑎,𝑏,𝑤
Allowed substitution hints:   𝑈(𝑤)   𝐹(𝑤, 𝑎)   𝐺(𝑤, 𝑎, 𝑏)   𝑉(𝑤, 𝑎, 𝑏)

Proof of Theorem gsumwrd2dccatlem
Dummy variables 𝑛 𝑢 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 gsumwrd2dccatlem.f . . . 4 𝐹 = (𝑎 ∈ (Word 𝐴 × Word 𝐴) ↦ ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩)
2 sneq 4593 . . . . . . . . 9 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → {𝑤} = {((1st ‘𝑎) ++ (2nd ‘𝑎))})
3 fveq2 6885 . . . . . . . . . 10 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (♯‘𝑤) = (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
43oveq2d 7436 . . . . . . . . 9 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (0...(♯‘𝑤)) = (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
52, 4xpeq12d 5681 . . . . . . . 8 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → ({𝑤} × (0...(♯‘𝑤))) = ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))))
65eleq2d 2846 . . . . . . 7 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({𝑤} × (0...(♯‘𝑤))) ↔ ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))))
7 xp1st 8033 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (1st ‘𝑎) ∈ Word 𝐴)
87adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (1st ‘𝑎) ∈ Word 𝐴)
9 xp2nd 8034 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (2nd ‘𝑎) ∈ Word 𝐴)
109adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (2nd ‘𝑎) ∈ Word 𝐴)
11 ccatcl 14719 . . . . . . . 8 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
128, 10, 11syl2anc 596 . . . . . . 7 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
13 ovex 7453 . . . . . . . . . 10 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ V
1413snid 4622 . . . . . . . . 9 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))}
1514a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))})
16 0zd 12705 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ∈ ℤ)
17 lencl 14678 . . . . . . . . . . 11 (((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴 → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1812, 17syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1918nn0zd 12718 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℤ)
20 lencl 14678 . . . . . . . . . . 11 ((1st ‘𝑎) ∈ Word 𝐴 → (♯‘(1st ‘𝑎)) ∈ ℕ0)
218, 20syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℕ0)
2221nn0zd 12718 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℤ)
2321nn0ge0d 12670 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(1st ‘𝑎)))
24 lencl 14678 . . . . . . . . . . . . 13 ((2nd ‘𝑎) ∈ Word 𝐴 → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2510, 24syl 18 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2625nn0ge0d 12670 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(2nd ‘𝑎)))
2721nn0red 12668 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℝ)
2825nn0red 12668 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℝ)
2927, 28addge01d 11904 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (0 ≤ (♯‘(2nd ‘𝑎)) ↔ (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))))
3026, 29mpbid 235 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
31 ccatlen 14720 . . . . . . . . . . 11 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
328, 10, 31syl2anc 596 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
3330, 32breqtrrd 5132 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
3416, 19, 22, 23, 33elfzd 13647 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
3515, 34opelxpd 5689 . . . . . . 7 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))))
366, 12, 35rspcedvdw 3579 . . . . . 6 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∃𝑤 ∈ Word 𝐴⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({𝑤} × (0...(♯‘𝑤))))
3736eliund 4957 . . . . 5 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
38 gsumwrd2dccatlem.u . . . . 5 𝑈 = ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤)))
3937, 38eleqtrrdi 2871 . . . 4 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ 𝑈)
40 simpr 490 . . . . . . . . . 10 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))))
41 xp1st 8033 . . . . . . . . . 10 (𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) → (1st ‘𝑏) ∈ {𝑢})
42 elsni 4600 . . . . . . . . . 10 ((1st ‘𝑏) ∈ {𝑢} → (1st ‘𝑏) = 𝑢)
4340, 41, 423syl 19 . . . . . . . . 9 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) = 𝑢)
44 simplr 781 . . . . . . . . 9 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → 𝑢 ∈ Word 𝐴)
4543, 44eqeltrd 2860 . . . . . . . 8 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) ∈ Word 𝐴)
4645adantllr 732 . . . . . . 7 ((((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) ∈ Word 𝐴)
4738eleq2i 2852 . . . . . . . . . 10 (𝑏 ∈ 𝑈 ↔ 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
4847bilani 510 . . . . . . . . 9 ((𝜑 ∧ 𝑏 ∈ 𝑈) → 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
49 eliun 4954 . . . . . . . . 9 (𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ↔ ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
5048, 49sylib 221 . . . . . . . 8 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
51 sneq 4593 . . . . . . . . . . 11 (𝑢 = 𝑤 → {𝑢} = {𝑤})
52 fveq2 6885 . . . . . . . . . . . 12 (𝑢 = 𝑤 → (♯‘𝑢) = (♯‘𝑤))
5352oveq2d 7436 . . . . . . . . . . 11 (𝑢 = 𝑤 → (0...(♯‘𝑢)) = (0...(♯‘𝑤)))
5451, 53xpeq12d 5681 . . . . . . . . . 10 (𝑢 = 𝑤 → ({𝑢} × (0...(♯‘𝑢))) = ({𝑤} × (0...(♯‘𝑤))))
5554eleq2d 2846 . . . . . . . . 9 (𝑢 = 𝑤 → (𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) ↔ 𝑏 ∈ ({𝑤} × (0...(♯‘𝑤)))))
5655cbvrexvw 3241 . . . . . . . 8 (∃𝑢 ∈ Word 𝐴𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) ↔ ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
5750, 56sylibr 237 . . . . . . 7 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ∃𝑢 ∈ Word 𝐴𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))))
5846, 57r19.29a 3170 . . . . . 6 ((𝜑 ∧ 𝑏 ∈ 𝑈) → (1st ‘𝑏) ∈ Word 𝐴)
59 pfxcl 14827 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
6058, 59syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
61 swrdcl 14793 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6258, 61syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6360, 62opelxpd 5689 . . . 4 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ∈ (Word 𝐴 × Word 𝐴))
6448adantr 486 . . . . . . . . . 10 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
65 eliunxp 5813 . . . . . . . . . 10 (𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ↔ ∃𝑤∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
6664, 65sylib 221 . . . . . . . . 9 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∃𝑤∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
67 opeq1 4832 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → ⟨𝑢, 𝑛⟩ = ⟨𝑤, 𝑛⟩)
6867eqeq2d 2771 . . . . . . . . . . . 12 (𝑢 = 𝑤 → (𝑏 = ⟨𝑢, 𝑛⟩ ↔ 𝑏 = ⟨𝑤, 𝑛⟩))
69 eleq1w 2843 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → (𝑢 ∈ Word 𝐴 ↔ 𝑤 ∈ Word 𝐴))
7053eleq2d 2846 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → (𝑛 ∈ (0...(♯‘𝑢)) ↔ 𝑛 ∈ (0...(♯‘𝑤))))
7169, 70anbi12d 644 . . . . . . . . . . . 12 (𝑢 = 𝑤 → ((𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢))) ↔ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
7268, 71anbi12d 644 . . . . . . . . . . 11 (𝑢 = 𝑤 → ((𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) ↔ (𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤))))))
7372exbidv 1953 . . . . . . . . . 10 (𝑢 = 𝑤 → (∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) ↔ ∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤))))))
7473cbvexvw 2069 . . . . . . . . 9 (∃𝑢∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) ↔ ∃𝑤∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
7566, 74sylibr 237 . . . . . . . 8 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∃𝑢∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))))
76 simplr 781 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)))
77 simpr 490 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩))
7876, 77oveq12d 7438 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) = (((1st ‘𝑏) prefix (2nd ‘𝑏)) ++ ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)))
79 vex 3454 . . . . . . . . . . . . . . . . . . . . 21 𝑢 ∈ V
80 vex 3454 . . . . . . . . . . . . . . . . . . . . 21 𝑛 ∈ V
8179, 80op1std 8011 . . . . . . . . . . . . . . . . . . . 20 (𝑏 = ⟨𝑢, 𝑛⟩ → (1st ‘𝑏) = 𝑢)
8281ad5antlr 748 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑏) = 𝑢)
83 simp-4r 796 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑢 ∈ Word 𝐴)
8482, 83eqeltrd 2860 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑏) ∈ Word 𝐴)
8579, 80op2ndd 8012 . . . . . . . . . . . . . . . . . . . 20 (𝑏 = ⟨𝑢, 𝑛⟩ → (2nd ‘𝑏) = 𝑛)
8685ad5antlr 748 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (2nd ‘𝑏) = 𝑛)
87 simpllr 788 . . . . . . . . . . . . . . . . . . . 20 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑛 ∈ (0...(♯‘𝑢)))
8882eqcomd 2766 . . . . . . . . . . . . . . . . . . . . . 22 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑢 = (1st ‘𝑏))
8988fveq2d 6889 . . . . . . . . . . . . . . . . . . . . 21 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘𝑢) = (♯‘(1st ‘𝑏)))
9089oveq2d 7436 . . . . . . . . . . . . . . . . . . . 20 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (0...(♯‘𝑢)) = (0...(♯‘(1st ‘𝑏))))
9187, 90eleqtrd 2862 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑛 ∈ (0...(♯‘(1st ‘𝑏))))
9286, 91eqeltrd 2860 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (2nd ‘𝑏) ∈ (0...(♯‘(1st ‘𝑏))))
93 pfxcctswrd 14859 . . . . . . . . . . . . . . . . . 18 (((1st ‘𝑏) ∈ Word 𝐴 ∧ (2nd ‘𝑏) ∈ (0...(♯‘(1st ‘𝑏)))) → (((1st ‘𝑏) prefix (2nd ‘𝑏)) ++ ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) = (1st ‘𝑏))
9484, 92, 93syl2anc 596 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (((1st ‘𝑏) prefix (2nd ‘𝑏)) ++ ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) = (1st ‘𝑏))
9578, 94eqtr2d 2796 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)))
9676fveq2d 6889 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘(1st ‘𝑎)) = (♯‘((1st ‘𝑏) prefix (2nd ‘𝑏))))
97 pfxlen 14833 . . . . . . . . . . . . . . . . . 18 (((1st ‘𝑏) ∈ Word 𝐴 ∧ (2nd ‘𝑏) ∈ (0...(♯‘(1st ‘𝑏)))) → (♯‘((1st ‘𝑏) prefix (2nd ‘𝑏))) = (2nd ‘𝑏))
9884, 92, 97syl2anc 596 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘((1st ‘𝑏) prefix (2nd ‘𝑏))) = (2nd ‘𝑏))
9996, 98eqtr2d 2796 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))
10095, 99jca 521 . . . . . . . . . . . . . . 15 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))))
101100anasss 472 . . . . . . . . . . . . . 14 ((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ ((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩))) → ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))))
102 simplr 781 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)))
103 simpr 490 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))
104102, 103oveq12d 7438 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ((1st ‘𝑏) prefix (2nd ‘𝑏)) = (((1st ‘𝑎) ++ (2nd ‘𝑎)) prefix (♯‘(1st ‘𝑎))))
1058ad5antr 747 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (1st ‘𝑎) ∈ Word 𝐴)
10610ad5antr 747 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (2nd ‘𝑎) ∈ Word 𝐴)
107 pfxccat1 14851 . . . . . . . . . . . . . . . . . 18 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → (((1st ‘𝑎) ++ (2nd ‘𝑎)) prefix (♯‘(1st ‘𝑎))) = (1st ‘𝑎))
108105, 106, 107syl2anc 596 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (((1st ‘𝑎) ++ (2nd ‘𝑎)) prefix (♯‘(1st ‘𝑎))) = (1st ‘𝑎))
109104, 108eqtr2d 2796 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)))
110102fveq2d 6889 . . . . . . . . . . . . . . . . . . . 20 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (♯‘(1st ‘𝑏)) = (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
111105, 106, 31syl2anc 596 . . . . . . . . . . . . . . . . . . . 20 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
112110, 111eqtrd 2795 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (♯‘(1st ‘𝑏)) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
113103, 112opeq12d 4840 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩ = ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩)
114102, 113oveq12d 7438 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) = (((1st ‘𝑎) ++ (2nd ‘𝑎)) substr ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩))
115 swrdccat2 14819 . . . . . . . . . . . . . . . . . 18 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → (((1st ‘𝑎) ++ (2nd ‘𝑎)) substr ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩) = (2nd ‘𝑎))
116105, 106, 115syl2anc 596 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (((1st ‘𝑎) ++ (2nd ‘𝑎)) substr ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩) = (2nd ‘𝑎))
117114, 116eqtr2d 2796 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩))
118109, 117jca 521 . . . . . . . . . . . . . . 15 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)))
119118anasss 472 . . . . . . . . . . . . . 14 ((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))) → ((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)))
120101, 119impbida 813 . . . . . . . . . . . . 13 (((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
121120anasss 472 . . . . . . . . . . . 12 ((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
122121expl 463 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))))))
123122adantlr 728 . . . . . . . . . 10 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))))))
124123exlimdv 1965 . . . . . . . . 9 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))))))
125124imp 412 . . . . . . . 8 ((((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ ∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢))))) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
12675, 125exlimddv 1967 . . . . . . 7 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
127 eqop 8043 . . . . . . . 8 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (𝑎 = ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ↔ ((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩))))
128127adantl 487 . . . . . . 7 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (𝑎 = ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ↔ ((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩))))
129 snssi 4745 . . . . . . . . . . . . 13 (𝑤 ∈ Word 𝐴 → {𝑤} ⊆ Word 𝐴)
130129adantl 487 . . . . . . . . . . . 12 (((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑤 ∈ Word 𝐴) → {𝑤} ⊆ Word 𝐴)
131 fz0ssnn0 13756 . . . . . . . . . . . 12 (0...(♯‘𝑤)) ⊆ ℕ0
132 xpss12 5665 . . . . . . . . . . . 12 (({𝑤} ⊆ Word 𝐴 ∧ (0...(♯‘𝑤)) ⊆ ℕ0) → ({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
133130, 131, 132sylancl 598 . . . . . . . . . . 11 (((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑤 ∈ Word 𝐴) → ({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
134133iunssd 5008 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
135134adantlr 728 . . . . . . . . 9 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
136135, 64sseldd 3909 . . . . . . . 8 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 𝑏 ∈ (Word 𝐴 × ℕ0))
137 eqop 8043 . . . . . . . 8 (𝑏 ∈ (Word 𝐴 × ℕ0) → (𝑏 = ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
138136, 137syl 18 . . . . . . 7 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (𝑏 = ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
139126, 128, 1383bitr4d 314 . . . . . 6 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (𝑎 = ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ↔ 𝑏 = ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩))
140139an32s 665 . . . . 5 (((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 ∈ 𝑈) → (𝑎 = ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ↔ 𝑏 = ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩))
141140anasss 472 . . . 4 ((𝜑 ∧ (𝑎 ∈ (Word 𝐴 × Word 𝐴) ∧ 𝑏 ∈ 𝑈)) → (𝑎 = ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ↔ 𝑏 = ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩))
1421, 39, 63, 141f1ocnv2d 7674 . . 3 (𝜑 → (𝐹:(Word 𝐴 × Word 𝐴)–1-1-onto→𝑈 ∧ ◡𝐹 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩)))
143142simpld 500 . 2 (𝜑 → 𝐹:(Word 𝐴 × Word 𝐴)–1-1-onto→𝑈)
144142simprd 501 . . 3 (𝜑 → ◡𝐹 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩))
145 gsumwrd2dccatlem.g . . 3 𝐺 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩)
146144, 145eqtr4di 2813 . 2 (𝜑 → ◡𝐹 = 𝐺)
147143, 146jca 521 1 (𝜑 → (𝐹:(Word 𝐴 × Word 𝐴)–1-1-onto→𝑈 ∧ ◡𝐹 = 𝐺))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   = wceq 1569  ∃wex 1811   ∈ wcel 2144  ∃wrex 3086   ⊆ wss 3895  {csn 4583  ⟨cop 4589  ∪ ciun 4950   class class class wbr 5102   ↦ cmpt 5185   × cxp 5648  ◡ccnv 5649  –1-1-onto→wf1o 6537  ‘cfv 6538  (class class class)co 7420  1st c1st 7999  2nd c2nd 8000  0cc0 11200   + caddc 11203   ≤ cle 11344  ℕ0cn0 12606  ...cfz 13639  ♯chash 14474  Word cword 14658   ++ cconcat 14715   substr csubstr 14788   prefix cpfx 14820
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1942  ax-6 1999  ax-7 2040  ax-8 2146  ax-9 2154  ax-10 2177  ax-11 2193  ax-12 2212  ax-ext 2732  ax-rep 5231  ax-sep 5248  ax-nul 5259  ax-pow 5326  ax-pr 5390  ax-un 7751  ax-cnex 11256  ax-resscn 11257  ax-1cn 11258  ax-icn 11259  ax-addcl 11260  ax-addrcl 11261  ax-mulcl 11262  ax-mulrcl 11263  ax-mulcom 11264  ax-addass 11265  ax-mulass 11266  ax-distr 11267  ax-i2m1 11268  ax-1ne0 11269  ax-1rid 11270  ax-rnegex 11271  ax-rrecex 11272  ax-cnre 11273  ax-pre-lttri 11274  ax-pre-lttrn 11275  ax-pre-ltadd 11276  ax-pre-mulgt0 11277
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1572  df-fal 1582  df-ex 1812  df-nf 1816  df-sb 2099  df-mo 2564  df-eu 2594  df-clab 2739  df-cleq 2752  df-clel 2835  df-nfc 2909  df-ne 2956  df-nel 3062  df-ral 3077  df-rex 3087  df-reu 3366  df-rab 3413  df-v 3452  df-sbc 3739  df-csb 3847  df-ss 3896  df-pss 4014  df-dif 4047  df-in 4091  df-un 4151  df-nul 4279  df-if 4482  df-pw 4558  df-sn 4584  df-pr 4586  df-op 4590  df-uni 4867  df-int 4907  df-iun 4952  df-br 5103  df-opab 5167  df-mpt 5186  df-tr 5212  df-id 5545  df-eprel 5550  df-po 5558  df-so 5559  df-fr 5603  df-we 5605  df-xp 5656  df-rel 5657  df-cnv 5658  df-co 5659  df-dm 5660  df-rn 5661  df-res 5662  df-ima 5663  df-pred 6304  df-ord 6365  df-on 6366  df-lim 6367  df-suc 6368  df-iota 6494  df-fun 6540  df-fn 6541  df-f 6542  df-f1 6543  df-fo 6544  df-f1o 6545  df-fv 6546  df-riota 7377  df-ov 7423  df-oprab 7424  df-mpo 7425  df-om 7878  df-1st 8001  df-2nd 8002  df-frecs 8299  df-wrecs 8330  df-recs 8379  df-rdg 8418  df-1o 8476  df-er 8717  df-en 8974  df-dom 8975  df-sdom 8976  df-fin 8977  df-card 10020  df-pnf 11345  df-mnf 11346  df-xr 11347  df-ltxr 11348  df-le 11349  df-sub 11543  df-neg 11544  df-nn 12336  df-n0 12607  df-z 12694  df-uz 12966  df-fz 13640  df-fzo 13789  df-hash 14475  df-word 14659  df-concat 14716  df-substr 14789  df-pfx 14821
This theorem is used by:  gsumwrd2dccat  33639
  Copyright terms: Public domain W3C validator