Metamath Proof Explorer


Theorem pfxccatin12lem2c

Description: Lemma for pfxccatin12lem2 and pfxccatin12lem3 . (Contributed by AV, 30-Mar-2018) (Revised by AV, 27-May-2018)

Ref Expression
Hypothesis swrdccatin2.l 𝐿 = ( ♯ ‘ 𝐴 )
Assertion pfxccatin12lem2c ( ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) ∧ ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) ) → ( ( 𝐴 ++ 𝐵 ) ∈ Word 𝑉𝑀 ∈ ( 0 ... 𝑁 ) ∧ 𝑁 ∈ ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) ) )

Proof

Step Hyp Ref Expression
1 swrdccatin2.l 𝐿 = ( ♯ ‘ 𝐴 )
2 ccatcl ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( 𝐴 ++ 𝐵 ) ∈ Word 𝑉 )
3 2 adantr ( ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) ∧ ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) ) → ( 𝐴 ++ 𝐵 ) ∈ Word 𝑉 )
4 elfz0fzfz0 ( ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) → 𝑀 ∈ ( 0 ... 𝑁 ) )
5 4 adantl ( ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) ∧ ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) ) → 𝑀 ∈ ( 0 ... 𝑁 ) )
6 elfzuz2 ( 𝑀 ∈ ( 0 ... 𝐿 ) → 𝐿 ∈ ( ℤ ‘ 0 ) )
7 fzss1 ( 𝐿 ∈ ( ℤ ‘ 0 ) → ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ⊆ ( 0 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) )
8 6 7 syl ( 𝑀 ∈ ( 0 ... 𝐿 ) → ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ⊆ ( 0 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) )
9 8 sselda ( ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) → 𝑁 ∈ ( 0 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) )
10 ccatlen ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) = ( ( ♯ ‘ 𝐴 ) + ( ♯ ‘ 𝐵 ) ) )
11 1 oveq1i ( 𝐿 + ( ♯ ‘ 𝐵 ) ) = ( ( ♯ ‘ 𝐴 ) + ( ♯ ‘ 𝐵 ) )
12 10 11 eqtr4di ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) = ( 𝐿 + ( ♯ ‘ 𝐵 ) ) )
13 12 oveq2d ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) = ( 0 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) )
14 13 eleq2d ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( 𝑁 ∈ ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) ↔ 𝑁 ∈ ( 0 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) )
15 9 14 syl5ibr ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) → ( ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) → 𝑁 ∈ ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) ) )
16 15 imp ( ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) ∧ ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) ) → 𝑁 ∈ ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) )
17 3 5 16 3jca ( ( ( 𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ) ∧ ( 𝑀 ∈ ( 0 ... 𝐿 ) ∧ 𝑁 ∈ ( 𝐿 ... ( 𝐿 + ( ♯ ‘ 𝐵 ) ) ) ) ) → ( ( 𝐴 ++ 𝐵 ) ∈ Word 𝑉𝑀 ∈ ( 0 ... 𝑁 ) ∧ 𝑁 ∈ ( 0 ... ( ♯ ‘ ( 𝐴 ++ 𝐵 ) ) ) ) )