Solution (source code)

= Solution

Without <genotyping error>, the observed <genetic marker> <genotype> is a deterministic function $u(g)$ of the underlying <phase-known genotype>. In particular $u$ can forget chromosome phase and parental origin. Therefore
$$
\boxed{P(X_i=x\mid G_i=g)=\mathbf1_{\{u(g)=x\}}.}
$$
Several different phased <haplotype> pairs can receive factor 1 when the observed multilocus <genotype> is unphased. With laboratory error, missing <alleles> or uncertain calls, replace the indicator by an error or observation model. A wholly unobserved <genetic marker> contributes factor 1. Thus a 0-or-1 factor reflects perfect observation of a deterministic <genetic marker> state, not a general property of every genetic measurement.