Metamath Proof Explorer


Theorem cramerimplem3

Description: Lemma 3 for cramerimp : The determinant of the matrix of a system of linear equations multiplied with the determinant of the identity matrix with the ith column replaced by the solution vector of the system of linear equations equals the determinant of the matrix of the system of linear equations with the ith column replaced by the right-hand side vector of the system of linear equations. (Contributed by AV, 19-Feb-2019) (Revised by AV, 1-Mar-2019)

Ref Expression
Hypotheses cramerimp.a 𝐴 = ( 𝑁 Mat 𝑅 )
cramerimp.b 𝐵 = ( Base ‘ 𝐴 )
cramerimp.v 𝑉 = ( ( Base ‘ 𝑅 ) ↑m 𝑁 )
cramerimp.e 𝐸 = ( ( ( 1r𝐴 ) ( 𝑁 matRepV 𝑅 ) 𝑍 ) ‘ 𝐼 )
cramerimp.h 𝐻 = ( ( 𝑋 ( 𝑁 matRepV 𝑅 ) 𝑌 ) ‘ 𝐼 )
cramerimp.x · = ( 𝑅 maVecMul ⟨ 𝑁 , 𝑁 ⟩ )
cramerimp.d 𝐷 = ( 𝑁 maDet 𝑅 )
cramerimp.t = ( .r𝑅 )
Assertion cramerimplem3 ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( ( 𝐷𝑋 ) ( 𝐷𝐸 ) ) = ( 𝐷𝐻 ) )

Proof

Step Hyp Ref Expression
1 cramerimp.a 𝐴 = ( 𝑁 Mat 𝑅 )
2 cramerimp.b 𝐵 = ( Base ‘ 𝐴 )
3 cramerimp.v 𝑉 = ( ( Base ‘ 𝑅 ) ↑m 𝑁 )
4 cramerimp.e 𝐸 = ( ( ( 1r𝐴 ) ( 𝑁 matRepV 𝑅 ) 𝑍 ) ‘ 𝐼 )
5 cramerimp.h 𝐻 = ( ( 𝑋 ( 𝑁 matRepV 𝑅 ) 𝑌 ) ‘ 𝐼 )
6 cramerimp.x · = ( 𝑅 maVecMul ⟨ 𝑁 , 𝑁 ⟩ )
7 cramerimp.d 𝐷 = ( 𝑁 maDet 𝑅 )
8 cramerimp.t = ( .r𝑅 )
9 simpl ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) → 𝑅 ∈ CRing )
10 1 2 matrcl ( 𝑋𝐵 → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ V ) )
11 10 simpld ( 𝑋𝐵𝑁 ∈ Fin )
12 11 adantr ( ( 𝑋𝐵𝑌𝑉 ) → 𝑁 ∈ Fin )
13 9 12 anim12ci ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ) → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ CRing ) )
14 13 3adant3 ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝑁 ∈ Fin ∧ 𝑅 ∈ CRing ) )
15 eqid ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) = ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ )
16 1 15 matmulr ( ( 𝑁 ∈ Fin ∧ 𝑅 ∈ CRing ) → ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) = ( .r𝐴 ) )
17 14 16 syl ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) = ( .r𝐴 ) )
18 17 oveqd ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝑋 ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) 𝐸 ) = ( 𝑋 ( .r𝐴 ) 𝐸 ) )
19 18 fveq2d ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝐷 ‘ ( 𝑋 ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) 𝐸 ) ) = ( 𝐷 ‘ ( 𝑋 ( .r𝐴 ) 𝐸 ) ) )
20 1 2 3 4 5 6 15 cramerimplem2 ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝑋 ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) 𝐸 ) = 𝐻 )
21 20 fveq2d ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝐷 ‘ ( 𝑋 ( 𝑅 maMul ⟨ 𝑁 , 𝑁 , 𝑁 ⟩ ) 𝐸 ) ) = ( 𝐷𝐻 ) )
22 simp1l ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → 𝑅 ∈ CRing )
23 simp2l ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → 𝑋𝐵 )
24 crngring ( 𝑅 ∈ CRing → 𝑅 ∈ Ring )
25 24 adantr ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) → 𝑅 ∈ Ring )
26 25 12 anim12i ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ) → ( 𝑅 ∈ Ring ∧ 𝑁 ∈ Fin ) )
27 26 3adant3 ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝑅 ∈ Ring ∧ 𝑁 ∈ Fin ) )
28 ne0i ( 𝐼𝑁𝑁 ≠ ∅ )
29 24 28 anim12ci ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) → ( 𝑁 ≠ ∅ ∧ 𝑅 ∈ Ring ) )
30 1 2 3 6 slesolvec ( ( ( 𝑁 ≠ ∅ ∧ 𝑅 ∈ Ring ) ∧ ( 𝑋𝐵𝑌𝑉 ) ) → ( ( 𝑋 · 𝑍 ) = 𝑌𝑍𝑉 ) )
31 29 30 sylan ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ) → ( ( 𝑋 · 𝑍 ) = 𝑌𝑍𝑉 ) )
32 31 3impia ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → 𝑍𝑉 )
33 simp1r ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → 𝐼𝑁 )
34 eqid ( 1r𝐴 ) = ( 1r𝐴 )
35 1 2 3 34 ma1repvcl ( ( ( 𝑅 ∈ Ring ∧ 𝑁 ∈ Fin ) ∧ ( 𝑍𝑉𝐼𝑁 ) ) → ( ( ( 1r𝐴 ) ( 𝑁 matRepV 𝑅 ) 𝑍 ) ‘ 𝐼 ) ∈ 𝐵 )
36 27 32 33 35 syl12anc ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( ( ( 1r𝐴 ) ( 𝑁 matRepV 𝑅 ) 𝑍 ) ‘ 𝐼 ) ∈ 𝐵 )
37 4 36 eqeltrid ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → 𝐸𝐵 )
38 eqid ( .r𝐴 ) = ( .r𝐴 )
39 1 2 7 8 38 mdetmul ( ( 𝑅 ∈ CRing ∧ 𝑋𝐵𝐸𝐵 ) → ( 𝐷 ‘ ( 𝑋 ( .r𝐴 ) 𝐸 ) ) = ( ( 𝐷𝑋 ) ( 𝐷𝐸 ) ) )
40 22 23 37 39 syl3anc ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( 𝐷 ‘ ( 𝑋 ( .r𝐴 ) 𝐸 ) ) = ( ( 𝐷𝑋 ) ( 𝐷𝐸 ) ) )
41 19 21 40 3eqtr3rd ( ( ( 𝑅 ∈ CRing ∧ 𝐼𝑁 ) ∧ ( 𝑋𝐵𝑌𝑉 ) ∧ ( 𝑋 · 𝑍 ) = 𝑌 ) → ( ( 𝐷𝑋 ) ( 𝐷𝐸 ) ) = ( 𝐷𝐻 ) )