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

Theorem ccatsymb 13546
Description: The symbol at a given position in a concatenated word. (Contributed by AV, 26-May-2018.) (Proof shortened by AV, 24-Nov-2018.)
Assertion
Ref Expression
ccatsymb ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))

Proof of Theorem ccatsymb
StepHypRef Expression
1 id 22 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
213adant3 1126 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
32ad2antrl 766 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
4 simpr 479 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → 𝐼 < (♯‘𝐴))
54anim2i 594 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (0 ≤ 𝐼𝐼 < (♯‘𝐴)))
6 simp3 1132 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
7 0zd 11573 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 0 ∈ ℤ)
8 lencl 13502 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
98nn0zd 11664 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℤ)
1093ad2ant1 1127 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℤ)
116, 7, 103jca 1122 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
1211ad2antrl 766 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
13 elfzo 12658 . . . . . . . . 9 ((𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
1412, 13syl 17 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
155, 14mpbird 247 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ (0..^(♯‘𝐴)))
16 df-3an 1074 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ (0..^(♯‘𝐴))))
173, 15, 16sylanbrc 701 . . . . . 6 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))))
18 ccatval1 13541 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐴𝐼))
1918eqcomd 2758 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2017, 19syl 17 . . . . 5 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2120ex 449 . . . 4 (0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
22 zre 11565 . . . . . . . . . 10 (𝐼 ∈ ℤ → 𝐼 ∈ ℝ)
23 0red 10225 . . . . . . . . . 10 (𝐼 ∈ ℤ → 0 ∈ ℝ)
2422, 23jca 555 . . . . . . . . 9 (𝐼 ∈ ℤ → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
25243ad2ant3 1129 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
26 ltnle 10301 . . . . . . . 8 ((𝐼 ∈ ℝ ∧ 0 ∈ ℝ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
2725, 26syl 17 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
28 id 22 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
29283adant2 1125 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
3029adantr 472 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
31 simpr 479 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → 𝐼 < 0)
3231orcd 406 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼))
33 wrdsymb0 13517 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼) → (𝐴𝐼) = ∅))
3430, 32, 33sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ∅)
35 ccatcl 13538 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
36353adant3 1126 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
3736, 6jca 555 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3837adantr 472 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3931orcd 406 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
40 wrdsymb0 13517 . . . . . . . . . 10 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅))
4138, 39, 40sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
4234, 41eqtr4d 2789 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
4342ex 449 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4427, 43sylbird 250 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4544adantr 472 . . . . 5 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4645com12 32 . . . 4 (¬ 0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4721, 46pm2.61i 176 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
482ad2antrl 766 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
498nn0red 11536 . . . . . . . . . . . . . 14 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℝ)
50 lenlt 10300 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ 𝐼 ∈ ℝ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5149, 22, 50syl2an 495 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
52513adant2 1125 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5352biimpar 503 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (♯‘𝐴) ≤ 𝐼)
5453anim2i 594 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (♯‘𝐴) ≤ 𝐼))
5554ancomd 466 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
56 lencl 13502 . . . . . . . . . . . . . . 15 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℕ0)
5756nn0zd 11664 . . . . . . . . . . . . . 14 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℤ)
58 zaddcl 11601 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℤ ∧ (♯‘𝐵) ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
599, 57, 58syl2an 495 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
60593adant3 1126 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
616, 10, 603jca 1122 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
6261ad2antrl 766 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
63 elfzo 12658 . . . . . . . . . 10 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6462, 63syl 17 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6555, 64mpbird 247 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))))
66 df-3an 1074 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
6748, 65, 66sylanbrc 701 . . . . . . 7 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
68 ccatval2 13542 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
6967, 68syl 17 . . . . . 6 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
7069ex 449 . . . . 5 (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
7156nn0red 11536 . . . . . . . . . . 11 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℝ)
72 readdcl 10203 . . . . . . . . . . 11 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
7349, 71, 72syl2an 495 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
74733adant3 1126 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
75223ad2ant3 1129 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℝ)
7674, 75lenltd 10367 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
7737adantr 472 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
78 ccatlen 13539 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
79783adant3 1126 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
8079adantr 472 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
81 simpr 479 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼)
8280, 81eqbrtrd 4818 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼)
8382olcd 407 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
8477, 83, 40sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
85 simp2 1131 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐵 ∈ Word 𝑉)
86 zsubcl 11603 . . . . . . . . . . . . . . . 16 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
879, 86sylan2 492 . . . . . . . . . . . . . . 15 ((𝐼 ∈ ℤ ∧ 𝐴 ∈ Word 𝑉) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
8887ancoms 468 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
89883adant2 1125 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
9085, 89jca 555 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
9190adantr 472 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
92 leaddsub2 10689 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ ∧ 𝐼 ∈ ℝ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9349, 71, 22, 92syl3an 1163 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9493biimpa 502 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴)))
9594olcd 407 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
96 wrdsymb0 13517 . . . . . . . . . . 11 ((𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ) → (((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅))
9791, 95, 96sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅)
9884, 97eqtr4d 2789 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
9998ex 449 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10076, 99sylbird 250 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
101100adantr 472 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
102101com12 32 . . . . 5 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10370, 102pm2.61i 176 . . . 4 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
104103eqcomd 2758 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
10547, 104ifeqda 4257 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))) = ((𝐴 ++ 𝐵)‘𝐼))
106105eqcomd 2758 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wo 382  wa 383  w3a 1072   = wceq 1624  wcel 2131  c0 4050  ifcif 4222   class class class wbr 4796  cfv 6041  (class class class)co 6805  cr 10119  0cc0 10120   + caddc 10123   < clt 10258  cle 10259  cmin 10450  cz 11561  ..^cfzo 12651  chash 13303  Word cword 13469   ++ cconcat 13471
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1863  ax-4 1878  ax-5 1980  ax-6 2046  ax-7 2082  ax-8 2133  ax-9 2140  ax-10 2160  ax-11 2175  ax-12 2188  ax-13 2383  ax-ext 2732  ax-rep 4915  ax-sep 4925  ax-nul 4933  ax-pow 4984  ax-pr 5047  ax-un 7106  ax-cnex 10176  ax-resscn 10177  ax-1cn 10178  ax-icn 10179  ax-addcl 10180  ax-addrcl 10181  ax-mulcl 10182  ax-mulrcl 10183  ax-mulcom 10184  ax-addass 10185  ax-mulass 10186  ax-distr 10187  ax-i2m1 10188  ax-1ne0 10189  ax-1rid 10190  ax-rnegex 10191  ax-rrecex 10192  ax-cnre 10193  ax-pre-lttri 10194  ax-pre-lttrn 10195  ax-pre-ltadd 10196  ax-pre-mulgt0 10197
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1073  df-3an 1074  df-tru 1627  df-ex 1846  df-nf 1851  df-sb 2039  df-eu 2603  df-mo 2604  df-clab 2739  df-cleq 2745  df-clel 2748  df-nfc 2883  df-ne 2925  df-nel 3028  df-ral 3047  df-rex 3048  df-reu 3049  df-rab 3051  df-v 3334  df-sbc 3569  df-csb 3667  df-dif 3710  df-un 3712  df-in 3714  df-ss 3721  df-pss 3723  df-nul 4051  df-if 4223  df-pw 4296  df-sn 4314  df-pr 4316  df-tp 4318  df-op 4320  df-uni 4581  df-int 4620  df-iun 4666  df-br 4797  df-opab 4857  df-mpt 4874  df-tr 4897  df-id 5166  df-eprel 5171  df-po 5179  df-so 5180  df-fr 5217  df-we 5219  df-xp 5264  df-rel 5265  df-cnv 5266  df-co 5267  df-dm 5268  df-rn 5269  df-res 5270  df-ima 5271  df-pred 5833  df-ord 5879  df-on 5880  df-lim 5881  df-suc 5882  df-iota 6004  df-fun 6043  df-fn 6044  df-f 6045  df-f1 6046  df-fo 6047  df-f1o 6048  df-fv 6049  df-riota 6766  df-ov 6808  df-oprab 6809  df-mpt2 6810  df-om 7223  df-1st 7325  df-2nd 7326  df-wrecs 7568  df-recs 7629  df-rdg 7667  df-1o 7721  df-oadd 7725  df-er 7903  df-en 8114  df-dom 8115  df-sdom 8116  df-fin 8117  df-card 8947  df-pnf 10260  df-mnf 10261  df-xr 10262  df-ltxr 10263  df-le 10264  df-sub 10452  df-neg 10453  df-nn 11205  df-n0 11477  df-z 11562  df-uz 11872  df-fz 12512  df-fzo 12652  df-hash 13304  df-word 13477  df-concat 13479
This theorem is referenced by:  swrdccatin2  13679
  Copyright terms: Public domain W3C validator