Let $(X\_\alpha)\_{\alpha \in A}$ be a family of boolean random variables $X\_\alpha: \Omega \to \{0,1\}$ on a probability space $\Omega = (\Omega, {\mathcal F}, {\mathbf P})$. Let ${\mathcal S}$ be a family of boolean sentences that each involve finitely many of the $X\_\alpha$. Suppose that each sentence $S \in {\mathcal S}$ is almost surely satisfied by the $(X\_\alpha)\_{\alpha \in A}$. Can one then "repair" the random variables by locating further random variables $(\tilde X\_\alpha)\_{\alpha \in A}$ with each $\tilde X\_\alpha$ almost surely equal to $X\_\alpha$, such that the $\tilde X\_\alpha$ *surely* satisfy all the sentences $S \in {\mathcal S}$?


If $|A| \leq \aleph\_0$ (that is to say there are at most countably many random variables) then the task is easy, for then the set of sentences $S$ is also at most countable, and (because the countable union of null events is null) there is a single null event $N$ outside of which the $X\_\alpha$ already surely satisfy all the sentences $S$. In particular there is a deterministic choice $X\_\alpha^0 \in \{0,1\}$ of boolean inputs that satisfy all the sentences, and if one sets $\tilde X\_\alpha$ to equal $X\_\alpha$ outside of $N$ and $X\_\alpha^0$ in $N$, we obtain the claim.


If $|A| \leq \aleph\_1$ (that is to say $A$ has at most the cardinality of the first uncountable ordinal) and $\Omega$ is complete, then a slight variant of the above argument also works. We may well order $A$ so that every element $\alpha$ has at most countably many predecessors. We then use transfinite induction to recursively select $\tilde X\_\alpha$ almost surely equal to $X\_\alpha$, with the property that for all (not just almost all) sample points $\omega \in \Omega$, the tuple $(\tilde X\_\beta(\omega))\_{\beta \leq \alpha}$ may be extended to a tuple $(x\_\beta)\_{\beta \in A}$ solving all the sentences $S \in {\mathcal S}$. Indeed, if such variables $\tilde X\_\beta$ have already been constructed for all $\beta < \alpha$, then the random variable $X\_\alpha$ will already have this property outside of a null set $N\_\alpha$ (here we use the fact that the set of tuples in the metrisable space $\{0,1\}^{\{ \beta: \beta \leq \alpha\}}$ that can be extended is the continuous image of a compact set and is thus closed and measurable). For each $\omega \in N\_\alpha$, there exists at least one choice of $\tilde X\_\alpha(\omega)$ that will obey the required extension property, thanks to the compactness theorem; using the axiom of choice to arbitrarily define $\tilde X\_\alpha$ on this null set, we obtain a $\tilde X\_\alpha$ with the required properties (it is measurable because $\Omega$ is assumed complete), and then the entire tuple $(\tilde X\_\alpha)\_{\alpha \in A}$ will surely satisfy all the sentences $S \in {\mathcal S}$. [It may be possible to drop the completeness hypothesis here by appealing to a measurable selection theorem; I have not thought about this carefully.]


Another illustrative case where the answer is affirmative is if $A$ is arbitrary and ${\mathcal S}$ is just the collection of equality sentences $X\_\alpha = X\_\beta$ for $\alpha,\beta \in A$. Thus we have $X\_\alpha=X\_\beta$ almost surely for each $\alpha,\beta$, and we wish to modify each $X\_\alpha$ on a null set to create new random variables $\tilde X\_\alpha$ such that $\tilde X\_\alpha = \tilde X\_\beta$. Note that for each $\omega \in \Omega$ it is not necessarily the case (even after deleting a null set) that all the $X\_\alpha(\omega)$ are equal to each other (e.g., suppose $A=\Omega=[0,1]$ and $X\_\alpha(\omega) = 1\_{\alpha=\omega}$), but nevertheless the problem is easily solved in this case by arbitrarily selecting one element $\alpha\_0$ of $A$ and defining $\tilde X\_\alpha := X\_{\alpha\_0}$.


However, I do not have a good intuition as to whether the answer to this question is affirmative in general, even if one assumes good properties on the probability space $\Omega$ (e.g., that it is a standard probability space). The appearance of the cardinal $\aleph\_1$ hints that perhaps the answer is sensitive to undecidable axioms in set theory.


(For my ultimate application I would eventually like to replace the boolean space $\{0,1\}$ with the interval $[0,1]$ or other Polish spaces, and the sentences $S$ with closed conditions involving finitely many or countably many of the variables at a time, but the Boolean case already seems nontrivial and captures much of the essence of the problem.)


