Documentation

CsdLean4.Mathlib.Probability.CompetingExponentials

Competing exponential clocks: the first to fire wins in proportion to its rate #

Category: 1-Mathlib. No CSD content: this is the classical competing-risks computation for independent exponential waiting times.

It is the engine for the record layer's order-free Born partition (specs/q12-fibre-mechanism-scoping.md, brick Q12-b). The partition already in the corpus (RecordLayer/BornFibrePartition.cdfCell) stacks intervals in index order, which reproduces Born but imposes an arbitrary outcome order; record-layer-plan.md §3b asks instead for the symmetric noisy-argmax / race form, in which no index is privileged.

The two one-dimensional facts #

The race #

⚠️ Scope, and two findings worth carrying #

Nothing here is a new physical claim. The Born numbers this feeds are already proved for the ordered partition (RecordLayer.volume_bornCell); what the race buys is that the construction privileges no outcome.

Two things the build turned up, both recorded in specs/q12-fibre-mechanism-scoping.md:

Reference: specs/q12-fibre-mechanism-scoping.md; specs/record-layer-plan.md §3b–§3c; specs/future-work.md.

theorem ProbabilityTheory.expMeasure_Ioi {r : } (hr : 0 < r) {t : } (ht : 0 t) :

The survival function of an exponential clock: P(T > t) = e^{-rt} for t ≥ 0.

theorem ProbabilityTheory.lintegral_exp_neg_expMeasure {r S : } (hr : 0 < r) (hS : 0 S) :

The rescaling identity ∫ e^{-St} d(Exp r) = r/(r+S).

No improper integral is evaluated: e^{-St} times the Exp r density is exactly r/(r+S) times the Exp (r+S) density, and that density integrates to one.

The exponential measure lives on [0, ∞).

The race #

def ProbabilityTheory.raceCell {n : } (i : Fin (n + 1)) :
Set (Fin (n + 1))

The race cell: the clock readings on which clock i fires first.

Note what is absent: no index order, no cumulative sums, no privileged outcome. Relabelling the clocks permutes the cells, which is exactly the symmetry record-layer-plan.md §3b asks for and which cdfCell does not have.

Equations
Instances For
    theorem ProbabilityTheory.measure_raceCell {n : } (b : Fin (n + 1)) (hb : ∀ (j : Fin (n + 1)), 0 < b j) (i : Fin (n + 1)) :
    (MeasureTheory.Measure.pi fun (j : Fin (n + 1)) => expMeasure (b j)) (raceCell i) = ENNReal.ofReal (b i / j : Fin (n + 1), b j)

    ★★ The first clock to fire wins in proportion to its rate.

    For independent exponential clocks with rates b, clock i fires first with probability bᵢ / Σⱼ bⱼ. Feeding a probability vector of rates (Σ b = 1) this is bᵢ on the nose — the order-free Born partition.

    The proof splits coordinate i off the product (measurePreserving_piFinSuccAbove), reads the remaining clocks' survival as a box (Measure.pi_pi on Set.pi univ (fun _ => Ioi t)), and integrates the resulting e^{-St} against clock i by lintegral_exp_neg_expMeasure.

    The race cells are pairwise disjoint: two clocks cannot both be strictly first. This is the partition content, and it needs no hypothesis on the rates at all.

    theorem ProbabilityTheory.measure_raceCell_of_sum_eq_one {n : } (b : Fin (n + 1)) (hb : ∀ (j : Fin (n + 1)), 0 < b j) (hsum : j : Fin (n + 1), b j = 1) (i : Fin (n + 1)) :
    (MeasureTheory.Measure.pi fun (j : Fin (n + 1)) => expMeasure (b j)) (raceCell i) = ENNReal.ofReal (b i)

    ★★ The order-free Born partition. For a rate vector that is already a probability vector, clock i wins with probability exactly bᵢ.

    Compare RecordLayer.volume_bornCell, which gets the same numbers from cdfCell — but by stacking intervals in index order. Here no index is privileged: raceCell is defined by "fires strictly first", and relabelling the clocks just permutes the cells.