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

Theorem ccatsymb 14215
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 simprll 775 . . . . . . . 8 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
2 simpr 484 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → 𝐼 < (♯‘𝐴))
32anim2i 616 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (0 ≤ 𝐼𝐼 < (♯‘𝐴)))
4 simpr 484 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
5 0zd 12261 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → 0 ∈ ℤ)
6 lencl 14164 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
76nn0zd 12353 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℤ)
87ad2antrr 722 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℤ)
9 elfzo 13318 . . . . . . . . . . 11 ((𝐼 ∈ ℤ ∧ 0 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
104, 5, 8, 9syl3anc 1369 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
1110ad2antrl 724 . . . . . . . . 9 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ (0..^(♯‘𝐴)) ↔ (0 ≤ 𝐼𝐼 < (♯‘𝐴))))
123, 11mpbird 256 . . . . . . . 8 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ (0..^(♯‘𝐴)))
13 df-3an 1087 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ (0..^(♯‘𝐴))))
141, 12, 13sylanbrc 582 . . . . . . 7 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))))
15 ccatval1 14209 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐴𝐼))
1615eqcomd 2744 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
1714, 16syl 17 . . . . . 6 ((0 ≤ 𝐼 ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴))) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
1817ex 412 . . . . 5 (0 ≤ 𝐼 → ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
19 zre 12253 . . . . . . . . . 10 (𝐼 ∈ ℤ → 𝐼 ∈ ℝ)
20 0red 10909 . . . . . . . . . 10 (𝐼 ∈ ℤ → 0 ∈ ℝ)
2119, 20ltnled 11052 . . . . . . . . 9 (𝐼 ∈ ℤ → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
2221adantl 481 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐼 < 0 ↔ ¬ 0 ≤ 𝐼))
23 simpl 482 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → 𝐴 ∈ Word 𝑉)
2423anim1i 614 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
2524adantr 480 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴 ∈ Word 𝑉𝐼 ∈ ℤ))
26 animorrl 977 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼))
27 wrdsymb0 14180 . . . . . . . . . . 11 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘𝐴) ≤ 𝐼) → (𝐴𝐼) = ∅))
2825, 26, 27sylc 65 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ∅)
29 ccatcl 14205 . . . . . . . . . . . . 13 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
3029anim1i 614 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
3130adantr 480 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
32 animorrl 977 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
33 wrdsymb0 14180 . . . . . . . . . . 11 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅))
3431, 32, 33sylc 65 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
3528, 34eqtr4d 2781 . . . . . . . . 9 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < 0) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
3635ex 412 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐼 < 0 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
3722, 36sylbird 259 . . . . . . 7 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (¬ 0 ≤ 𝐼 → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
3837com12 32 . . . . . 6 (¬ 0 ≤ 𝐼 → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
3938adantrd 491 . . . . 5 (¬ 0 ≤ 𝐼 → ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼)))
4018, 39pm2.61i 182 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ 𝐼 < (♯‘𝐴)) → (𝐴𝐼) = ((𝐴 ++ 𝐵)‘𝐼))
41 simprll 775 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
42 id 22 . . . . . . . . . 10 (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → 𝐼 < ((♯‘𝐴) + (♯‘𝐵)))
436nn0red 12224 . . . . . . . . . . . . 13 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℝ)
44 lenlt 10984 . . . . . . . . . . . . 13 (((♯‘𝐴) ∈ ℝ ∧ 𝐼 ∈ ℝ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
4543, 19, 44syl2an 595 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
4645adantlr 711 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → ((♯‘𝐴) ≤ 𝐼 ↔ ¬ 𝐼 < (♯‘𝐴)))
4746biimpar 477 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (♯‘𝐴) ≤ 𝐼)
4842, 47anim12ci 613 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
49 lencl 14164 . . . . . . . . . . . . . 14 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℕ0)
5049nn0zd 12353 . . . . . . . . . . . . 13 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℤ)
51 zaddcl 12290 . . . . . . . . . . . . 13 (((♯‘𝐴) ∈ ℤ ∧ (♯‘𝐵) ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
527, 50, 51syl2an 595 . . . . . . . . . . . 12 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
5352adantr 480 . . . . . . . . . . 11 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ)
54 elfzo 13318 . . . . . . . . . . 11 ((𝐼 ∈ ℤ ∧ (♯‘𝐴) ∈ ℤ ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℤ) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
554, 8, 53, 54syl3anc 1369 . . . . . . . . . 10 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
5655ad2antrl 724 . . . . . . . . 9 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))) ↔ ((♯‘𝐴) ≤ 𝐼𝐼 < ((♯‘𝐴) + (♯‘𝐵)))))
5748, 56mpbird 256 . . . . . . . 8 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵))))
58 df-3an 1087 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) ↔ ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
5941, 57, 58sylanbrc 582 . . . . . . 7 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))))
60 ccatval2 14211 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) → ((𝐴 ++ 𝐵)‘𝐼) = (𝐵‘(𝐼 − (♯‘𝐴))))
6160eqcomd 2744 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ((♯‘𝐴)..^((♯‘𝐴) + (♯‘𝐵)))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
6259, 61syl 17 . . . . . 6 ((𝐼 < ((♯‘𝐴) + (♯‘𝐵)) ∧ (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
6362ex 412 . . . . 5 (𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼)))
6449nn0red 12224 . . . . . . . . . 10 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℝ)
65 readdcl 10885 . . . . . . . . . 10 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℝ) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
6643, 64, 65syl2an 595 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ)
67 lenlt 10984 . . . . . . . . 9 ((((♯‘𝐴) + (♯‘𝐵)) ∈ ℝ ∧ 𝐼 ∈ ℝ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
6866, 19, 67syl2an 595 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ ¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵))))
69 simplr 765 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → 𝐵 ∈ Word 𝑉)
70 simpr 484 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → 𝐼 ∈ ℤ)
717adantr 480 . . . . . . . . . . . . . . 15 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℤ)
7270, 71zsubcld 12360 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
7372adantlr 711 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐼 − (♯‘𝐴)) ∈ ℤ)
7469, 73jca 511 . . . . . . . . . . . 12 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
7574adantr 480 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ))
7643ad2antrr 722 . . . . . . . . . . . . . 14 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (♯‘𝐴) ∈ ℝ)
7764ad2antlr 723 . . . . . . . . . . . . . 14 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (♯‘𝐵) ∈ ℝ)
7819adantl 481 . . . . . . . . . . . . . 14 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → 𝐼 ∈ ℝ)
7976, 77, 78leaddsub2d 11507 . . . . . . . . . . . . 13 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 ↔ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
8079biimpa 476 . . . . . . . . . . . 12 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴)))
8180olcd 870 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))))
82 wrdsymb0 14180 . . . . . . . . . . 11 ((𝐵 ∈ Word 𝑉 ∧ (𝐼 − (♯‘𝐴)) ∈ ℤ) → (((𝐼 − (♯‘𝐴)) < 0 ∨ (♯‘𝐵) ≤ (𝐼 − (♯‘𝐴))) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅))
8375, 81, 82sylc 65 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (♯‘𝐴))) = ∅)
8430adantr 480 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝐼 ∈ ℤ))
85 ccatlen 14206 . . . . . . . . . . . . . 14 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
8685ad2antrr 722 . . . . . . . . . . . . 13 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
87 simpr 484 . . . . . . . . . . . . 13 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼)
8886, 87eqbrtrd 5092 . . . . . . . . . . . 12 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼)
8988olcd 870 . . . . . . . . . . 11 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐼 < 0 ∨ (♯‘(𝐴 ++ 𝐵)) ≤ 𝐼))
9084, 89, 33sylc 65 . . . . . . . . . 10 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → ((𝐴 ++ 𝐵)‘𝐼) = ∅)
9183, 90eqtr4d 2781 . . . . . . . . 9 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
9291ex 412 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (((♯‘𝐴) + (♯‘𝐵)) ≤ 𝐼 → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼)))
9368, 92sylbird 259 . . . . . . 7 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (¬ 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼)))
9493com12 32 . . . . . 6 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼)))
9594adantrd 491 . . . . 5 𝐼 < ((♯‘𝐴) + (♯‘𝐵)) → ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼)))
9663, 95pm2.61i 182 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) ∧ ¬ 𝐼 < (♯‘𝐴)) → (𝐵‘(𝐼 − (♯‘𝐴))) = ((𝐴 ++ 𝐵)‘𝐼))
9740, 96ifeqda 4492 . . 3 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))) = ((𝐴 ++ 𝐵)‘𝐼))
9897eqcomd 2744 . 2 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
99983impa 1108 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  wo 843  w3a 1085   = wceq 1539  wcel 2108  c0 4253  ifcif 4456   class class class wbr 5070  cfv 6418  (class class class)co 7255  cr 10801  0cc0 10802   + caddc 10805   < clt 10940  cle 10941  cmin 11135  cz 12249  ..^cfzo 13311  chash 13972  Word cword 14145   ++ cconcat 14201
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-er 8456  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-nn 11904  df-n0 12164  df-z 12250  df-uz 12512  df-fz 13169  df-fzo 13312  df-hash 13973  df-word 14146  df-concat 14202
This theorem is referenced by:  swrdccatin2  14370  frlmvscadiccat  40163
  Copyright terms: Public domain W3C validator