EDIT: The following "near-counterexample" may also be suggestive. Set $\Omega = [0,1]$, let $A = 2^{[0,1]}$ be the power set of $\Omega$, and let $\mathcal{S}$ be the set of sentences $X\_\alpha = X\_\beta$ where $\alpha,\beta \subset [0,1]$ differ by at most one point. If one sets $X\_\alpha(\omega) := 1\_{\omega \in \alpha}$, then one morally has that the $X\_\alpha$ almost surely satisfy all the sentences in $S$, but that there is no way to repair the $X\_\alpha$ to random variables $\tilde X\_\alpha$ that surely satisfy the equations as this would force $\tilde X\_{[0,1]} = \tilde X\_\emptyset$ while $X\_{[0,1]}=1$ and $X\_\emptyset = 0$. However this is not actually a counterexample because most of the $X\_\alpha$ are non-measurable. (Removed due to errors)



Can random variables that almost surely solve equations be repaired to surely solve these equations?
In Terry's answer, he shows that his original question reduces to the question of whether, given a $\sigma$-algebra $\mathcal F$ on some set $X$ and a measure $\mu$ on $(X,\mathcal F)$, there is a ``splitting'' of the quotient algebra $\mathcal F / \mathcal N$, where $\mathcal N$ denotes the ideal of $\mu$-null sets. In this context, a *splitting* is a Boolean homomorphism $\Phi: \mathcal F / \mathcal N \rightarrow \mathcal F$ such that $\Phi([A]) \in [A]$ for all $A \in \mathcal F$. (Some authors call this a *lifting* instead of a splitting.) When some such $\Phi$ exists, let us say that $(X,\mathcal F,\mu)$ has a splitting.


I did some digging on this question this afternoon, and found two very good sources of information: David Fremlin's article in the *Handbook of Boolean Algebras* (available [here](http://euclid.colorado.edu/%7Emonkd/monk49.pdf)) and a survey paper by Maxim Burke entitled "Liftings for noncomplete probability spaces" (available [here](https://nyaspubs.onlinelibrary.wiley.com/doi/epdf/10.1111/j.1749-6632.1993.tb52507.x)). I'll summarize some of what I found below to supplement what Terry mentions in his answer. He mentions already that it is independent of ZFC whether $([0,1],\text{Borel},\text{Lebesgue})$ has a splitting:



> 
> $\bullet$ (von Neumann, 1931) Assuming $\mathsf{CH}$, $([0,1],\text{Borel},\text{Lebesgue})$ has a splitting.
> 
> 
> $\bullet$ (Shelah, 1983) There is a forcing extension in which $([0,1],\text{Borel},\text{Lebesgue})$ has no splitting.
> 
> 
> 


Also mentioned already is the fact that if we expand the $\sigma$-algebra in question from the Borel sets to all Lebesgue-measurable sets, then the situation is more straightforward:



> 
> $\bullet$ (Maharam, 1958) If $(X,\mu)$ is a complete probability space, then $(X,\mu\text{-measurable},\mu)$ has a splitting.
> 
> 
> 


Now on to some not-yet-mentioned results.
First, it's worth pointing out that one can obtain splittings with nice extra properties.



> 
> $\bullet$ (Ioenescu-Tulcea, 1967) Let $G$ be a locally compact group, and let $\mu$ denote its Haar measure. Then $(G,\mu\text{-measurable},\mu)$ has a translation-invariant splitting (which means $\Phi([A+c]) = \Phi([A])+c$ for every $\mu\text{-measurable}$ set $A$).
> 
> 
> 


Once again, shrinking our $\sigma$-algebra from all $\mu$-measurable sets to only the Borel sets causes problems.



> 
> $\bullet$ (Johnson, 1980) There is no translation-invariant splitting for $([0,1],\text{Borel},\text{Lebesgue})$.
> 
> 
> 


Thus, interestingly, Shelah's consistency result becomes a theorem of $\mathsf{ZFC}$ if we insist on the splitting being translation-invariant (with respect to mod-$1$ addition). More generally:



> 
> $\bullet$ (Talagrand, 1982) If $G$ is a compact Abelian group and $\mu$ is its Haar measure, then there is no translation-invariant splitting for $(G,\text{Borel},\mu)$.
> 
> 
> 


What stood out to me most in Fremlin and Burke's articles is how many questions seem to be wide open.



> 
> **Open question:** Is it consistent that every probability space has a lifting?
> 
> 
> 


If yes, this would give a consistent positive answer to Terry's original question.



> 
> **Open question:** Is it consistent with $2^{\aleph\_0} > \aleph\_2$ that $([0,1],\text{Borel},\text{Lebesgue})$ has a splitting?
> 
> 
> 


(Carlson showed that it is consistent to have $2^{\aleph\_0} = \aleph\_2$ and for $([0,1],\text{Borel},\text{Lebesgue})$ to have a splitting. Specifically, he showed that this holds whenever one adds precisely $\aleph\_2$ Cohen reals to a model of $\mathsf{CH}$.)



> 
> **Open question:** Does Martin's Axiom (or $\mathsf{PFA}$, or $\mathsf{MM}$) imply that $([0,1],\text{Borel},\text{Lebesgue})$ has a splitting?
> 
> 
> **Open question:** What of the same question in other well-known models of set theory (the random model, Sacks model, Laver model, etc.)?
> 
> 
> 


