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

Theorem ccatsymb 13553
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 1162 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
32ad2antrl 719 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
4 simpr 477 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → 𝐼 < (♯‘𝐴))
54anim2i 610 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (0 ≤ 𝐼𝐼 < (♯‘𝐴)))
6 simp3 1168 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
7 0zd 11636 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 0 ∈ ℤ)
8 lencl 13505 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
98nn0zd 11727 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℤ)
1093ad2ant1 1163 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℤ)
116, 7, 103jca 1158 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
1211ad2antrl 719 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ))
13 elfzo 12680 . . . . . . . . 9 ((𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
1412, 13syl 17 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
155, 14mpbird 248 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ (0..^(♯‘𝐴)))
16 df-3an 1109 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ (0..^(♯‘𝐴))))
173, 15, 16sylanbrc 578 . . . . . 6 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))))
18 ccatval1 13548 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐴𝐼))
1918eqcomd 2771 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2017, 19syl 17 . . . . 5 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2120ex 401 . . . 4 (0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
22 zre 11628 . . . . . . . . . 10 (𝐼 ∈ ℤ → 𝐼 ∈ ℝ)
23 0red 10297 . . . . . . . . . 10 (𝐼 ∈ ℤ → 0 ∈ ℝ)
2422, 23jca 507 . . . . . . . . 9 (𝐼 ∈ ℤ → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
25243ad2ant3 1165 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
26 ltnle 10371 . . . . . . . 8 ((𝐼 ∈ ℝ ∧ 0 ∈ ℝ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
2725, 26syl 17 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
28 id 22 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
29283adant2 1161 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
3029adantr 472 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
31 simpr 477 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → 𝐼 < 0)
3231orcd 899 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼))
33 wrdsymb0 13520 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼) → (𝐴𝐼) = ∅))
3430, 32, 33sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ∅)
35 ccatcl 13545 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
36353adant3 1162 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
3736, 6jca 507 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3837adantr 472 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3931orcd 899 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
40 wrdsymb0 13520 . . . . . . . . . 10 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅))
4138, 39, 40sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
4234, 41eqtr4d 2802 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
4342ex 401 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4427, 43sylbird 251 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4544adantr 472 . . . . 5 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4645com12 32 . . . 4 (¬ 0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4721, 46pm2.61i 176 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
482ad2antrl 719 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
498nn0red 11599 . . . . . . . . . . . . . 14 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℝ)
50 lenlt 10370 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ 𝐼 ∈ ℝ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5149, 22, 50syl2an 589 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
52513adant2 1161 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
5352biimpar 469 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (♯‘𝐴) ≤ 𝐼)
5453anim2i 610 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (♯‘𝐴) ≤ 𝐼))
5554ancomd 453 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
56 lencl 13505 . . . . . . . . . . . . . . 15 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℕ0)
5756nn0zd 11727 . . . . . . . . . . . . . 14 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℤ)
58 zaddcl 11664 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℤ ∧ (♯‘𝐵) ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
599, 57, 58syl2an 589 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
60593adant3 1162 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
616, 10, 603jca 1158 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
6261ad2antrl 719 . . . . . . . . . 10 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ))
63 elfzo 12680 . . . . . . . . . 10 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6462, 63syl 17 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
6555, 64mpbird 248 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))))
66 df-3an 1109 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
6748, 65, 66sylanbrc 578 . . . . . . 7 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
68 ccatval2 13549 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
6967, 68syl 17 . . . . . 6 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
7069ex 401 . . . . 5 (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
7156nn0red 11599 . . . . . . . . . . 11 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℝ)
72 readdcl 10272 . . . . . . . . . . 11 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
7349, 71, 72syl2an 589 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
74733adant3 1162 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
75223ad2ant3 1165 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℝ)
7674, 75lenltd 10437 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
7737adantr 472 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
78 ccatlen 13546 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
79783adant3 1162 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
8079adantr 472 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
81 simpr 477 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼)
8280, 81eqbrtrd 4831 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼)
8382olcd 900 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
8477, 83, 40sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
85 simp2 1167 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐵 ∈ Word 𝑉)
86 zsubcl 11666 . . . . . . . . . . . . . . . 16 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
879, 86sylan2 586 . . . . . . . . . . . . . . 15 ((𝐼 ∈ ℤ ∧ 𝐴 ∈ Word 𝑉) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
8887ancoms 450 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
89883adant2 1161 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
9085, 89jca 507 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
9190adantr 472 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
92 leaddsub2 10759 . . . . . . . . . . . . . 14 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ ∧ 𝐼 ∈ ℝ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9349, 71, 22, 92syl3an 1199 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
9493biimpa 468 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴)))
9594olcd 900 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
96 wrdsymb0 13520 . . . . . . . . . . 11 ((𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ) → (((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅))
9791, 95, 96sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅)
9884, 97eqtr4d 2802 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
9998ex 401 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10076, 99sylbird 251 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
101100adantr 472 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
102101com12 32 . . . . 5 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴)))))
10370, 102pm2.61i 176 . . . 4 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
104103eqcomd 2771 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
10547, 104ifeqda 4278 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))) = ((𝐴 ++ 𝐵)‘𝐼))
106105eqcomd 2771 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 197  wa 384  wo 873  w3a 1107   = wceq 1652  wcel 2155  c0 4079  ifcif 4243   class class class wbr 4809  cfv 6068  (class class class)co 6842  cr 10188  0cc0 10189   + caddc 10192   < clt 10328  cle 10329  cmin 10520  cz 11624  ..^cfzo 12673  chash 13321  Word cword 13486   ++ cconcat 13541
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2069  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-rep 4930  ax-sep 4941  ax-nul 4949  ax-pow 5001  ax-pr 5062  ax-un 7147  ax-cnex 10245  ax-resscn 10246  ax-1cn 10247  ax-icn 10248  ax-addcl 10249  ax-addrcl 10250  ax-mulcl 10251  ax-mulrcl 10252  ax-mulcom 10253  ax-addass 10254  ax-mulass 10255  ax-distr 10256  ax-i2m1 10257  ax-1ne0 10258  ax-1rid 10259  ax-rnegex 10260  ax-rrecex 10261  ax-cnre 10262  ax-pre-lttri 10263  ax-pre-lttrn 10264  ax-pre-ltadd 10265  ax-pre-mulgt0 10266
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2062  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-nel 3041  df-ral 3060  df-rex 3061  df-reu 3062  df-rab 3064  df-v 3352  df-sbc 3597  df-csb 3692  df-dif 3735  df-un 3737  df-in 3739  df-ss 3746  df-pss 3748  df-nul 4080  df-if 4244  df-pw 4317  df-sn 4335  df-pr 4337  df-tp 4339  df-op 4341  df-uni 4595  df-int 4634  df-iun 4678  df-br 4810  df-opab 4872  df-mpt 4889  df-tr 4912  df-id 5185  df-eprel 5190  df-po 5198  df-so 5199  df-fr 5236  df-we 5238  df-xp 5283  df-rel 5284  df-cnv 5285  df-co 5286  df-dm 5287  df-rn 5288  df-res 5289  df-ima 5290  df-pred 5865  df-ord 5911  df-on 5912  df-lim 5913  df-suc 5914  df-iota 6031  df-fun 6070  df-fn 6071  df-f 6072  df-f1 6073  df-fo 6074  df-f1o 6075  df-fv 6076  df-riota 6803  df-ov 6845  df-oprab 6846  df-mpt2 6847  df-om 7264  df-1st 7366  df-2nd 7367  df-wrecs 7610  df-recs 7672  df-rdg 7710  df-1o 7764  df-oadd 7768  df-er 7947  df-en 8161  df-dom 8162  df-sdom 8163  df-fin 8164  df-card 9016  df-pnf 10330  df-mnf 10331  df-xr 10332  df-ltxr 10333  df-le 10334  df-sub 10522  df-neg 10523  df-nn 11275  df-n0 11539  df-z 11625  df-uz 11887  df-fz 12534  df-fzo 12674  df-hash 13322  df-word 13487  df-concat 13542
This theorem is referenced by:  swrdccatin2  13734
  Copyright terms: Public domain W3C validator