Metamath Proof Explorer


Theorem marrepval0

Description: Second substitution for the definition of the matrix row replacement function. (Contributed by AV, 12-Feb-2019)

Ref Expression
Hypotheses marrepfval.a
|- A = ( N Mat R )
marrepfval.b
|- B = ( Base ` A )
marrepfval.q
|- Q = ( N matRRep R )
marrepfval.z
|- .0. = ( 0g ` R )
Assertion marrepval0
|- ( ( M e. B /\ S e. ( Base ` R ) ) -> ( M Q S ) = ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) )

Proof

Step Hyp Ref Expression
1 marrepfval.a
 |-  A = ( N Mat R )
2 marrepfval.b
 |-  B = ( Base ` A )
3 marrepfval.q
 |-  Q = ( N matRRep R )
4 marrepfval.z
 |-  .0. = ( 0g ` R )
5 1 2 matrcl
 |-  ( M e. B -> ( N e. Fin /\ R e. _V ) )
6 5 simpld
 |-  ( M e. B -> N e. Fin )
7 6 6 jca
 |-  ( M e. B -> ( N e. Fin /\ N e. Fin ) )
8 7 adantr
 |-  ( ( M e. B /\ S e. ( Base ` R ) ) -> ( N e. Fin /\ N e. Fin ) )
9 mpoexga
 |-  ( ( N e. Fin /\ N e. Fin ) -> ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) e. _V )
10 8 9 syl
 |-  ( ( M e. B /\ S e. ( Base ` R ) ) -> ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) e. _V )
11 ifeq1
 |-  ( s = S -> if ( j = l , s , .0. ) = if ( j = l , S , .0. ) )
12 11 adantl
 |-  ( ( m = M /\ s = S ) -> if ( j = l , s , .0. ) = if ( j = l , S , .0. ) )
13 oveq
 |-  ( m = M -> ( i m j ) = ( i M j ) )
14 13 adantr
 |-  ( ( m = M /\ s = S ) -> ( i m j ) = ( i M j ) )
15 12 14 ifeq12d
 |-  ( ( m = M /\ s = S ) -> if ( i = k , if ( j = l , s , .0. ) , ( i m j ) ) = if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) )
16 15 mpoeq3dv
 |-  ( ( m = M /\ s = S ) -> ( i e. N , j e. N |-> if ( i = k , if ( j = l , s , .0. ) , ( i m j ) ) ) = ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) )
17 16 mpoeq3dv
 |-  ( ( m = M /\ s = S ) -> ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , s , .0. ) , ( i m j ) ) ) ) = ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) )
18 1 2 3 4 marrepfval
 |-  Q = ( m e. B , s e. ( Base ` R ) |-> ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , s , .0. ) , ( i m j ) ) ) ) )
19 17 18 ovmpoga
 |-  ( ( M e. B /\ S e. ( Base ` R ) /\ ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) e. _V ) -> ( M Q S ) = ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) )
20 10 19 mpd3an3
 |-  ( ( M e. B /\ S e. ( Base ` R ) ) -> ( M Q S ) = ( k e. N , l e. N |-> ( i e. N , j e. N |-> if ( i = k , if ( j = l , S , .0. ) , ( i M j ) ) ) ) )