random_switching_channel
Given channels W_G and W_H and switching parameter p ∈ (0, 1), the random switching channel has input pairs (a, b) and tagged outputs in Y ⊕ Z with transition probabilities p * W_G(y|a) and (1-p) * W_H(z|b).
Statement
def random_switching_channel {A B Y Z : Type*} [Fintype Y] [Fintype Z] (W_G : DiscreteMemorylessChannel A Y) (W_H : DiscreteMemorylessChannel B Z) (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1) : DiscreteMemorylessChannel (A × B) (Sum Y Z)
- Defined in
- arXiv:2610.41977, Section 5
- Verified
- 07 Nov 2026
- Axioms
- none listed
- Built on 1
- DiscreteMemorylessChannelA discrete memoryless channel from input alphabet A to finite output alphabet Y is defined by non-negative transition probabilities…
- Used by 2
- random_switching_distinguishability_graphFor any discrete memoryless channels W_G and W_H and switching parameter p ∈ (0, 1), the distinguishability graph of the random switching…
- proposition_5_1_random_switching_channel_realizationFor any discrete memoryless channels W_G and W_H and any switching probability p ∈ (0, 1), the distinguishability graph of the switched…
Read back from the Lean
Given types $A, B$, finite types $Y, Z$, discrete memoryless channels $W_G$ (from $A$ to $Y$) and $W_H$ (from $B$ to $Z$), a real number $p$, and proofs that $0 < p$ and $p < 1$, random_switching_channel defines a DiscreteMemorylessChannel with input type $A \times B$ and output type $Y \oplus Z$ (the sum type Sum Y Z).
Its transition probability function sends an input pair $(a, b) \in A \times B$ to:
- $p \cdot W_G.\mathrm{prob}(a, y)$ for output $\mathrm{inl}(y)$, where $y \in Y$
- $(1 - p) \cdot W_H.\mathrm{prob}(b, z)$ for output $\mathrm{inr}(z)$, where $z \in Z$.
The definition includes the proofs that these probabilities are non-negative and sum to $1$ over all outputs in $Y \oplus Z$ for every input pair $(a, b)$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The random switching channel between two discrete memoryless channels with switching parameter p in (0, 1). -/ def random_switching_channel {A B Y Z : Type*} [Fintype Y] [Fintype Z] (W_G : DiscreteMemorylessChannel A Y) (W_H : DiscreteMemorylessChannel B Z) (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1) : DiscreteMemorylessChannel (A × B) (Sum Y Z) where prob := fun ab => fun | Sum.inl y => p * W_G.prob ab.1 y | Sum.inr z => (1 - p) * W_H.prob ab.2 z prob_nonneg := by rintro ⟨a, b⟩ (y | z) · exact mul_nonneg hp0.le (W_G.prob_nonneg a y) · exact mul_nonneg (sub_nonneg.mpr hp1.le) (W_H.prob_nonneg b z) prob_sum := by rintro ⟨a, b⟩ rw [Fintype.sum_sum_type] simp_rw [← Finset.mul_sum] rw [W_G.prob_sum a, W_H.prob_sum b, mul_one, mul_one] linarith