36 Boolean Analysis — Bernoulli Restriction
36.1 Overview
This module sets up the Bernoulli probability model for random restrictions, in which each of the \(n\) variables is independently left free with probability \(p\) and fixed to \(\mathsf{true}\) or \(\mathsf{false}\) each with probability \((1-p)/2\). It defines the weight of a single restriction and the probability of an event, and records the basic facts that the weights are nonnegative, sum to one, and that every event probability is at most one.
36.2 Declarations
For a parameter \(p \in \mathbb {R}\) and a restriction \(\rho \) on \(n\) variables, the Bernoulli weight is
so each free variable contributes a factor \(p\) and each fixed variable a factor \((1-p)/2\).
For a parameter \(p\) and a (decidable) predicate \(\mathrm{event}\) on restrictions, the probability that the predicate holds under a Bernoulli(\(p\)) random restriction is the sum over all restrictions \(\rho \) of \(\mathrm{bernoulliRestrWeight}(p,\rho )\) weighted by the indicator of \(\mathrm{event}(\rho )\).
If \(0 \le p \le 1\), then for every restriction \(\rho \) the weight \(\mathrm{bernoulliRestrWeight}(p,\rho )\) is nonnegative.
If \(0 \le p \le 1\), then the Bernoulli weights form a probability distribution: summing \(\mathrm{bernoulliRestrWeight}(p,\rho )\) over all restrictions \(\rho \) on \(n\) variables yields \(1\).
If \(0 \le p \le 1\), then for every (decidable) event the Bernoulli probability \(\mathrm{bernoulliRestrProb}(p,\mathrm{event})\) is at most \(1\).