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

Theorem ccatsymb 13564
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 699 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
4 simpr 471 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → 𝐼 < (♯‘𝐴))
54anim2i 595 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (0 ≤ 𝐼𝐼 < (♯‘𝐴)))
6 simp3 1132 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
7 0zd 11591 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 0 ∈ ℤ)
8 lencl 13520 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
98nn0zd 11682 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℤ)
1093ad2ant1 1127 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℤ)
116, 7, 103jca 1122 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
1211ad2antrl 699 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
13 elfzo 12680 . . . . . . . . 9 ((𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
1412, 13syl 17 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
155, 14mpbird 247 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ (0..^(♯‘𝐴)))
16 df-3an 1073 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ (0..^(♯‘𝐴))))
173, 15, 16sylanbrc 564 . . . . . 6 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))))
18 ccatval1 13559 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐴𝐼))
1918eqcomd 2777 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2017, 19syl 17 . . . . 5 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2120ex 397 . . . 4 (0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
22 zre 11583 . . . . . . . . . 10 (𝐼 ∈ ℤ → 𝐼 ∈ ℝ)
23 0red 10243 . . . . . . . . . 10 (𝐼 ∈ ℤ → 0 ∈ ℝ)
2422, 23jca 495 . . . . . . . . 9 (𝐼 ∈ ℤ → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
25243ad2ant3 1129 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
26 ltnle 10319 . . . . . . . 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 466 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
31 simpr 471 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → 𝐼 < 0)
3231orcd 852 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼))
33 wrdsymb0 13535 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼) → (𝐴𝐼) = ∅))
3430, 32, 33sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ∅)
35 ccatcl 13556 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
36353adant3 1126 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
3736, 6jca 495 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3837adantr 466 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3931orcd 852 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
40 wrdsymb0 13535 . . . . . . . . . 10 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅))
4138, 39, 40sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
4234, 41eqtr4d 2808 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
4342ex 397 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4427, 43sylbird 250 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4544adantr 466 . . . . 5 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4645com12 32 . . . 4 (¬ 0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4721, 46pm2.61i 176 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
482ad2antrl 699 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
498nn0red 11554 . . . . . . . . . . . . . 14 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℝ)
50 lenlt 10318 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ 𝐼 ∈ ℝ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5149, 22, 50syl2an 575 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
52513adant2 1125 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5352biimpar 463 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (♯‘𝐴) ≤ 𝐼)
5453anim2i 595 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (♯‘𝐴) ≤ 𝐼))
5554ancomd 453 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
56 lencl 13520 . . . . . . . . . . . . . . 15 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℕ0)
5756nn0zd 11682 . . . . . . . . . . . . . 14 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℤ)
58 zaddcl 11619 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℤ ∧ (♯‘𝐵) ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
599, 57, 58syl2an 575 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
60593adant3 1126 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
616, 10, 603jca 1122 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
6261ad2antrl 699 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
63 elfzo 12680 . . . . . . . . . 10 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6462, 63syl 17 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6555, 64mpbird 247 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))))
66 df-3an 1073 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
6748, 65, 66sylanbrc 564 . . . . . . 7 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
68 ccatval2 13560 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
6967, 68syl 17 . . . . . 6 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
7069ex 397 . . . . 5 (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
7156nn0red 11554 . . . . . . . . . . 11 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℝ)
72 readdcl 10221 . . . . . . . . . . 11 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
7349, 71, 72syl2an 575 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
74733adant3 1126 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
75223ad2ant3 1129 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℝ)
7674, 75lenltd 10385 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
7737adantr 466 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
78 ccatlen 13557 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
79783adant3 1126 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
8079adantr 466 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
81 simpr 471 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼)
8280, 81eqbrtrd 4808 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼)
8382olcd 853 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
8477, 83, 40sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
85 simp2 1131 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐵 ∈ Word 𝑉)
86 zsubcl 11621 . . . . . . . . . . . . . . . 16 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
879, 86sylan2 572 . . . . . . . . . . . . . . 15 ((𝐼 ∈ ℤ ∧ 𝐴 ∈ Word 𝑉) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
8887ancoms 455 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
89883adant2 1125 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
9085, 89jca 495 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
9190adantr 466 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
92 leaddsub2 10707 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ ∧ 𝐼 ∈ ℝ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9349, 71, 22, 92syl3an 1163 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9493biimpa 462 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴)))
9594olcd 853 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
96 wrdsymb0 13535 . . . . . . . . . . 11 ((𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ) → (((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅))
9791, 95, 96sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅)
9884, 97eqtr4d 2808 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
9998ex 397 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10076, 99sylbird 250 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
101100adantr 466 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
102101com12 32 . . . . 5 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10370, 102pm2.61i 176 . . . 4 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
104103eqcomd 2777 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
10547, 104ifeqda 4260 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))) = ((𝐴 ++ 𝐵)‘𝐼))
106105eqcomd 2777 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 382  wo 826  w3a 1071   = wceq 1631  wcel 2145  c0 4063  ifcif 4225   class class class wbr 4786  cfv 6031  (class class class)co 6793  cr 10137  0cc0 10138   + caddc 10141   < clt 10276  cle 10277  cmin 10468  cz 11579  ..^cfzo 12673  chash 13321  Word cword 13487   ++ cconcat 13489
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-8 2147  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-rep 4904  ax-sep 4915  ax-nul 4923  ax-pow 4974  ax-pr 5034  ax-un 7096  ax-cnex 10194  ax-resscn 10195  ax-1cn 10196  ax-icn 10197  ax-addcl 10198  ax-addrcl 10199  ax-mulcl 10200  ax-mulrcl 10201  ax-mulcom 10202  ax-addass 10203  ax-mulass 10204  ax-distr 10205  ax-i2m1 10206  ax-1ne0 10207  ax-1rid 10208  ax-rnegex 10209  ax-rrecex 10210  ax-cnre 10211  ax-pre-lttri 10212  ax-pre-lttrn 10213  ax-pre-ltadd 10214  ax-pre-mulgt0 10215
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 827  df-3or 1072  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-nel 3047  df-ral 3066  df-rex 3067  df-reu 3068  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-pss 3739  df-nul 4064  df-if 4226  df-pw 4299  df-sn 4317  df-pr 4319  df-tp 4321  df-op 4323  df-uni 4575  df-int 4612  df-iun 4656  df-br 4787  df-opab 4847  df-mpt 4864  df-tr 4887  df-id 5157  df-eprel 5162  df-po 5170  df-so 5171  df-fr 5208  df-we 5210  df-xp 5255  df-rel 5256  df-cnv 5257  df-co 5258  df-dm 5259  df-rn 5260  df-res 5261  df-ima 5262  df-pred 5823  df-ord 5869  df-on 5870  df-lim 5871  df-suc 5872  df-iota 5994  df-fun 6033  df-fn 6034  df-f 6035  df-f1 6036  df-fo 6037  df-f1o 6038  df-fv 6039  df-riota 6754  df-ov 6796  df-oprab 6797  df-mpt2 6798  df-om 7213  df-1st 7315  df-2nd 7316  df-wrecs 7559  df-recs 7621  df-rdg 7659  df-1o 7713  df-oadd 7717  df-er 7896  df-en 8110  df-dom 8111  df-sdom 8112  df-fin 8113  df-card 8965  df-pnf 10278  df-mnf 10279  df-xr 10280  df-ltxr 10281  df-le 10282  df-sub 10470  df-neg 10471  df-nn 11223  df-n0 11495  df-z 11580  df-uz 11889  df-fz 12534  df-fzo 12674  df-hash 13322  df-word 13495  df-concat 13497
This theorem is referenced by:  swrdccatin2  13696
  Copyright terms: Public domain W3C validator