Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 55102fc

Browse files
committed
chore(linear_algebra/matrix/adjugate): add missing matrix.of wrapper (#18736)
1 parent 9c6816c commit 55102fc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/linear_algebra/matrix/adjugate.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,15 @@ These will hold for any matrix over a commutative ring.
169169
matrix replacing a column with a basis vector, since it allows us to use
170170
facts about the `cramer` map.
171171
-/
172-
def adjugate (A : matrix n n α) : matrix n n α := λ i, cramer Aᵀ (pi.single i 1)
172+
def adjugate (A : matrix n n α) : matrix n n α :=
173+
of $ λ i, cramer Aᵀ (pi.single i 1)
173174

174175
lemma adjugate_def (A : matrix n n α) :
175-
adjugate A = λ i, cramer Aᵀ (pi.single i 1) := rfl
176+
adjugate A = of (λ i, cramer Aᵀ (pi.single i 1)) := rfl
176177

177178
lemma adjugate_apply (A : matrix n n α) (i j : n) :
178179
adjugate A i j = (A.update_row j (pi.single i 1)).det :=
179-
by { rw adjugate_def, simp only, rw [cramer_apply, update_column_transpose, det_transpose], }
180+
by rw [adjugate_def, of_apply, cramer_apply, update_column_transpose, det_transpose]
180181

181182
lemma adjugate_transpose (A : matrix n n α) : (adjugate A)ᵀ = adjugate (Aᵀ) :=
182183
begin
@@ -282,7 +283,7 @@ by { ext, simp [adjugate_def, matrix.one_apply, pi.single_apply, eq_comm] }
282283
adjugate (diagonal v) = diagonal (λ i, ∏ j in finset.univ.erase i, v j) :=
283284
begin
284285
ext,
285-
simp only [adjugate_def, cramer_apply, diagonal_transpose],
286+
simp only [adjugate_def, cramer_apply, diagonal_transpose, of_apply],
286287
obtain rfl | hij := eq_or_ne i j,
287288
{ rw [diagonal_apply_eq, diagonal_update_column_single, det_diagonal,
288289
prod_update_of_mem (finset.mem_univ _), sdiff_singleton_eq_erase, one_mul] },

0 commit comments

Comments
 (0)