MathFin
Map / Valuation · Trees / MathFin.Models.Binomial.PathReflection

Path-level reflection identity for ±1 walks (André 1887, algebraic core)

MathFin.Models.Binomial.PathReflectionMSC 60G50MSC 91G20JEL G13 source

For paths ω : Fin n → Bool (each entry: +1 if true, −1 if false), reflection after time τ is the path that agrees with ω strictly before time τ and negates every step from time τ onwards.

The algebraic core of André's reflection principle is the position identity

For any τ ≤ k, walkPos (reflectAfter τ ω) k = 2 · walkPos ω τ − walkPos ω k.

Equivalently: the trajectory after time τ of the reflected path is the mirror image of the original trajectory through the horizontal line at height walkPos ω τ.

Combined with a hitting-time argument (the first τ with walkPos ω τ = a when ω reaches level a), this identity yields the bijection between paths that touch level a and end at b ≤ a and paths that end at 2a − b. That bijection is the counting backbone of barrier-option pricing in the binomial tree.

This file formalises both halves: the algebraic core (the path-position identity and involution) and the hitting-time bijection itself (reflectionPrincipleEquiv, reflectionPrincipleEquivBelow), with the discrete IVT (HitsLevel_of_walkPos_endpoint_ge) discharging the redundant hitting condition on the reflected side. The counting form is wired to the corpus as mf-reflection-principle-counting.

Why this is more than algebra

The identity is non-trivial because reflection changes the path at every position from τ onwards. The proof requires splitting each path sum into a prefix (< τ) — preserved by reflection — and a suffix (τ ≤ · < k) — negated step-by-step by reflection. The prefix contributes walkPos ω τ to both sides, and the suffix-sign-flip is what produces the 2 · walkPos ω τ − walkPos ω k form.

Main definitions

  • walkStep, walkPos: the step ±1 of a flip and the position of the walk at time k, the sum of the first k steps.
  • reflectAfter: the path that agrees with ω before time τ and flips every step from τ on.
  • hittingSet, HitsLevel: the times k ≤ n at which the walk is at level a, and the predicate that this set is nonempty.
  • firstHit: the first hitting time of level a on a path that hits it.
  • reflectAtFirstHit: reflection after the first hitting time of a.
  • reflectionPrincipleEquiv: the bijection between paths that hit a and end at b, and paths that hit a and end at 2a − b, given by reflectAtFirstHit a.
  • hitsLevelEquivAbove: for 0 < a ≤ b, the paths that hit a and end at b are in bijection with the paths that end at b.
  • reflectionPrincipleEquivBelow: for 0 < a and b ≤ a, the paths that hit a and end at b are in bijection with the paths that end at 2a − b.

Main results

  • reflectAfter_involutive: reflection at fixed τ is its own inverse.
  • walkPos_reflectAfter_le: positions at k ≤ τ are unchanged.
  • walkPos_reflectAfter_ge: positions at k ≥ τ reflect through walkPos ω τ.
  • walkPos_reflectAfter_endpoint: endpoint statement: if the original hits a at τ and ends at b, the reflected ends at 2a − b.
  • reflectAtFirstHit_involutive: reflection at the first hit is its own inverse.
  • HitsLevel_of_le_walkPos: discrete IVT — a walk at or above a level a ≥ 0 at some time k₀ ≤ n has hit a; HitsLevel_of_walkPos_endpoint_ge is the case k₀ = n.

References

Tags

reflection principle, André, random walk, first hitting time, barrier option, ballot problem, MSC 60G50, MSC 91G20, JEL G13

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-reflection-principle-counting · binomial.json · full statement
Reflection Principle (Andre, counting form)

Andre's reflection principle for ±1 random-walk paths: the number of length-n paths that touch a barrier a > 0 and end at b ≤ a equals the number of all paths ending at the reflected endpoint 2a − b. The combinatorial backbone of barrier-option counting in the binomial tree; the hitting condition on the reflected side is discharged by a discrete intermediate-value theorem.

Declarations 32

defMathFin.walkStepsource
Bool → ℤ

Step value: +1 if true (up), −1 if false (down).

theoremMathFin.walkStep_notsource
∀ (b : Bool), (walkStep !b) = -walkStep b

Step-value negation under boolean flip: walkStep !b = -walkStep b.

defMathFin.walkPossource
{n : ℕ} → (Fin n → Bool) → ℕ → ℤ

Position of the walk at time k: sum of the first k steps.

For k = 0 the sum is empty and the position is 0. For k ≥ n all steps are included.

theoremMathFin.walkPos_zero @[simp]source
∀ {n : ℕ} (ω : Fin n → Bool), walkPos ω 0 = 0
defMathFin.reflectAftersource
{n : ℕ} → ℕ → (Fin n → Bool) → Fin n → Bool

