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 33705
Description: Lemma for gsumwrd2dccat 33706. 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-1onto𝑈 ∧ ◡𝐹 = 𝐺))
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 4594 . . . . . . . . 9 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → {𝑤} = {((1st ‘𝑎) ++ (2nd ‘𝑎))})
3 fveq2 6905 . . . . . . . . . 10 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (♯‘𝑤) = (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
43oveq2d 7456 . . . . . . . . 9 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (0...(♯‘𝑤)) = (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
52, 4xpeq12d 5686 . . . . . . . 8 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → ({𝑤} × (0...(♯‘𝑤))) = ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))))
65eleq2d 2850 . . . . . . 7 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({𝑤} × (0...(♯‘𝑤))) ↔ ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))))
7 xp1st 8054 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (1st ‘𝑎) ∈ Word 𝐴)
87adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (1st ‘𝑎) ∈ Word 𝐴)
9 xp2nd 8055 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (2nd ‘𝑎) ∈ Word 𝐴)
109adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (2nd ‘𝑎) ∈ Word 𝐴)
11 ccatcl 14743 . . . . . . . 8 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
128, 10, 11syl2anc 596 . . . . . . 7 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
13 ovex 7473 . . . . . . . . . 10 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ V
1413snid 4623 . . . . . . . . 9 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))}
1514a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))})
16 0zd 12729 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ∈ ℤ)
17 lencl 14702 . . . . . . . . . . 11 (((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴 → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1812, 17syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1918nn0zd 12742 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℤ)
20 lencl 14702 . . . . . . . . . . 11 ((1st ‘𝑎) ∈ Word 𝐴 → (♯‘(1st ‘𝑎)) ∈ ℕ0)
218, 20syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℕ0)
2221nn0zd 12742 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℤ)
2321nn0ge0d 12694 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(1st ‘𝑎)))
24 lencl 14702 . . . . . . . . . . . . 13 ((2nd ‘𝑎) ∈ Word 𝐴 → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2510, 24syl 18 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2625nn0ge0d 12694 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(2nd ‘𝑎)))
2721nn0red 12692 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℝ)
2825nn0red 12692 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℝ)
2927, 28addge01d 11928 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (0 ≤ (♯‘(2nd ‘𝑎)) ↔ (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))))
3026, 29mpbid 235 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
31 ccatlen 14744 . . . . . . . . . . 11 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
328, 10, 31syl2anc 596 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
3330, 32breqtrrd 5136 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
3416, 19, 22, 23, 33elfzd 13671 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
3515, 34opelxpd 5694 . . . . . . 7 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({((1st ‘𝑎) ++ (2nd ‘𝑎))} × (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))))
366, 12, 35rspcedvdw 3583 . . . . . 6 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∃𝑤 ∈ Word 𝐴⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ({𝑤} × (0...(♯‘𝑤))))
3736eliund 4961 . . . . 5 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
38 gsumwrd2dccatlem.u . . . . 5 𝑈 = ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤)))
3937, 38eleqtrrdi 2875 . . . 4 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ⟨((1st ‘𝑎) ++ (2nd ‘𝑎)), (♯‘(1st ‘𝑎))⟩ ∈ 𝑈)
40 simpr 490 . . . . . . . . . 10 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))))
41 xp1st 8054 . . . . . . . . . 10 (𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) → (1st ‘𝑏) ∈ {𝑢})
42 elsni 4601 . . . . . . . . . 10 ((1st ‘𝑏) ∈ {𝑢} → (1st ‘𝑏) = 𝑢)
4340, 41, 423syl 19 . . . . . . . . 9 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) = 𝑢)
44 simplr 781 . . . . . . . . 9 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → 𝑢 ∈ Word 𝐴)
4543, 44eqeltrd 2864 . . . . . . . 8 (((𝜑 ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) ∈ Word 𝐴)
4645adantllr 732 . . . . . . 7 ((((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑏 ∈ ({𝑢} × (0...(♯‘𝑢)))) → (1st ‘𝑏) ∈ Word 𝐴)
4738eleq2i 2856 . . . . . . . . . 10 (𝑏 ∈ 𝑈 ↔ 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
4847bilani 510 . . . . . . . . 9 ((𝜑 ∧ 𝑏 ∈ 𝑈) → 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
49 eliun 4958 . . . . . . . . 9 (𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ↔ ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
5048, 49sylib 221 . . . . . . . 8 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
51 sneq 4594 . . . . . . . . . . 11 (𝑢 = 𝑤 → {𝑢} = {𝑤})
52 fveq2 6905 . . . . . . . . . . . 12 (𝑢 = 𝑤 → (♯‘𝑢) = (♯‘𝑤))
5352oveq2d 7456 . . . . . . . . . . 11 (𝑢 = 𝑤 → (0...(♯‘𝑢)) = (0...(♯‘𝑤)))
5451, 53xpeq12d 5686 . . . . . . . . . 10 (𝑢 = 𝑤 → ({𝑢} × (0...(♯‘𝑢))) = ({𝑤} × (0...(♯‘𝑤))))
5554eleq2d 2850 . . . . . . . . 9 (𝑢 = 𝑤 → (𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) ↔ 𝑏 ∈ ({𝑤} × (0...(♯‘𝑤)))))
5655cbvrexvw 3245 . . . . . . . 8 (∃𝑢 ∈ Word 𝐴𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))) ↔ ∃𝑤 ∈ Word 𝐴𝑏 ∈ ({𝑤} × (0...(♯‘𝑤))))
5750, 56sylibr 237 . . . . . . 7 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ∃𝑢 ∈ Word 𝐴𝑏 ∈ ({𝑢} × (0...(♯‘𝑢))))
5846, 57r19.29a 3174 . . . . . 6 ((𝜑 ∧ 𝑏 ∈ 𝑈) → (1st ‘𝑏) ∈ Word 𝐴)
59 pfxcl 14852 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
6058, 59syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
61 swrdcl 14818 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6258, 61syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6360, 62opelxpd 5694 . . . 4 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ∈ (Word 𝐴 × Word 𝐴))
6448adantr 486 . . . . . . . . . 10 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
65 eliunxp 5819 . . . . . . . . . 10 (𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ↔ ∃𝑤∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
6664, 65sylib 221 . . . . . . . . 9 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∃𝑤∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
67 opeq1 4843 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → ⟨𝑢, 𝑛⟩ = ⟨𝑤, 𝑛⟩)
6867eqeq2d 2774 . . . . . . . . . . . 12 (𝑢 = 𝑤 → (𝑏 = ⟨𝑢, 𝑛⟩ ↔ 𝑏 = ⟨𝑤, 𝑛⟩))
69 eleq1w 2847 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → (𝑢 ∈ Word 𝐴 ↔ 𝑤 ∈ Word 𝐴))
7053eleq2d 2850 . . . . . . . . . . . . 13 (𝑢 = 𝑤 → (𝑛 ∈ (0...(♯‘𝑢)) ↔ 𝑛 ∈ (0...(♯‘𝑤))))
7169, 70anbi12d 644 . . . . . . . . . . . 12 (𝑢 = 𝑤 → ((𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢))) ↔ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤)))))
7268, 71anbi12d 644 . . . . . . . . . . 11 (𝑢 = 𝑤 → ((𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) ↔ (𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤))))))
7372exbidv 1956 . . . . . . . . . 10 (𝑢 = 𝑤 → (∃𝑛(𝑏 = ⟨𝑢, 𝑛⟩ ∧ (𝑢 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑢)))) ↔ ∃𝑛(𝑏 = ⟨𝑤, 𝑛⟩ ∧ (𝑤 ∈ Word 𝐴 ∧ 𝑛 ∈ (0...(♯‘𝑤))))))
7473cbvexvw 2072 . . . . . . . . 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 7458 . . . . . . . . . . . . . . . . 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 3458 . . . . . . . . . . . . . . . . . . . . 21 𝑢 ∈ V
80 vex 3458 . . . . . . . . . . . . . . . . . . . . 21 𝑛 ∈ V
8179, 80op1std 8032 . . . . . . . . . . . . . . . . . . . 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 2864 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑏) ∈ Word 𝐴)
8579, 80op2ndd 8033 . . . . . . . . . . . . . . . . . . . 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 2769 . . . . . . . . . . . . . . . . . . . . . 22 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑢 = (1st ‘𝑏))
8988fveq2d 6909 . . . . . . . . . . . . . . . . . . . . 21 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘𝑢) = (♯‘(1st ‘𝑏)))
9089oveq2d 7456 . . . . . . . . . . . . . . . . . . . 20 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (0...(♯‘𝑢)) = (0...(♯‘(1st ‘𝑏))))
9187, 90eleqtrd 2866 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → 𝑛 ∈ (0...(♯‘(1st ‘𝑏))))
9286, 91eqeltrd 2864 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (2nd ‘𝑏) ∈ (0...(♯‘(1st ‘𝑏))))
93 pfxcctswrd 14884 . . . . . . . . . . . . . . . . . 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 2799 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)))
9676fveq2d 6909 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘(1st ‘𝑎)) = (♯‘((1st ‘𝑏) prefix (2nd ‘𝑏))))
97 pfxlen 14858 . . . . . . . . . . . . . . . . . 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 2799 . . . . . . . . . . . . . . . 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 7458 . . . . . . . . . . . . . . . . 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 14876 . . . . . . . . . . . . . . . . . 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 2799 . . . . . . . . . . . . . . . 16 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)))
110102fveq2d 6909 . . . . . . . . . . . . . . . . . . . 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 2798 . . . . . . . . . . . . . . . . . . 19 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → (♯‘(1st ‘𝑏)) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
113103, 112opeq12d 4851 . . . . . . . . . . . . . . . . . 18 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩ = ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩)
114102, 113oveq12d 7458 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) = (((1st ‘𝑎) ++ (2nd ‘𝑎)) substr ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩))
115 swrdccat2 14844 . . . . . . . . . . . . . . . . . 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 2799 . . . . . . . . . . . . . . . 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 1968 . . . . . . . . 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 1970 . . . . . . 7 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (((1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) ↔ ((1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎)))))
127 eqop 8064 . . . . . . . 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 4746 . . . . . . . . . . . . 13 (𝑤 ∈ Word 𝐴 → {𝑤} ⊆ Word 𝐴)
130129adantl 487 . . . . . . . . . . . 12 (((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑤 ∈ Word 𝐴) → {𝑤} ⊆ Word 𝐴)
131 fz0ssnn0 13780 . . . . . . . . . . . 12 (0...(♯‘𝑤)) ⊆ ℕ0
132 xpss12 5670 . . . . . . . . . . . 12 (({𝑤} ⊆ Word 𝐴 ∧ (0...(♯‘𝑤)) ⊆ ℕ0) → ({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
133130, 131, 132sylancl 598 . . . . . . . . . . 11 (((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑤 ∈ Word 𝐴) → ({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
134133iunssd 5012 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
135134adantlr 728 . . . . . . . . 9 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))) ⊆ (Word 𝐴 × ℕ0))
136135, 64sseldd 3914 . . . . . . . 8 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 𝑏 ∈ (Word 𝐴 × ℕ0))
137 eqop 8064 . . . . . . . 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 7695 . . 3 (𝜑 → (𝐹:(Word 𝐴 × Word 𝐴)⟶1-1onto𝑈 ∧ ◡𝐹 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩)))
143142simpld 500 . 2 (𝜑 → 𝐹:(Word 𝐴 × Word 𝐴)⟶1-1onto𝑈)
144142simprd 501 . . 3 (𝜑 → ◡𝐹 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩))
145 gsumwrd2dccatlem.g . . 3 𝐺 = (𝑏 ∈ 𝑈 ↦ ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩)
146144, 145eqtr4di 2816 . 2 (𝜑 → ◡𝐹 = 𝐺)
147143, 146jca 521 1 (𝜑 → (𝐹:(Word 𝐴 × Word 𝐴)⟶1-1onto𝑈 ∧ ◡𝐹 = 𝐺))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   = wceq 1570  ∃wex 1812   ∈ wcel 2147  ∃wrex 3090   ⊆ wss 3900  {csn 4588  ⟨cop 4838  ∪ ciun 4954   class class class wbr 5106   ↦ cmpt 5189   × cxp 5653  ◡ccnv 5654  ⟶1-1ontowf1o 6554  ‘cfv 6555  (class class class)co 7440  1st c1st 8020  2nd c2nd 8021  0cc0 11224   + caddc 11227   ≤ cle 11368  ℕ0cn0 12630  ...cfz 13663  ♯chash 14498  Word cword 14682   ++ cconcat 14739   substr csubstr 14813   prefix cpfx 14845
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-rep 5235  ax-sep 5252  ax-nul 5263  ax-pow 5331  ax-pr 5395  ax-un 7772  ax-cnex 11280  ax-resscn 11281  ax-1cn 11282  ax-icn 11283  ax-addcl 11284  ax-addrcl 11285  ax-mulcl 11286  ax-mulrcl 11287  ax-mulcom 11288  ax-addass 11289  ax-mulass 11290  ax-distr 11291  ax-i2m1 11292  ax-1ne0 11293  ax-1rid 11294  ax-rnegex 11295  ax-rrecex 11296  ax-cnre 11297  ax-pre-lttri 11298  ax-pre-lttrn 11299  ax-pre-ltadd 11300  ax-pre-mulgt0 11301
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3066  df-ral 3081  df-rex 3091  df-reu 3370  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-pss 4017  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-op 4839  df-uni 4871  df-int 4911  df-iun 4956  df-br 5107  df-opab 5171  df-mpt 5190  df-tr 5216  df-id 5550  df-eprel 5555  df-po 5563  df-so 5564  df-fr 5608  df-we 5610  df-xp 5661  df-rel 5662  df-cnv 5663  df-co 5664  df-dm 5665  df-rn 5666  df-res 5667  df-ima 5668  df-pred 6319  df-ord 6380  df-on 6381  df-lim 6382  df-suc 6383  df-iota 6509  df-fun 6557  df-fn 6558  df-f 6559  df-f1 6560  df-fo 6561  df-f1o 6562  df-fv 6563  df-riota 7397  df-ov 7443  df-oprab 7444  df-mpo 7445  df-om 7899  df-1st 8022  df-2nd 8023  df-frecs 8324  df-wrecs 8355  df-recs 8404  df-rdg 8443  df-1o 8501  df-er 8742  df-en 8999  df-dom 9000  df-sdom 9001  df-fin 9002  df-card 10044  df-pnf 11369  df-mnf 11370  df-xr 11371  df-ltxr 11372  df-le 11373  df-sub 11567  df-neg 11568  df-nn 12360  df-n0 12631  df-z 12718  df-uz 12990  df-fz 13664  df-fzo 13813  df-hash 14499  df-word 14683  df-concat 14740  df-substr 14814  df-pfx 14846
This theorem is used by:  gsumwrd2dccat  33706
  Copyright terms: Public domain W3C validator