Metamath Proof Explorer


Theorem marepvval0

Description: Second 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 marepvval0 ( ( 𝑀𝐵𝐶𝑉 ) → ( 𝑀 𝑄 𝐶 ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ 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 matrcl ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ V ) )
6 5 simpld ( 𝑀𝐵𝑁 ∈ Fin )
7 6 adantr ( ( 𝑀𝐵𝐶𝑉 ) → 𝑁 ∈ Fin )
8 7 mptexd ( ( 𝑀𝐵𝐶𝑉 ) → ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) ∈ V )
9 fveq1 ( 𝑐 = 𝐶 → ( 𝑐𝑖 ) = ( 𝐶𝑖 ) )
10 9 adantl ( ( 𝑚 = 𝑀𝑐 = 𝐶 ) → ( 𝑐𝑖 ) = ( 𝐶𝑖 ) )
11 oveq ( 𝑚 = 𝑀 → ( 𝑖 𝑚 𝑗 ) = ( 𝑖 𝑀 𝑗 ) )
12 11 adantr ( ( 𝑚 = 𝑀𝑐 = 𝐶 ) → ( 𝑖 𝑚 𝑗 ) = ( 𝑖 𝑀 𝑗 ) )
13 10 12 ifeq12d ( ( 𝑚 = 𝑀𝑐 = 𝐶 ) → if ( 𝑗 = 𝑘 , ( 𝑐𝑖 ) , ( 𝑖 𝑚 𝑗 ) ) = if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) )
14 13 mpoeq3dv ( ( 𝑚 = 𝑀𝑐 = 𝐶 ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝑐𝑖 ) , ( 𝑖 𝑚 𝑗 ) ) ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
15 14 mpteq2dv ( ( 𝑚 = 𝑀𝑐 = 𝐶 ) → ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝑐𝑖 ) , ( 𝑖 𝑚 𝑗 ) ) ) ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
16 1 2 3 4 marepvfval 𝑄 = ( 𝑚𝐵 , 𝑐𝑉 ↦ ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝑐𝑖 ) , ( 𝑖 𝑚 𝑗 ) ) ) ) )
17 15 16 ovmpoga ( ( 𝑀𝐵𝐶𝑉 ∧ ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) ∈ V ) → ( 𝑀 𝑄 𝐶 ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
18 8 17 mpd3an3 ( ( 𝑀𝐵𝐶𝑉 ) → ( 𝑀 𝑄 𝐶 ) = ( 𝑘𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑗 = 𝑘 , ( 𝐶𝑖 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )