Metamath Proof Explorer


Theorem marrepeval

Description: An entry of a matrix with a replaced row. (Contributed by AV, 12-Feb-2019)

Ref Expression
Hypotheses marrepfval.a 𝐴 = ( 𝑁 Mat 𝑅 )
marrepfval.b 𝐵 = ( Base ‘ 𝐴 )
marrepfval.q 𝑄 = ( 𝑁 matRRep 𝑅 )
marrepfval.z 0 = ( 0g𝑅 )
Assertion marrepeval ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → ( 𝐼 ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) 𝐽 ) = if ( 𝐼 = 𝐾 , if ( 𝐽 = 𝐿 , 𝑆 , 0 ) , ( 𝐼 𝑀 𝐽 ) ) )

Proof

Step Hyp Ref Expression
1 marrepfval.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 marrepfval.b 𝐵 = ( Base ‘ 𝐴 )
3 marrepfval.q 𝑄 = ( 𝑁 matRRep 𝑅 )
4 marrepfval.z 0 = ( 0g𝑅 )
5 1 2 3 4 marrepval ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ) → ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
6 5 3adant3 ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
7 simp3l ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → 𝐼𝑁 )
8 simpl3r ( ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) ∧ 𝑖 = 𝐼 ) → 𝐽𝑁 )
9 4 fvexi 0 ∈ V
10 ifexg ( ( 𝑆 ∈ ( Base ‘ 𝑅 ) ∧ 0 ∈ V ) → if ( 𝑗 = 𝐿 , 𝑆 , 0 ) ∈ V )
11 9 10 mpan2 ( 𝑆 ∈ ( Base ‘ 𝑅 ) → if ( 𝑗 = 𝐿 , 𝑆 , 0 ) ∈ V )
12 ovexd ( 𝑆 ∈ ( Base ‘ 𝑅 ) → ( 𝑖 𝑀 𝑗 ) ∈ V )
13 11 12 ifcld ( 𝑆 ∈ ( Base ‘ 𝑅 ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ∈ V )
14 13 adantl ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ∈ V )
15 14 3ad2ant1 ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ∈ V )
16 15 adantr ( ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) ∧ ( 𝑖 = 𝐼𝑗 = 𝐽 ) ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ∈ V )
17 eqeq1 ( 𝑖 = 𝐼 → ( 𝑖 = 𝐾𝐼 = 𝐾 ) )
18 17 adantr ( ( 𝑖 = 𝐼𝑗 = 𝐽 ) → ( 𝑖 = 𝐾𝐼 = 𝐾 ) )
19 eqeq1 ( 𝑗 = 𝐽 → ( 𝑗 = 𝐿𝐽 = 𝐿 ) )
20 19 ifbid ( 𝑗 = 𝐽 → if ( 𝑗 = 𝐿 , 𝑆 , 0 ) = if ( 𝐽 = 𝐿 , 𝑆 , 0 ) )
21 20 adantl ( ( 𝑖 = 𝐼𝑗 = 𝐽 ) → if ( 𝑗 = 𝐿 , 𝑆 , 0 ) = if ( 𝐽 = 𝐿 , 𝑆 , 0 ) )
22 oveq12 ( ( 𝑖 = 𝐼𝑗 = 𝐽 ) → ( 𝑖 𝑀 𝑗 ) = ( 𝐼 𝑀 𝐽 ) )
23 18 21 22 ifbieq12d ( ( 𝑖 = 𝐼𝑗 = 𝐽 ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) = if ( 𝐼 = 𝐾 , if ( 𝐽 = 𝐿 , 𝑆 , 0 ) , ( 𝐼 𝑀 𝐽 ) ) )
24 23 adantl ( ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) ∧ ( 𝑖 = 𝐼𝑗 = 𝐽 ) ) → if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) = if ( 𝐼 = 𝐾 , if ( 𝐽 = 𝐿 , 𝑆 , 0 ) , ( 𝐼 𝑀 𝐽 ) ) )
25 7 8 16 24 ovmpodv2 ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → ( ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 𝑆 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) → ( 𝐼 ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) 𝐽 ) = if ( 𝐼 = 𝐾 , if ( 𝐽 = 𝐿 , 𝑆 , 0 ) , ( 𝐼 𝑀 𝐽 ) ) ) )
26 6 25 mpd ( ( ( 𝑀𝐵𝑆 ∈ ( Base ‘ 𝑅 ) ) ∧ ( 𝐾𝑁𝐿𝑁 ) ∧ ( 𝐼𝑁𝐽𝑁 ) ) → ( 𝐼 ( 𝐾 ( 𝑀 𝑄 𝑆 ) 𝐿 ) 𝐽 ) = if ( 𝐼 = 𝐾 , if ( 𝐽 = 𝐿 , 𝑆 , 0 ) , ( 𝐼 𝑀 𝐽 ) ) )