feat(Probability/Markov): stationary distributions for stochastic matrices#34713
feat(Probability/Markov): stationary distributions for stochastic matrices#34713dennj wants to merge 1 commit intoleanprover-community:masterfrom
Conversation
PR summary c7a9524911Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
@dennj there is already an open PR for this #28708 (although your PR contains some material which is not present there). That PR author has indicated that @dupuisf is welcome to take it over. Can you please coordinate with Frédéric Dupuis to get #28708 finished? After we can work on getting any material left in this PR into Mathlib. (And for future reference, please try to check if anyone is already working on a given project by searching on Zulip and GitHub so that we avoid duplication of effort and review.) |
|
actually, I didn't realize that PR was ready, and I just sent it to be merged. When that's done, you can merge master into this PR and then add anything you have that was missing from that one. |
5d94b5c to
9b1284a
Compare
Done, I rebased my changes on top of that PR. -awaiting-author |
|
This pull request has conflicts, please merge |
|
-awaiting-author |
|
Not my area of expertise, so un-assigning me. |
dupuisf
left a comment
There was a problem hiding this comment.
I left a few initial comments. Could you also disclose whether generative AI tools were used in preparing this PR, and if so, how exactly? Thanks.
| /-- The Cesàro average of the iterates of a vector under a matrix. -/ | ||
| def cesaroAverage (x₀ : n → R) (P : Matrix n n R) (k : ℕ) : n → R := | ||
| (k + 1 : R)⁻¹ • ∑ i ∈ Finset.range (k + 1), x₀ ᵥ* (P ^ i) |
There was a problem hiding this comment.
Why is it k + 1 instead of simply k?
There was a problem hiding this comment.
So that every k : N gives a valid average. With k + 1, k = 0 averages one term; with plain k, you'd get 0^-1 * 0 = 0 and need k >= 1 side conditions everywhere downstream
|
Hello from triage! My impression is that this PR was generated with substantial help from LLM. Can you comment on this, please? Per our AI policy, if so, you are required to mention this in the PR description. |
3517c37 to
20b1796
Compare
…rices This PR proves that every row-stochastic matrix on a finite nonempty state space has a stationary distribution in the standard simplex. Main additions to `Mathlib/Probability/Markov/Stationary.lean`: - `IsStationary`: A distribution μ is stationary for matrix P if μ ᵥ* P = μ - `cesaroAverage`: Cesàro average of iterates of a vector under a matrix - `Matrix.rowStochastic.exists_stationary_distribution`: existence theorem The proof uses Cesàro averaging: start with uniform distribution, form averages, extract convergent subsequence by compactness, show limit is stationary via L¹ non-expansiveness. Also adds `vecMul_mem_stdSimplex` to `Stochastic.lean`: multiplying a probability vector by a row-stochastic matrix preserves simplex membership.
|
-awaiting-author I applied the suggestions in the comments and did some golfing |
This PR proves that every row-stochastic matrix on a finite nonempty
state space has a stationary distribution in the standard simplex.
Main additions to
Mathlib/Probability/Markov/Stationary.lean:IsStationary: A distribution μ is stationary for matrix P if μ ᵥ* P = μcesaroAverage: Cesàro average of iterates of a vector under a matrixMatrix.rowStochastic.exists_stationary_distribution: existence theoremThe proof uses Cesàro averaging: start with uniform distribution, form
averages, extract convergent subsequence by compactness, show limit is
stationary via L¹ non-expansiveness.
Also adds
vecMul_mem_stdSimplextoStochastic.lean: multiplying aprobability vector by a row-stochastic matrix preserves simplex membership.
This is human-made PR with AI help in golfing proof and documenting the code.