# Metamath Proof Explorer

## Theorem minmar1val

Description: Third substitution for the definition of a matrix for a minor. (Contributed by AV, 31-Dec-2018)

Ref Expression
Hypotheses minmar1fval.a 𝐴 = ( 𝑁 Mat 𝑅 )
minmar1fval.b 𝐵 = ( Base ‘ 𝐴 )
minmar1fval.q 𝑄 = ( 𝑁 minMatR1 𝑅 )
minmar1fval.o 1 = ( 1r𝑅 )
minmar1fval.z 0 = ( 0g𝑅 )
Assertion minmar1val ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → ( 𝐾 ( 𝑄𝑀 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )

### Proof

Step Hyp Ref Expression
1 minmar1fval.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 minmar1fval.b 𝐵 = ( Base ‘ 𝐴 )
3 minmar1fval.q 𝑄 = ( 𝑁 minMatR1 𝑅 )
4 minmar1fval.o 1 = ( 1r𝑅 )
5 minmar1fval.z 0 = ( 0g𝑅 )
6 1 2 3 4 5 minmar1val0 ( 𝑀𝐵 → ( 𝑄𝑀 ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
7 6 3ad2ant1 ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → ( 𝑄𝑀 ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
8 simp2 ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → 𝐾𝑁 )
9 simpl3 ( ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) ∧ 𝑘 = 𝐾 ) → 𝐿𝑁 )
10 1 2 matrcl ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ V ) )
11 10 simpld ( 𝑀𝐵𝑁 ∈ Fin )
12 11 11 jca ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) )
13 12 3ad2ant1 ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) )
14 13 adantr ( ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) ∧ ( 𝑘 = 𝐾𝑙 = 𝐿 ) ) → ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) )
15 mpoexga ( ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ∈ V )
16 14 15 syl ( ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) ∧ ( 𝑘 = 𝐾𝑙 = 𝐿 ) ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ∈ V )
17 eqeq2 ( 𝑘 = 𝐾 → ( 𝑖 = 𝑘𝑖 = 𝐾 ) )
18 17 adantr ( ( 𝑘 = 𝐾𝑙 = 𝐿 ) → ( 𝑖 = 𝑘𝑖 = 𝐾 ) )
19 eqeq2 ( 𝑙 = 𝐿 → ( 𝑗 = 𝑙𝑗 = 𝐿 ) )
20 19 ifbid ( 𝑙 = 𝐿 → if ( 𝑗 = 𝑙 , 1 , 0 ) = if ( 𝑗 = 𝐿 , 1 , 0 ) )
21 20 adantl ( ( 𝑘 = 𝐾𝑙 = 𝐿 ) → if ( 𝑗 = 𝑙 , 1 , 0 ) = if ( 𝑗 = 𝐿 , 1 , 0 ) )
22 18 21 ifbieq1d ( ( 𝑘 = 𝐾𝑙 = 𝐿 ) → if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) = if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) )
23 22 mpoeq3dv ( ( 𝑘 = 𝐾𝑙 = 𝐿 ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
24 23 adantl ( ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) ∧ ( 𝑘 = 𝐾𝑙 = 𝐿 ) ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )
25 8 9 16 24 ovmpodv2 ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → ( ( 𝑄𝑀 ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝑘 , if ( 𝑗 = 𝑙 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) → ( 𝐾 ( 𝑄𝑀 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) ) )
26 7 25 mpd ( ( 𝑀𝐵𝐾𝑁𝐿𝑁 ) → ( 𝐾 ( 𝑄𝑀 ) 𝐿 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ if ( 𝑖 = 𝐾 , if ( 𝑗 = 𝐿 , 1 , 0 ) , ( 𝑖 𝑀 𝑗 ) ) ) )