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 33714
Description: Lemma for gsumwrd2dccat 33715. 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 6911 . . . . . . . . . 10 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (♯‘𝑤) = (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
43oveq2d 7462 . . . . . . . . 9 (𝑤 = ((1st ‘𝑎) ++ (2nd ‘𝑎)) → (0...(♯‘𝑤)) = (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
52, 4xpeq12d 5687 . . . . . . . 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 8060 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (1st ‘𝑎) ∈ Word 𝐴)
87adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (1st ‘𝑎) ∈ Word 𝐴)
9 xp2nd 8061 . . . . . . . . 9 (𝑎 ∈ (Word 𝐴 × Word 𝐴) → (2nd ‘𝑎) ∈ Word 𝐴)
109adantl 487 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (2nd ‘𝑎) ∈ Word 𝐴)
11 ccatcl 14749 . . . . . . . 8 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
128, 10, 11syl2anc 596 . . . . . . 7 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴)
13 ovex 7479 . . . . . . . . . 10 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ V
1413snid 4623 . . . . . . . . 9 ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))}
1514a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → ((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ {((1st ‘𝑎) ++ (2nd ‘𝑎))})
16 0zd 12735 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ∈ ℤ)
17 lencl 14708 . . . . . . . . . . 11 (((1st ‘𝑎) ++ (2nd ‘𝑎)) ∈ Word 𝐴 → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1812, 17syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℕ0)
1918nn0zd 12748 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) ∈ ℤ)
20 lencl 14708 . . . . . . . . . . 11 ((1st ‘𝑎) ∈ Word 𝐴 → (♯‘(1st ‘𝑎)) ∈ ℕ0)
218, 20syl 18 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℕ0)
2221nn0zd 12748 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℤ)
2321nn0ge0d 12700 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(1st ‘𝑎)))
24 lencl 14708 . . . . . . . . . . . . 13 ((2nd ‘𝑎) ∈ Word 𝐴 → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2510, 24syl 18 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℕ0)
2625nn0ge0d 12700 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 0 ≤ (♯‘(2nd ‘𝑎)))
2721nn0red 12698 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ ℝ)
2825nn0red 12698 . . . . . . . . . . . 12 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(2nd ‘𝑎)) ∈ ℝ)
2927, 28addge01d 11934 . . . . . . . . . . 11 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (0 ≤ (♯‘(2nd ‘𝑎)) ↔ (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))))
3026, 29mpbid 235 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
31 ccatlen 14750 . . . . . . . . . . 11 (((1st ‘𝑎) ∈ Word 𝐴 ∧ (2nd ‘𝑎) ∈ Word 𝐴) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
328, 10, 31syl2anc 596 . . . . . . . . . 10 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))) = ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎))))
3330, 32breqtrrd 5137 . . . . . . . . 9 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ≤ (♯‘((1st ‘𝑎) ++ (2nd ‘𝑎))))
3416, 19, 22, 23, 33elfzd 13677 . . . . . . . 8 ((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → (♯‘(1st ‘𝑎)) ∈ (0...(♯‘((1st ‘𝑎) ++ (2nd ‘𝑎)))))
3515, 34opelxpd 5695 . . . . . . 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 8060 . . . . . . . . . 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 6911 . . . . . . . . . . . 12 (𝑢 = 𝑤 → (♯‘𝑢) = (♯‘𝑤))
5352oveq2d 7462 . . . . . . . . . . 11 (𝑢 = 𝑤 → (0...(♯‘𝑢)) = (0...(♯‘𝑤)))
5451, 53xpeq12d 5687 . . . . . . . . . 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 14858 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
6058, 59syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) prefix (2nd ‘𝑏)) ∈ Word 𝐴)
61 swrdcl 14824 . . . . . 6 ((1st ‘𝑏) ∈ Word 𝐴 → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6258, 61syl 18 . . . . 5 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) ∈ Word 𝐴)
6360, 62opelxpd 5695 . . . 4 ((𝜑 ∧ 𝑏 ∈ 𝑈) → ⟨((1st ‘𝑏) prefix (2nd ‘𝑏)), ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)⟩ ∈ (Word 𝐴 × Word 𝐴))
6448adantr 486 . . . . . . . . . 10 (((𝜑 ∧ 𝑏 ∈ 𝑈) ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) → 𝑏 ∈ ∪ 𝑤 ∈ Word 𝐴({𝑤} × (0...(♯‘𝑤))))
65 eliunxp 5821 . . . . . . . . . 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 7464 . . . . . . . . . . . . . . . . 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 8038 . . . . . . . . . . . . . . . . . . . 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 8039 . . . . . . . . . . . . . . . . . . . 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 6915 . . . . . . . . . . . . . . . . . . . . 21 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘𝑢) = (♯‘(1st ‘𝑏)))
9089oveq2d 7462 . . . . . . . . . . . . . . . . . . . 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 14890 . . . . . . . . . . . . . . . . . 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 6915 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑎) = ((1st ‘𝑏) prefix (2nd ‘𝑏))) ∧ (2nd ‘𝑎) = ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩)) → (♯‘(1st ‘𝑎)) = (♯‘((1st ‘𝑏) prefix (2nd ‘𝑏))))
97 pfxlen 14864 . . . . . . . . . . . . . . . . . 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 7464 . . . . . . . . . . . . . . . . 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 14882 . . . . . . . . . . . . . . . . . 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 6915 . . . . . . . . . . . . . . . . . . . 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 7464 . . . . . . . . . . . . . . . . 17 (((((((𝜑 ∧ 𝑎 ∈ (Word 𝐴 × Word 𝐴)) ∧ 𝑏 = ⟨𝑢, 𝑛⟩) ∧ 𝑢 ∈ Word 𝐴) ∧ 𝑛 ∈ (0...(♯‘𝑢))) ∧ (1st ‘𝑏) = ((1st ‘𝑎) ++ (2nd ‘𝑎))) ∧ (2nd ‘𝑏) = (♯‘(1st ‘𝑎))) → ((1st ‘𝑏) substr ⟨(2nd ‘𝑏), (♯‘(1st ‘𝑏))⟩) = (((1st ‘𝑎) ++ (2nd ‘𝑎)) substr ⟨(♯‘(1st ‘𝑎)), ((♯‘(1st ‘𝑎)) + (♯‘(2nd ‘𝑎)))⟩))
115 swrdccat2 14850 . . . . . . . . . . . . . . . . . 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 8070 . . . . . . . 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 13786 . . . . . . . . . . . 12 (0...(♯‘𝑤)) ⊆ ℕ0
132 xpss12 5671 . . . . . . . . . . . 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 8070 . . . . . . . 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 7701 . . 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 5190   × cxp 5654  ◡ccnv 5655  ⟶1-1ontowf1o 6560  ‘cfv 6561  (class class class)co 7446  1st c1st 8026  2nd c2nd 8027  0cc0 11230   + caddc 11233   ≤ cle 11374  ℕ0cn0 12636  ...cfz 13669  ♯chash 14504  Word cword 14688   ++ cconcat 14745   substr csubstr 14819   prefix cpfx 14851
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 5236  ax-sep 5253  ax-nul 5264  ax-pow 5332  ax-pr 5396  ax-un 7778  ax-cnex 11286  ax-resscn 11287  ax-1cn 11288  ax-icn 11289  ax-addcl 11290  ax-addrcl 11291  ax-mulcl 11292  ax-mulrcl 11293  ax-mulcom 11294  ax-addass 11295  ax-mulass 11296  ax-distr 11297  ax-i2m1 11298  ax-1ne0 11299  ax-1rid 11300  ax-rnegex 11301  ax-rrecex 11302  ax-cnre 11303  ax-pre-lttri 11304  ax-pre-lttrn 11305  ax-pre-ltadd 11306  ax-pre-mulgt0 11307
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 5172  df-mpt 5191  df-tr 5217  df-id 5551  df-eprel 5556  df-po 5564  df-so 5565  df-fr 5609  df-we 5611  df-xp 5662  df-rel 5663  df-cnv 5664  df-co 5665  df-dm 5666  df-rn 5667  df-res 5668  df-ima 5669  df-pred 6325  df-ord 6386  df-on 6387  df-lim 6388  df-suc 6389  df-iota 6515  df-fun 6563  df-fn 6564  df-f 6565  df-f1 6566  df-fo 6567  df-f1o 6568  df-fv 6569  df-riota 7403  df-ov 7449  df-oprab 7450  df-mpo 7451  df-om 7905  df-1st 8028  df-2nd 8029  df-frecs 8330  df-wrecs 8361  df-recs 8410  df-rdg 8449  df-1o 8507  df-er 8748  df-en 9005  df-dom 9006  df-sdom 9007  df-fin 9008  df-card 10050  df-pnf 11375  df-mnf 11376  df-xr 11377  df-ltxr 11378  df-le 11379  df-sub 11573  df-neg 11574  df-nn 12366  df-n0 12637  df-z 12724  df-uz 12996  df-fz 13670  df-fzo 13819  df-hash 14505  df-word 14689  df-concat 14746  df-substr 14820  df-pfx 14852
This theorem is used by:  gsumwrd2dccat  33715
  Copyright terms: Public domain W3C validator