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

Theorem ccatsymb 13312
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 1079 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
32ad2antrl 763 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
4 simpr 477 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴)) → 𝐼 < (#‘𝐴))
54anim2i 592 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (0 ≤ 𝐼𝐼 < (#‘𝐴)))
6 simp3 1061 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
7 0zd 11340 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 0 ∈ ℤ)
8 lencl 13270 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (#‘𝐴) ∈ ℕ0)
98nn0zd 11431 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (#‘𝐴) ∈ ℤ)
1093ad2ant1 1080 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (#‘𝐴) ∈ ℤ)
116, 7, 103jca 1240 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
1211ad2antrl 763 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ))
13 elfzo 12420 . . . . . . . . 9 ((𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) → (𝐼 ∈ (0..^(#‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (#‘𝐴))))
1412, 13syl 17 . . . . . . . 8 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (𝐼 ∈ (0..^(#‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (#‘𝐴))))
155, 14mpbird 247 . . . . . . 7 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → 𝐼 ∈ (0..^(#‘𝐴)))
16 df-3an 1038 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(#‘𝐴))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ (0..^(#‘𝐴))))
173, 15, 16sylanbrc 697 . . . . . 6 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(#‘𝐴))))
18 ccatval1 13307 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(#‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐴𝐼))
1918eqcomd 2627 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(#‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2017, 19syl 17 . . . . 5 ((0 ≤ 𝐼 ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
2120ex 450 . . . 4 (0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
22 zre 11332 . . . . . . . . . 10 (𝐼 ∈ ℤ → 𝐼 ∈ ℝ)
23 0red 9992 . . . . . . . . . 10 (𝐼 ∈ ℤ → 0 ∈ ℝ)
2422, 23jca 554 . . . . . . . . 9 (𝐼 ∈ ℤ → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
25243ad2ant3 1082 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℝ ∧ 0 ∈ ℝ))
26 ltnle 10068 . . . . . . . 8 ((𝐼 ∈ ℝ ∧ 0 ∈ ℝ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
2725, 26syl 17 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
28 id 22 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
29283adant2 1078 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
3029adantr 481 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
31 simpr 477 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → 𝐼 < 0)
3231orcd 407 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (#‘𝐴) ≤ 𝐼))
33 wrdsymb0 13285 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (#‘𝐴) ≤ 𝐼) → (𝐴𝐼) = ∅))
3430, 32, 33sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ∅)
35 ccatcl 13305 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
36353adant3 1079 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
3736, 6jca 554 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3837adantr 481 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3931orcd 407 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (#‘(𝐴 ++ 𝐵)) ≤ 𝐼))
40 wrdsymb0 13285 . . . . . . . . . 10 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (#‘(𝐴 ++ 𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅))
4138, 39, 40sylc 65 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
4234, 41eqtr4d 2658 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
4342ex 450 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 < 0 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4427, 43sylbird 250 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4544adantr 481 . . . . 5 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴)) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4645com12 32 . . . 4 (¬ 0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4721, 46pm2.61i 176 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ 𝐼 < (#‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
482ad2antrl 763 . . . . . . . 8 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
498nn0red 11303 . . . . . . . . . . . . . 14 (𝐴 ∈ Word 𝑉 → (#‘𝐴) ∈ ℝ)
50 lenlt 10067 . . . . . . . . . . . . . 14 (((#‘𝐴) ∈ ℝ ∧ 𝐼 ∈ ℝ) → ((#‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (#‘𝐴)))
5149, 22, 50syl2an 494 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((#‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (#‘𝐴)))
52513adant2 1078 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((#‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (#‘𝐴)))
5352biimpar 502 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → (#‘𝐴) ≤ 𝐼)
5453anim2i 592 . . . . . . . . . 10 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → (𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ (#‘𝐴) ≤ 𝐼))
5554ancomd 467 . . . . . . . . 9 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → ((#‘𝐴) ≤ 𝐼𝐼 < ((#‘𝐴) + (#‘𝐵))))
56 lencl 13270 . . . . . . . . . . . . . . 15 (𝐵 ∈ Word 𝑉 → (#‘𝐵) ∈ ℕ0)
5756nn0zd 11431 . . . . . . . . . . . . . 14 (𝐵 ∈ Word 𝑉 → (#‘𝐵) ∈ ℤ)
58 zaddcl 11368 . . . . . . . . . . . . . 14 (((#‘𝐴) ∈ ℤ ∧ (#‘𝐵) ∈ ℤ) → ((#‘𝐴) + (#‘𝐵)) ∈ ℤ)
599, 57, 58syl2an 494 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((#‘𝐴) + (#‘𝐵)) ∈ ℤ)
60593adant3 1079 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((#‘𝐴) + (#‘𝐵)) ∈ ℤ)
616, 10, 603jca 1240 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ ((#‘𝐴) + (#‘𝐵)) ∈ ℤ))
6261ad2antrl 763 . . . . . . . . . 10 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → (𝐼 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ ((#‘𝐴) + (#‘𝐵)) ∈ ℤ))
63 elfzo 12420 . . . . . . . . . 10 ((𝐼 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ ∧ ((#‘𝐴) + (#‘𝐵)) ∈ ℤ) → (𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵))) ↔ ((#‘𝐴) ≤ 𝐼𝐼 < ((#‘𝐴) + (#‘𝐵)))))
6462, 63syl 17 . . . . . . . . 9 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → (𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵))) ↔ ((#‘𝐴) ≤ 𝐼𝐼 < ((#‘𝐴) + (#‘𝐵)))))
6555, 64mpbird 247 . . . . . . . 8 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → 𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵))))
66 df-3an 1038 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵)))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵)))))
6748, 65, 66sylanbrc 697 . . . . . . 7 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵)))))
68 ccatval2 13308 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((#‘𝐴)..^((#‘𝐴) + (#‘𝐵)))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴))))
6967, 68syl 17 . . . . . 6 ((𝐼 < ((#‘𝐴) + (#‘𝐵)) ∧ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴))))
7069ex 450 . . . . 5 (𝐼 < ((#‘𝐴) + (#‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴)))))
7156nn0red 11303 . . . . . . . . . . 11 (𝐵 ∈ Word 𝑉 → (#‘𝐵) ∈ ℝ)
72 readdcl 9970 . . . . . . . . . . 11 (((#‘𝐴) ∈ ℝ ∧ (#‘𝐵) ∈ ℝ) → ((#‘𝐴) + (#‘𝐵)) ∈ ℝ)
7349, 71, 72syl2an 494 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((#‘𝐴) + (#‘𝐵)) ∈ ℝ)
74733adant3 1079 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((#‘𝐴) + (#‘𝐵)) ∈ ℝ)
75223ad2ant3 1082 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℝ)
7674, 75lenltd 10134 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((#‘𝐴) + (#‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((#‘𝐴) + (#‘𝐵))))
7737adantr 481 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
78 ccatlen 13306 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (#‘(𝐴 ++ 𝐵)) = ((#‘𝐴) + (#‘𝐵)))
79783adant3 1079 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (#‘(𝐴 ++ 𝐵)) = ((#‘𝐴) + (#‘𝐵)))
8079adantr 481 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (#‘(𝐴 ++ 𝐵)) = ((#‘𝐴) + (#‘𝐵)))
81 simpr 477 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼)
8280, 81eqbrtrd 4640 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (#‘(𝐴 ++ 𝐵)) ≤ 𝐼)
8382olcd 408 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (𝐼 < 0 ∨ (#‘(𝐴 ++ 𝐵)) ≤ 𝐼))
8477, 83, 40sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
85 simp2 1060 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐵 ∈ Word 𝑉)
86 zsubcl 11370 . . . . . . . . . . . . . . . 16 ((𝐼 ∈ ℤ ∧ (#‘𝐴) ∈ ℤ) → (𝐼 − (#‘𝐴)) ∈ ℤ)
879, 86sylan2 491 . . . . . . . . . . . . . . 15 ((𝐼 ∈ ℤ ∧ 𝐴 ∈ Word 𝑉) → (𝐼 − (#‘𝐴)) ∈ ℤ)
8887ancoms 469 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (#‘𝐴)) ∈ ℤ)
89883adant2 1078 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (#‘𝐴)) ∈ ℤ)
9085, 89jca 554 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (#‘𝐴)) ∈ ℤ))
9190adantr 481 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (#‘𝐴)) ∈ ℤ))
92 leaddsub2 10456 . . . . . . . . . . . . . 14 (((#‘𝐴) ∈ ℝ ∧ (#‘𝐵) ∈ ℝ ∧ 𝐼 ∈ ℝ) → (((#‘𝐴) + (#‘𝐵)) ≤ 𝐼 ↔ (#‘𝐵) ≤ (𝐼 − (#‘𝐴))))
9349, 71, 22, 92syl3an 1365 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((#‘𝐴) + (#‘𝐵)) ≤ 𝐼 ↔ (#‘𝐵) ≤ (𝐼 − (#‘𝐴))))
9493biimpa 501 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (#‘𝐵) ≤ (𝐼 − (#‘𝐴)))
9594olcd 408 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → ((𝐼 − (#‘𝐴)) < 0 ∨ (#‘𝐵) ≤ (𝐼 − (#‘𝐴))))
96 wrdsymb0 13285 . . . . . . . . . . 11 ((𝐵 ∈ Word 𝑉 ∧ (𝐼 − (#‘𝐴)) ∈ ℤ) → (((𝐼 − (#‘𝐴)) < 0 ∨ (#‘𝐵) ≤ (𝐼 − (#‘𝐴))) → (𝐵‘(𝐼 − (#‘𝐴))) = ∅))
9791, 95, 96sylc 65 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (#‘𝐴))) = ∅)
9884, 97eqtr4d 2658 . . . . . . . . 9 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ((#‘𝐴) + (#‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴))))
9998ex 450 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (((#‘𝐴) + (#‘𝐵)) ≤ 𝐼 → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴)))))
10076, 99sylbird 250 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → (¬ 𝐼 < ((#‘𝐴) + (#‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴)))))
101100adantr 481 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → (¬ 𝐼 < ((#‘𝐴) + (#‘𝐵)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴)))))
102101com12 32 . . . . 5 𝐼 < ((#‘𝐴) + (#‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴)))))
10370, 102pm2.61i 176 . . . 4 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (#‘𝐴))))
104103eqcomd 2627 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (#‘𝐴)) → (𝐵‘(𝐼 − (#‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
10547, 104ifeqda 4098 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → if(𝐼 < (#‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (#‘𝐴)))) = ((𝐴 ++ 𝐵)‘𝐼))
106105eqcomd 2627 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (#‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (#‘𝐴)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wo 383  wa 384  w3a 1036   = wceq 1480  wcel 1987  c0 3896  ifcif 4063   class class class wbr 4618  cfv 5852  (class class class)co 6610  cr 9886  0cc0 9887   + caddc 9890   < clt 10025  cle 10026  cmin 10217  cz 11328  ..^cfzo 12413  #chash 13064  Word cword 13237   ++ cconcat 13239
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6909  ax-cnex 9943  ax-resscn 9944  ax-1cn 9945  ax-icn 9946  ax-addcl 9947  ax-addrcl 9948  ax-mulcl 9949  ax-mulrcl 9950  ax-mulcom 9951  ax-addass 9952  ax-mulass 9953  ax-distr 9954  ax-i2m1 9955  ax-1ne0 9956  ax-1rid 9957  ax-rnegex 9958  ax-rrecex 9959  ax-cnre 9960  ax-pre-lttri 9961  ax-pre-lttrn 9962  ax-pre-ltadd 9963  ax-pre-mulgt0 9964
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rab 2916  df-v 3191  df-sbc 3422  df-csb 3519  df-dif 3562  df-un 3564  df-in 3566  df-ss 3573  df-pss 3575  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5644  df-ord 5690  df-on 5691  df-lim 5692  df-suc 5693  df-iota 5815  df-fun 5854  df-fn 5855  df-f 5856  df-f1 5857  df-fo 5858  df-f1o 5859  df-fv 5860  df-riota 6571  df-ov 6613  df-oprab 6614  df-mpt2 6615  df-om 7020  df-1st 7120  df-2nd 7121  df-wrecs 7359  df-recs 7420  df-rdg 7458  df-1o 7512  df-oadd 7516  df-er 7694  df-en 7907  df-dom 7908  df-sdom 7909  df-fin 7910  df-card 8716  df-pnf 10027  df-mnf 10028  df-xr 10029  df-ltxr 10030  df-le 10031  df-sub 10219  df-neg 10220  df-nn 10972  df-n0 11244  df-z 11329  df-uz 11639  df-fz 12276  df-fzo 12414  df-hash 13065  df-word 13245  df-concat 13247
This theorem is referenced by:  swrdccatin2  13431
  Copyright terms: Public domain W3C validator