Reflection after time τ: flip every step at index ≥ τ.

theoremMathFin.reflectAfter_involutivesource
∀ {n : ℕ} (τ : ℕ), Function.Involutive (reflectAfter τ)

Reflection at fixed τ is involutive: applying it twice recovers the original path.

theoremMathFin.walkPos_reflectAfter_lesource
∀ {n : ℕ} (τ : ℕ) (ω : Fin n → Bool) {k : ℕ}, k ≤ τ → walkPos (reflectAfter τ ω) k = walkPos ω k

Positions before τ are unchanged: for k ≤ τ, the reflected walk's position equals the original's. (The flip only takes effect from index τ onwards.)

theoremMathFin.walkPos_reflectAfter_gesource
∀ {n : ℕ} (τ : ℕ) (ω : Fin n → Bool) {k : ℕ}, τ ≤ k → walkPos (reflectAfter τ ω) k = 2 * walkPos ω τ - walkPos ω k

Position-reflection identity (the algebraic core of André's principle).

For any τ ≤ k:

walkPos (reflectAfter τ ω) k = 2 · walkPos ω τ − walkPos ω k.

Proof: decompose each path sum into the prefix {i.val < τ} (preserved by reflection, contributing walkPos ω τ) and the suffix {τ ≤ i.val < k} (negated step-by-step by reflection). Combining

walkPos (reflect) k = (prefix) − (suffix of ω) walkPos ω k = (prefix) + (suffix of ω) walkPos ω τ = (prefix)

gives walkPos (reflect) k = 2·walkPos ω τ − walkPos ω k.

theoremMathFin.walkPos_reflectAfter_endpointsource
∀ {n : ℕ} (τ : ℕ) (ω : Fin n → Bool), τ ≤ n → ∀ (a b : ℤ), walkPos ω τ = a → walkPos ω n = b → walkPos (reflectAfter τ ω) n = 2 * a - b

Endpoint statement of the reflection identity: if ω hits level a at time τ (walkPos ω τ = a) and ends at b (walkPos ω n = b), then the reflected path ends at 2a − b.

This statement drives the counting argument in barrier-option pricing: a path-to-b-touching-a and a path-to-(2a−b) are in bijection via reflection at the first hitting time of a.

defMathFin.hittingSetsource
{n : ℕ} → (Fin n → Bool) → ℤ → Finset ℕ

The (finite) set of times k ∈ {0, …, n} at which the walk hits level a.

defMathFin.HitsLevelsource
{n : ℕ} → ℤ → (Fin n → Bool) → Prop

A path hits level a if hittingSet is nonempty.

defMathFin.firstHitsource
{n : ℕ} → (ω : Fin n → Bool) → (a : ℤ) → HitsLevel a ω → ℕ

First hitting time of level a on a hit-path.

theoremMathFin.firstHit_mem_hittingSetsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), firstHit ω a h ∈ hittingSet ω a
theoremMathFin.firstHit_lesource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), firstHit ω a h ≤ n
theoremMathFin.walkPos_firstHitsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), walkPos ω (firstHit ω a h) = a
theoremMathFin.firstHit_le_of_hitsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω) {k : ℕ}, k ≤ n → walkPos ω k = a → firstHit ω a h ≤ k

Minimality of the first hit: any k ≤ n with walkPos ω k = a is at least firstHit ω a.

theoremMathFin.HitsLevel.reflectAfter_firstHitsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), HitsLevel a (reflectAfter (firstHit ω a h) ω)

Reflected path hits level a when the original does. The reflected hits at the same firstHit time (proven separately below).

theoremMathFin.firstHit_reflectAfter_firstHitsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), firstHit (reflectAfter (firstHit ω a h) ω) a ⋯ = firstHit ω a h

First hit is invariant under reflection at the first hit time. Crucial for the involution property of reflectAtFirstHit.

Proof: both bounds.

  • firstHit σ a ≤ τ because σ hits a at τ (positions agree up to τ).
  • firstHit σ a ≥ τ because positions on [0, τ) agree with ω, where ω doesn't hit a (minimality of τ).
defMathFin.reflectAtFirstHitsource
{n : ℕ} → ℤ → (Fin n → Bool) → Fin n → Bool

Reflection at the first hitting time of a: the path-level map that reflects every step after firstHit ω a. Defaulted to identity off the hit-set.

theoremMathFin.reflectAtFirstHit_involutivesource
∀ {n : ℕ} (a : ℤ), Function.Involutive (reflectAtFirstHit a)

Involution: reflecting twice at the (preserved) first hit recovers the original path.

Proof: on the hit-set, firstHit is invariant under reflection (firstHit_reflectAfter_firstHit), and reflectAfter τ is involutive (reflectAfter_involutive). Off the hit-set, the map is identity.

