Metamath Proof Explorer


Theorem maduval

Description: Second substitution for the adjunct (cofactor) matrix. (Contributed by SO, 11-Jul-2018)

Ref Expression
Hypotheses madufval.a 𝐴 = ( 𝑁 Mat 𝑅 )
madufval.d 𝐷 = ( 𝑁 maDet 𝑅 )
madufval.j 𝐽 = ( 𝑁 maAdju 𝑅 )
madufval.b 𝐵 = ( Base ‘ 𝐴 )
madufval.o 1 = ( 1r𝑅 )
madufval.z 0 = ( 0g𝑅 )
Assertion maduval ( 𝑀𝐵 → ( 𝐽𝑀 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) )

Proof

Step Hyp Ref Expression
1 madufval.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 madufval.d 𝐷 = ( 𝑁 maDet 𝑅 )
3 madufval.j 𝐽 = ( 𝑁 maAdju 𝑅 )
4 madufval.b 𝐵 = ( Base ‘ 𝐴 )
5 madufval.o 1 = ( 1r𝑅 )
6 madufval.z 0 = ( 0g𝑅 )
7 1 4 matrcl ( 𝑀𝐵 → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ V ) )
8 7 simpld ( 𝑀𝐵𝑁 ∈ Fin )
9 mpoexga ( ( 𝑁 ∈ Fin ∧ 𝑁 ∈ Fin ) → ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) ∈ V )
10 8 8 9 syl2anc ( 𝑀𝐵 → ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) ∈ V )
11 oveq ( 𝑚 = 𝑀 → ( 𝑘 𝑚 𝑙 ) = ( 𝑘 𝑀 𝑙 ) )
12 11 ifeq2d ( 𝑚 = 𝑀 → if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) = if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) )
13 12 mpoeq3dv ( 𝑚 = 𝑀 → ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) )
14 13 3ad2ant1 ( ( 𝑚 = 𝑀𝑖𝑁𝑗𝑁 ) → ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) )
15 14 fveq2d ( ( 𝑚 = 𝑀𝑖𝑁𝑗𝑁 ) → ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) ) ) = ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) )
16 15 mpoeq3dva ( 𝑚 = 𝑀 → ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) ) ) ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) )
17 1 2 3 4 5 6 madufval 𝐽 = ( 𝑚𝐵 ↦ ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑚 𝑙 ) ) ) ) ) )
18 16 17 fvmptg ( ( 𝑀𝐵 ∧ ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) ∈ V ) → ( 𝐽𝑀 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) )
19 10 18 mpdan ( 𝑀𝐵 → ( 𝐽𝑀 ) = ( 𝑖𝑁 , 𝑗𝑁 ↦ ( 𝐷 ‘ ( 𝑘𝑁 , 𝑙𝑁 ↦ if ( 𝑘 = 𝑗 , if ( 𝑙 = 𝑖 , 1 , 0 ) , ( 𝑘 𝑀 𝑙 ) ) ) ) ) )