Metamath Proof Explorer


Theorem ccatval1OLD

Description: Obsolete version of ccatval1 as of 18-Jan-2024. Value of a symbol in the left half of a concatenated word. (Contributed by Stefan O'Rear, 15-Aug-2015) (Revised by Mario Carneiro, 22-Sep-2015) (Proof shortened by AV, 30-Apr-2020) (Proof modification is discouraged.) (New usage is discouraged.)

Ref Expression
Assertion ccatval1OLD ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → ( ( 𝑆 ++ 𝑇 ) ‘ 𝐼 ) = ( 𝑆𝐼 ) )

Proof

Step Hyp Ref Expression
1 ccatfval ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵 ) → ( 𝑆 ++ 𝑇 ) = ( 𝑥 ∈ ( 0 ..^ ( ( ♯ ‘ 𝑆 ) + ( ♯ ‘ 𝑇 ) ) ) ↦ if ( 𝑥 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝑥 ) , ( 𝑇 ‘ ( 𝑥 − ( ♯ ‘ 𝑆 ) ) ) ) ) )
2 1 3adant3 ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → ( 𝑆 ++ 𝑇 ) = ( 𝑥 ∈ ( 0 ..^ ( ( ♯ ‘ 𝑆 ) + ( ♯ ‘ 𝑇 ) ) ) ↦ if ( 𝑥 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝑥 ) , ( 𝑇 ‘ ( 𝑥 − ( ♯ ‘ 𝑆 ) ) ) ) ) )
3 eleq1 ( 𝑥 = 𝐼 → ( 𝑥 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ↔ 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) )
4 fveq2 ( 𝑥 = 𝐼 → ( 𝑆𝑥 ) = ( 𝑆𝐼 ) )
5 fvoveq1 ( 𝑥 = 𝐼 → ( 𝑇 ‘ ( 𝑥 − ( ♯ ‘ 𝑆 ) ) ) = ( 𝑇 ‘ ( 𝐼 − ( ♯ ‘ 𝑆 ) ) ) )
6 3 4 5 ifbieq12d ( 𝑥 = 𝐼 → if ( 𝑥 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝑥 ) , ( 𝑇 ‘ ( 𝑥 − ( ♯ ‘ 𝑆 ) ) ) ) = if ( 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝐼 ) , ( 𝑇 ‘ ( 𝐼 − ( ♯ ‘ 𝑆 ) ) ) ) )
7 iftrue ( 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) → if ( 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝐼 ) , ( 𝑇 ‘ ( 𝐼 − ( ♯ ‘ 𝑆 ) ) ) ) = ( 𝑆𝐼 ) )
8 7 3ad2ant3 ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → if ( 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝐼 ) , ( 𝑇 ‘ ( 𝐼 − ( ♯ ‘ 𝑆 ) ) ) ) = ( 𝑆𝐼 ) )
9 6 8 sylan9eqr ( ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) ∧ 𝑥 = 𝐼 ) → if ( 𝑥 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) , ( 𝑆𝑥 ) , ( 𝑇 ‘ ( 𝑥 − ( ♯ ‘ 𝑆 ) ) ) ) = ( 𝑆𝐼 ) )
10 simp3 ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) )
11 lencl ( 𝑇 ∈ Word 𝐵 → ( ♯ ‘ 𝑇 ) ∈ ℕ0 )
12 11 3ad2ant2 ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → ( ♯ ‘ 𝑇 ) ∈ ℕ0 )
13 elfzoext ( ( 𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ∧ ( ♯ ‘ 𝑇 ) ∈ ℕ0 ) → 𝐼 ∈ ( 0 ..^ ( ( ♯ ‘ 𝑆 ) + ( ♯ ‘ 𝑇 ) ) ) )
14 10 12 13 syl2anc ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → 𝐼 ∈ ( 0 ..^ ( ( ♯ ‘ 𝑆 ) + ( ♯ ‘ 𝑇 ) ) ) )
15 fvexd ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → ( 𝑆𝐼 ) ∈ V )
16 2 9 14 15 fvmptd ( ( 𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ( 0 ..^ ( ♯ ‘ 𝑆 ) ) ) → ( ( 𝑆 ++ 𝑇 ) ‘ 𝐼 ) = ( 𝑆𝐼 ) )