AFTD Auto-Formalizing Theoretical Domains

EconCSLib.StrategicGame.IsStochasticMatrix.total_mass_preserved

theoremverifiedformalizationimported Lean

The total mass after one application of a stochastic matrix to a probability vector equals the initial mass: ∑_j (xA)_j = ∑_i x_i.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators in
set_option linter.unusedSectionVars false in
variable {I : Type} [Fintype I] [Nonempty I] [DecidableEq I] in
variable {A : I → I → ℝ} in
theorem EconCSLib.StrategicGame.IsStochasticMatrix.total_mass_preserved (hA : IsStochasticMatrix A) (x : I → ℝ) :
    ∑ j, ∑ i, x i * A i j = ∑ i, x i
Formalizes
EconCSLib, `EconCSLib.StrategicGame.IsStochasticMatrix.total_mass_preserved`
Lean proof
By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at 1a88f809b538 (Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BigOperators inset_option linter.unusedSectionVars false invariable {I : Type} [Fintype I] [Nonempty I] [DecidableEq I] invariable {A : I → I → ℝ} in/-- The total mass after one application of a stochastic matrix to a probability vector equals the initial mass: `∑_j (xA)_j = ∑_i x_i`. -/theorem EconCSLib.StrategicGame.IsStochasticMatrix.total_mass_preserved (hA : IsStochasticMatrix A) (x : I → ℝ) :    ∑ j, ∑ i, x i * A i j = ∑ i, x i := by  rw [Finset.sum_comm]  refine Finset.sum_congr rfl (fun i _ => ?_)  rw [← Finset.mul_sum, hA.rowSum, mul_one]
See it in the graphDiscuss this resultChallenge it