AFTD Auto-Formalizing Theoretical Domains

op1370_weight_matrix_update

theoremverified

Changing one weight in a weighted sum of rank-one matrices changes the sum by the corresponding rank-one update.

Statement

theorem op1370_weight_matrix_update
    {ι V K : Type*} [Fintype ι] [DecidableEq ι] [CommRing K]
    (q : ι → K) (L R : ι → V → K) (x : ι) (t : K) :
    (∑ i, (q i + if i = x then t else 0) • Matrix.vecMulVec (L i) (R i)) =
      (∑ i, q i • Matrix.vecMulVec (L i) (R i)) + t • Matrix.vecMulVec (L x) (R x)
Source
Filed by the prover as a step towards another result
Verified
16 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

Lean source view module on GitHub

open Finset Matrix Polynomial
open scoped BigOperators

theorem op1370_weight_matrix_update
    {ι V K : Type*} [Fintype ι] [DecidableEq ι] [CommRing K]
    (q : ι → K) (L R : ι → V → K) (x : ι) (t : K) :
    (∑ i, (q i + if i = x then t else 0) • Matrix.vecMulVec (L i) (R i)) =
      (∑ i, q i • Matrix.vecMulVec (L i) (R i)) + t • Matrix.vecMulVec (L x) (R x) := by
  classical
  simp only [add_smul, Finset.sum_add_distrib]
  congr 1
  simp
See it in the graphDiscuss this resultChallenge it