theoremMathFin.walkPos_reflectAtFirstHit_endpointsource
∀ {n : ℕ} (ω : Fin n → Bool) (a b : ℤ), HitsLevel a ω → walkPos ω n = b → walkPos (reflectAtFirstHit a ω) n = 2 * a - b

Endpoint flip under reflection at first hit: if ω hits a and ends at b, then reflectAtFirstHit a ω ends at 2a − b.

theoremMathFin.walkPos_succsource
∀ {n : ℕ} (ω : Fin n → Bool) {k : ℕ} (hk : k < n), walkPos ω (k + 1) = walkPos ω k + walkStep (ω ⟨k, hk⟩)

Step relation: the walk's position at time k + 1 equals the position at k plus the step value at index k.

theoremMathFin.HitsLevel_of_le_walkPossource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ), 0 ≤ a → ∀ {k₀ : ℕ}, k₀ ≤ n → a ≤ walkPos ω k₀ → HitsLevel a ω

Discrete intermediate value theorem for ±1 walks: if the walk is at or above level a ≥ 0 at some time k₀ ≤ n, it hits level a by time n.

Proof: take τ = smallest k ≤ n with walkPos ω k ≥ a. Either τ = 0 (so walkPos ω 0 = 0 ≥ a ≥ 0, hence a = 0 and we hit at 0), or τ > 0 with walkPos ω (τ−1) < a (minimality) and walkPos ω τ ≥ a. Since each step is ±1, walkPos τ = walkPos (τ−1) ± 1; the -1 case would give walkPos τ < a, contradicting ≥ a; the +1 case gives walkPos τ = walkPos (τ−1) + 1 ≤ a, combined with ≥ a gives = a.

theoremMathFin.HitsLevel_of_walkPos_endpoint_gesource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ), 0 ≤ a → a ≤ walkPos ω n → HitsLevel a ω

A walk ending at or above a level a ≥ 0 has hit it: HitsLevel_of_le_walkPos at the endpoint.

theoremMathFin.HitsLevel_of_endpoint_gtsource
∀ {n : ℕ} {ω : Fin n → Bool} {a : ℤ}, 0 ≤ a → a < walkPos ω n → HitsLevel a ω

Endpoint-above-barrier ⟹ hits barrier (alias / corollary). Same as HitsLevel_of_walkPos_endpoint_ge, stated as a one-line use.

defMathFin.reflectionPrincipleEquivsource
{n : ℕ} → (a b : ℤ) → { ω // HitsLevel a ω ∧ walkPos ω n = b } ≃ { ω // HitsLevel a ω ∧ walkPos ω n = 2 * a - b }

The reflection-principle bijection (André 1887, counting form).

For any a, b : ℤ, the set of paths that hit level a and end at b is in bijection with the set of paths that hit level a and end at 2a − b, via reflectAtFirstHit a.

The bijection is an involution (when applied twice, recovers the original path).

defMathFin.hitsLevelEquivAbovesource
{n : ℕ} → (a b : ℤ) → 0 < a → a ≤ b → { ω // HitsLevel a ω ∧ walkPos ω n = b } ≃ { ω // walkPos ω n = b }

Endpoint-above-a implies HitsLevel — packaged as an Equiv between {ω : hits a, ends at b} and {ω : ends at b} for b ≥ a > 0.

By the IVT, walkPos ω n = b ≥ a > 0 automatically implies HitsLevel a ω, so the HitsLevel condition is redundant.

defMathFin.reflectionPrincipleEquivBelowsource
{n : ℕ} → (a b : ℤ) → 0 < a → b ≤ a → { ω // HitsLevel a ω ∧ walkPos ω n = b } ≃ { ω // walkPos ω n = 2 * a - b }

Reflection bijection (below-the-barrier form) — clean counting Equiv between paths-touching-a-ending-at-b (with b ≤ a) and paths-ending- at-(2a − b) (no hitting condition on the right, by IVT, since 2a − b ≥ a).

This is the form actually used in barrier-option pricing: the LHS is "paths that touch the barrier and end at b," the RHS is the simple endpoint distribution at 2a − b.

defMathFin.firstHit?source
{n : ℕ} → (Fin n → Bool) → ℤ → Option ℕ

First hitting time (Option-returning): some τ if the path hits level a (with τ the first hit time), else none.

theoremMathFin.firstHit?_eq_some_of_hitsLevelsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ) (h : HitsLevel a ω), firstHit? ω a = some (firstHit ω a h)
theoremMathFin.firstHit?_eq_none_iff_not_hitsLevelsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ), firstHit? ω a = none ↔ ¬HitsLevel a ω
theoremMathFin.firstHit?_isSome_iffsource
∀ {n : ℕ} (ω : Fin n → Bool) (a : ℤ), (firstHit? ω a).isSome = true ↔ HitsLevel a ω