The centered binomial distribution and sign independence #
cbd η is the difference of two independent Binomial η 1/2 counts: the noise
distribution of ML-KEM, sampled over ℤ. It is not a uniform distribution, and
ℤ carries no Fintype instance, so SPComp.sample cannot name a program that
draws from it and liftR_uniform_bij cannot relate two such draws. sampleFrom
and rHoare_coupling_step can.
The relational content is that cbd η is symmetric under negation, so the sign
applied to a noise term is unobservable: cbd_signed_indep states that for a
secret sign s, the program e ← cbd η; k ((-1)^s * e) has the same behaviour
for both values of s.
Main definitions #
binom n— the number of successes innfair coin flipscbd η— the centered binomial distributionBinomial η 1/2 - Binomial η 1/2signed s e—-ewhens, elsee
Main results #
bind_apply_ne_zero— a bind hits every value its two stages reachmass_cbd,isLossless_sampleFrom_cbd—cbd ηis a total distributioncbd_one_ne_pure—cbd 1has at least two support points, so the example is not a point mass in disguisecbd_symm—cbd ηis invariant under negationrHoare_cbd_signed— the pRHL sampling step from that invariancecbd_signed_indep— a secret sign on the noise term is unobservableprTrue_cbd_bind— the unary averaging rule atcbd η
Support of a bind #
A bind hits b whenever some intermediate a is in the support of d and
b is in the support of f a. Converse of SDistr.bind_support_witness.
The distributions #
The number of successes in n fair coin flips.
Equations
- One or more equations did not get rendered due to their size.
- CatCrypt.NonUniform.binom 0 = CatCrypt.Prob.SDistr.pure 0
Instances For
The centered binomial distribution: the difference of two independent
binom η counts.
Equations
- CatCrypt.NonUniform.cbd η = (CatCrypt.NonUniform.binom η).bind fun (a : ℕ) => (CatCrypt.NonUniform.binom η).bind fun (b : ℕ) => CatCrypt.Prob.SDistr.pure (↑a - ↑b)
Instances For
Drawing centered binomial noise never fails.
Non-degeneracy #
cbd 1 puts mass on both 0 and 1, so it is not a point mass; and ℤ has no
uniform distribution, so the example is not a uniform draw under another name.
cbd 1 is not a point mass: 0 and 1 are both in its support.
Symmetry under negation #
The pRHL step and sign independence #
pRHL sampling step for centered binomial noise under a sign: a draw on the left is matched by the sign-flipped draw on the right.
Applying a sign to the noise term does not change the program.
The sign of a centered binomial noise term is unobservable: the program is the same for both secret signs.
Success probability of a Boolean game that starts with centered binomial
noise, as the cbd η-average of the branch probabilities.