Metamath Proof Explorer


Theorem marepvval

Description: Third substitution for the definition of the function replacing a column of a matrix by a vector. (Contributed by AV, 14-Feb-2019) (Revised by AV, 26-Feb-2019)

Ref Expression
Hypotheses marepvfval.a 𝐴 = ( 𝑁 Mat 𝑅 )
marepvfval.b 𝐵 = ( Base ‘ 𝐴 )
marepvfval.q 𝑄 = ( 𝑁 matRepV 𝑅 )
marepvfval.v 𝑉 = ( ( Base ‘ 𝑅 ) ↑m 𝑁 )
Assertion marepvval ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( ( 𝑀 𝑄 𝐶 ) ‘ 𝐾 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )

Proof

Step Hyp Ref Expression
1 marepvfval.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 marepvfval.b 𝐵 = ( Base ‘ 𝐴 )
3 marepvfval.q 𝑄 = ( 𝑁 matRepV 𝑅 )
4 marepvfval.v 𝑉 = ( ( Base ‘ 𝑅 ) ↑m 𝑁 )
5 1 2 3 4 marepvval0 ( ( 𝑀𝐵𝐶𝑉 ) → ( 𝑀 𝑄 𝐶 ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
6 5 3adant3 ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( 𝑀 𝑄 𝐶 ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
7 6 fveq1d ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( ( 𝑀 𝑄 𝐶 ) ‘ 𝐾 ) = ( ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) ‘ 𝐾 ) )
8 eqid ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
9 eqeq2 ( 𝑘 = 𝐾 → ( 𝑗 = 𝑘𝑗 = 𝐾 ) )
10 9 ifbid ( 𝑘 = 𝐾 → if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) = if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) )
11 10 mpoeq3dv ( 𝑘 = 𝐾 → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
12 simp3 ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → 𝐾𝑁 )
13 1 2 matrcl ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ V ) )
14 13 simpld ( 𝑀𝐵𝑁 ∈ Fin )
15 14 14 jca ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) )
16 15 3ad2ant1 ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) )
17 mpoexga ( ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ∈ V )
18 16 17 syl ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ∈ V )
19 8 11 12 18 fvmptd3 ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) ‘ 𝐾 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
20 7 19 eqtrd ( ( 𝑀𝐵𝐶𝑉𝐾𝑁 ) → ( ( 𝑀 𝑄 𝐶 ) ‘ 𝐾 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝐾 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )