Metamath Proof Explorer


Theorem submafval

Description: First substitution for a submatrix. (Contributed by AV, 28-Dec-2018)

Ref Expression
Hypotheses submafval.a 𝐴 = ( 𝑁 Mat 𝑅 )
submafval.q 𝑄 = ( 𝑁 subMat 𝑅 )
submafval.b 𝐵 = ( Base ‘ 𝐴 )
Assertion submafval 𝑄 = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) )

Proof

Step Hyp Ref Expression
1 submafval.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 submafval.q 𝑄 = ( 𝑁 subMat 𝑅 )
3 submafval.b 𝐵 = ( Base ‘ 𝐴 )
4 oveq12 ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑛 Mat 𝑟 ) = ( 𝑁 Mat 𝑅 ) )
5 4 1 eqtr4di ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑛 Mat 𝑟 ) = 𝐴 )
6 5 fveq2d ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( Base ‘ ( 𝑛 Mat 𝑟 ) ) = ( Base ‘ 𝐴 ) )
7 6 3 eqtr4di ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( Base ‘ ( 𝑛 Mat 𝑟 ) ) = 𝐵 )
8 simpl ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → 𝑛 = 𝑁 )
9 difeq1 ( 𝑛 = 𝑁 → ( 𝑛 ∖ { 𝑘 } ) = ( 𝑁 ∖ { 𝑘 } ) )
10 9 adantr ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑛 ∖ { 𝑘 } ) = ( 𝑁 ∖ { 𝑘 } ) )
11 difeq1 ( 𝑛 = 𝑁 → ( 𝑛 ∖ { 𝑙 } ) = ( 𝑁 ∖ { 𝑙 } ) )
12 11 adantr ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑛 ∖ { 𝑙 } ) = ( 𝑁 ∖ { 𝑙 } ) )
13 eqidd ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑖 𝑚 𝑗 ) = ( 𝑖 𝑚 𝑗 ) )
14 10 12 13 mpoeq123dv ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑖 ∈ ( 𝑛 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑛 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) = ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) )
15 8 8 14 mpoeq123dv ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑘𝑛 , 𝑙𝑛 ↦ ( 𝑖 ∈ ( 𝑛 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑛 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) = ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) )
16 7 15 mpteq12dv ( ( 𝑛 = 𝑁𝑟 = 𝑅 ) → ( 𝑚 ∈ ( Base ‘ ( 𝑛 Mat 𝑟 ) ) ↦ ( 𝑘𝑛 , 𝑙𝑛 ↦ ( 𝑖 ∈ ( 𝑛 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑛 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
17 df-subma subMat = ( 𝑛 ∈ V , 𝑟 ∈ V ↦ ( 𝑚 ∈ ( Base ‘ ( 𝑛 Mat 𝑟 ) ) ↦ ( 𝑘𝑛 , 𝑙𝑛 ↦ ( 𝑖 ∈ ( 𝑛 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑛 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
18 3 fvexi 𝐵 ∈ V
19 18 mptex ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) ∈ V
20 16 17 19 ovmpoa ( ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( 𝑁 subMat 𝑅 ) = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
21 17 mpondm0 ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( 𝑁 subMat 𝑅 ) = ∅ )
22 mpt0 ( 𝑚 ∈ ∅ ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) = ∅
23 21 22 eqtr4di ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( 𝑁 subMat 𝑅 ) = ( 𝑚 ∈ ∅ ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
24 1 fveq2i ( Base ‘ 𝐴 ) = ( Base ‘ ( 𝑁 Mat 𝑅 ) )
25 3 24 eqtri 𝐵 = ( Base ‘ ( 𝑁 Mat 𝑅 ) )
26 matbas0pc ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( Base ‘ ( 𝑁 Mat 𝑅 ) ) = ∅ )
27 25 26 eqtrid ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → 𝐵 = ∅ )
28 27 mpteq1d ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) = ( 𝑚 ∈ ∅ ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
29 23 28 eqtr4d ( ¬ ( 𝑁 ∈ V ∧ 𝑅 ∈ V ) → ( 𝑁 subMat 𝑅 ) = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) ) )
30 20 29 pm2.61i ( 𝑁 subMat 𝑅 ) = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) )
31 2 30 eqtri 𝑄 = ( 𝑚𝐵 ↦ ( 𝑘𝑁 , 𝑙𝑁 ↦ ( 𝑖 ∈ ( 𝑁 ∖ { 𝑘 } ) , 𝑗 ∈ ( 𝑁 ∖ { 𝑙 } ) ↦ ( 𝑖 𝑚 𝑗 ) ) ) )