@@ -49,51 +49,6 @@ variables {n : Type u} [fintype n] [decidable_eq n] {α : Type v}
49
49
open_locale matrix big_operators
50
50
open equiv equiv.perm finset
51
51
52
-
53
- section update
54
-
55
- /-- Update, i.e. replace the `i`th row of matrix `A` with the values in `b`. -/
56
- def update_row (A : matrix n n α) (i : n) (b : n → α) : matrix n n α :=
57
- function.update A i b
58
-
59
- /-- Update, i.e. replace the `i`th column of matrix `A` with the values in `b`. -/
60
- def update_column (A : matrix n n α) (j : n) (b : n → α) : matrix n n α :=
61
- λ i, function.update (A i) j (b i)
62
-
63
- variables {A : matrix n n α} {i j : n} {b : n → α}
64
-
65
- @[simp] lemma update_row_self : update_row A i b i = b := function.update_same i b A
66
-
67
- @[simp] lemma update_column_self : update_column A j b i j = b i := function.update_same j (b i) (A i)
68
-
69
- @[simp] lemma update_row_ne {i' : n} (i_ne : i' ≠ i) : update_row A i b i' = A i' :=
70
- function.update_noteq i_ne b A
71
-
72
- @[simp] lemma update_column_ne {j' : n} (j_ne : j' ≠ j) : update_column A j b i j' = A i j' :=
73
- function.update_noteq j_ne (b i) (A i)
74
-
75
- lemma update_row_val {i' : n} : update_row A i b i' j = if i' = i then b j else A i' j :=
76
- begin
77
- by_cases i' = i,
78
- { rw [h, update_row_self, if_pos rfl] },
79
- { rw [update_row_ne h, if_neg h] }
80
- end
81
-
82
- lemma update_column_val {j' : n} : update_column A j b i j' = if j' = j then b i else A i j' :=
83
- begin
84
- by_cases j' = j,
85
- { rw [h, update_column_self, if_pos rfl] },
86
- { rw [update_column_ne h, if_neg h] }
87
- end
88
-
89
- lemma update_row_transpose : update_row Aᵀ i b = (update_column A i b)ᵀ :=
90
- begin
91
- ext i' j,
92
- rw [transpose_val, update_row_val, update_column_val],
93
- refl
94
- end
95
- end update
96
-
97
52
section cramer
98
53
/-!
99
54
### `cramer` section
@@ -170,7 +125,7 @@ begin
170
125
{ -- i = j: this entry should be `A.det`
171
126
rw [if_pos h, ←h],
172
127
congr, ext i',
173
- by_cases h : i' = i, { rw [h, update_row_self] }, { rw [update_row_ne h]} },
128
+ by_cases h : i' = i, { rw [h, update_row_self] }, { rw [update_row_ne h] } },
174
129
{ -- i ≠ j: this entry should be 0
175
130
rw [if_neg h],
176
131
apply det_zero_of_column_eq h,
0 commit comments