Metamath Proof Explorer


Theorem cramerimp

Description: One direction of Cramer's rule (according to Wikipedia "Cramer's rule", 21-Feb-2019, https://en.wikipedia.org/wiki/Cramer%27s_rule : "[Cramer's rule] ... expresses the solution [of a system of linear equations] in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the column vector of right-hand sides of the equations."): The ith component of the solution vector of a system of linear equations equals the determinant of the matrix of the system of linear equations with the ith column replaced by the righthand side vector of the system of linear equations divided by the determinant of the matrix of the system of linear equations. (Contributed by AV, 19-Feb-2019) (Revised by AV, 1-Mar-2019)

Ref Expression
Hypotheses cramerimp.a A = N Mat R
cramerimp.b B = Base A
cramerimp.v V = Base R N
cramerimp.e E = 1 A N matRepV R Z I
cramerimp.h H = X N matRepV R Y I
cramerimp.x · ˙ = R maVecMul N N
cramerimp.d D = N maDet R
cramerimp.q × ˙ = / r R
Assertion cramerimp R CRing I N X B Y V X · ˙ Z = Y D X Unit R Z I = D H × ˙ D X

Proof

Step Hyp Ref Expression
1 cramerimp.a A = N Mat R
2 cramerimp.b B = Base A
3 cramerimp.v V = Base R N
4 cramerimp.e E = 1 A N matRepV R Z I
5 cramerimp.h H = X N matRepV R Y I
6 cramerimp.x · ˙ = R maVecMul N N
7 cramerimp.d D = N maDet R
8 cramerimp.q × ˙ = / r R
9 crngring R CRing R Ring
10 9 adantr R CRing I N R Ring
11 10 3ad2ant1 R CRing I N X B Y V X · ˙ Z = Y D X Unit R R Ring
12 eqid Base R = Base R
13 7 1 2 12 mdetf R CRing D : B Base R
14 13 adantr R CRing I N D : B Base R
15 14 3ad2ant1 R CRing I N X B Y V X · ˙ Z = Y D X Unit R D : B Base R
16 1 2 matrcl X B N Fin R V
17 16 simpld X B N Fin
18 17 adantr X B Y V N Fin
19 10 18 anim12i R CRing I N X B Y V R Ring N Fin
20 19 3adant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R R Ring N Fin
21 ne0i I N N
22 9 21 anim12ci R CRing I N N R Ring
23 22 anim1i R CRing I N X B Y V N R Ring X B Y V
24 23 3adant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R N R Ring X B Y V
25 simpl X · ˙ Z = Y D X Unit R X · ˙ Z = Y
26 25 3ad2ant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R X · ˙ Z = Y
27 1 2 3 6 slesolvec N R Ring X B Y V X · ˙ Z = Y Z V
28 24 26 27 sylc R CRing I N X B Y V X · ˙ Z = Y D X Unit R Z V
29 simpr R CRing I N I N
30 29 3ad2ant1 R CRing I N X B Y V X · ˙ Z = Y D X Unit R I N
31 eqid 1 A = 1 A
32 1 2 3 31 ma1repvcl R Ring N Fin Z V I N 1 A N matRepV R Z I B
33 20 28 30 32 syl12anc R CRing I N X B Y V X · ˙ Z = Y D X Unit R 1 A N matRepV R Z I B
34 4 33 eqeltrid R CRing I N X B Y V X · ˙ Z = Y D X Unit R E B
35 15 34 ffvelrnd R CRing I N X B Y V X · ˙ Z = Y D X Unit R D E Base R
36 simpr X · ˙ Z = Y D X Unit R D X Unit R
37 36 3ad2ant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R D X Unit R
38 eqid Unit R = Unit R
39 eqid R = R
40 12 38 8 39 dvrcan3 R Ring D E Base R D X Unit R D E R D X × ˙ D X = D E
41 11 35 37 40 syl3anc R CRing I N X B Y V X · ˙ Z = Y D X Unit R D E R D X × ˙ D X = D E
42 simpl R CRing I N R CRing
43 42 3ad2ant1 R CRing I N X B Y V X · ˙ Z = Y D X Unit R R CRing
44 12 38 unitcl D X Unit R D X Base R
45 44 adantl X · ˙ Z = Y D X Unit R D X Base R
46 45 3ad2ant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R D X Base R
47 12 39 crngcom R CRing D E Base R D X Base R D E R D X = D X R D E
48 43 35 46 47 syl3anc R CRing I N X B Y V X · ˙ Z = Y D X Unit R D E R D X = D X R D E
49 48 oveq1d R CRing I N X B Y V X · ˙ Z = Y D X Unit R D E R D X × ˙ D X = D X R D E × ˙ D X
50 18 adantl R CRing I N X B Y V N Fin
51 42 adantr R CRing I N X B Y V R CRing
52 29 adantr R CRing I N X B Y V I N
53 50 51 52 3jca R CRing I N X B Y V N Fin R CRing I N
54 53 3adant3 R CRing I N X B Y V X · ˙ Z = Y D X Unit R N Fin R CRing I N
55 1 3 4 7 cramerimplem1 N Fin R CRing I N Z V D E = Z I
56 54 28 55 syl2anc R CRing I N X B Y V X · ˙ Z = Y D X Unit R D E = Z I
57 41 49 56 3eqtr3rd R CRing I N X B Y V X · ˙ Z = Y D X Unit R Z I = D X R D E × ˙ D X
58 1 2 3 4 5 6 7 39 cramerimplem3 R CRing I N X B Y V X · ˙ Z = Y D X R D E = D H
59 58 3adant3r R CRing I N X B Y V X · ˙ Z = Y D X Unit R D X R D E = D H
60 59 oveq1d R CRing I N X B Y V X · ˙ Z = Y D X Unit R D X R D E × ˙ D X = D H × ˙ D X
61 57 60 eqtrd R CRing I N X B Y V X · ˙ Z = Y D X Unit R Z I = D H × ˙ D X