Matrix.det_add_rankOne
theoremverifiedformalizationimported Lean
Rank-one determinant update (the ring-general matrix determinant lemma for an outer product, valid even when A is singular). Adding the rank-one matrix w ⊗ b to A changes the determinant by ∑ i, w i * det (A.updateRow i b). Mathlib only provides this when det A is a unit (Matrix.det_add_replicateCol_mul_replicateRow); the singular case is needed here because Kronecker-delta matrices are typically singular.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix in lemma Matrix.det_add_rankOne {ι : Type*} [DecidableEq ι] [Fintype ι] {R : Type*} [CommRing R] (A : Matrix ι ι R) (w b : ι → R) : (A + Matrix.of fun i j => w i * b j).det = A.det + ∑ i, w i * (A.updateRow i b).det
- Formalizes
- Physlib, `Matrix.det_add_rankOne`
- Lean proof
- By Robert Sneiderman, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2026 Robert Sneiderman. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.Matrix.det_add_rankOne← Matrix.det_add_rankOne (Physlib/Mathematics/KroneckerDelta/Contraction.lean:112): verbatim
- Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- Matrix.det_add_rankOne_auxExpanding the determinant of a rank-one row update over a finite set of rows. For
i ∈ sthe rowA iis replaced byA i + w i • b;…
- Matrix.det_add_rankOne_auxExpanding the determinant of a rank-one row update over a finite set of rows. For
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Matrix in/-- **Rank-one determinant update** (the ring-general matrix determinant lemma for an outer product, valid even when `A` is singular). Adding the rank-one matrix `w ⊗ b` to `A` changes the determinant by `∑ i, w i * det (A.updateRow i b)`. Mathlib only provides this when `det A` is a unit (`Matrix.det_add_replicateCol_mul_replicateRow`); the singular case is needed here because Kronecker-delta matrices are typically singular. -/lemma Matrix.det_add_rankOne {ι : Type*} [DecidableEq ι] [Fintype ι] {R : Type*} [CommRing R] (A : Matrix ι ι R) (w b : ι → R) : (A + Matrix.of fun i j => w i * b j).det = A.det + ∑ i, w i * (A.updateRow i b).det := by have h := det_add_rankOne_aux A w b Finset.univ simpa using h