Lemma 2.18 -- the reflection principle on
OpenMarkovMixing.reflection_principleFor simple random walk on started at and any : walks of length that touch before time and end at are equinumerous with walks ending at , and walks that touch and end positive are equinumerous with walks ending negative. Stated as exact equalities of counts of step sequences, which is equivalent to the probabilistic statement since all sequences are equally likely.
import Definitions.Def_mm_classical
namespace MarkovMixing
/-- **Lemma 2.18** (LPW), the reflection principle for simple random walk on
`ℤ`: for positive `j, k` and horizon `r`, walks from `k` that touch `0` before
time `r` and end at `j` are equinumerous with walks from `k` ending at `-j`;
consequently walks touching `0` and ending positive are equinumerous with
walks ending negative. (All `2^r` sign sequences being equally likely, these
counting identities are exactly (2.20) and (2.21).) -/
theorem reflection_principle (r : ℕ) (k j : ℤ) (hk : 0 < k) (hj : 0 < j) :
((Finset.univ.filter fun ω : Fin r → Bool =>
(∃ s < r, srwPos k ω s = 0) ∧ srwPos k ω r = j).card =
(Finset.univ.filter fun ω : Fin r → Bool => srwPos k ω r = -j).card) ∧
((Finset.univ.filter fun ω : Fin r → Bool =>
(∃ s < r, srwPos k ω s = 0) ∧ 0 < srwPos k ω r).card =
(Finset.univ.filter fun ω : Fin r → Bool => srwPos k ω r < 0).card) := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Fix a natural number and integers with and . Sample paths are functions from to , i.e. sequences of Boolean coin flips (there are exactly of them, and when there is exactly one, the empty sequence). For such an and a natural number , the custom walk position , here written , is defined as
so (the empty sum), adds the first steps for , and for every (in particular ) it equals plus the sum of all steps, the walk's final position. The theorem asserts the conjunction of two exact counting identities over this finite space of Boolean sequences. First: the number of sequences such that there exists a natural number with and (the walk visits at some time strictly before ; since , the time can never witness this, and when the condition is vacuously false) and , equals the number of sequences such that — note that this right-hand count carries no condition about visiting : it counts all sequences whose final position is . Second: the number of sequences such that there exists with and (final position strictly positive), equals the number of sequences with (final position strictly negative), again with no zero-visit requirement on the right-hand side. Both identities are equalities of cardinalities of subsets of the Boolean sequences, stated for the fixed starting point and target ; nothing is asserted about probabilities, about or , or about times other than "some " and the final time .
Confirmed by the mission captain (proposal self-audit).