Locally causal beable models, and the setting-dependent model of Appendix 3
DefinitionDrezetGHZ_ModelsBeable models of the three-party GHZ experiment.
-
A locally causal (Bell-local) model on a measurable space of beables consists of:
- a probability measure on that does not depend on the settings (Eq. (18));
- measurable local response probabilities for (Alice, Bob, Charlie), with . Each depends only on the beable and that party's own setting (Eq. (17)).
Its predicted joint probability (Eq. (14) with (17)–(18)) is
- The GHZ sign is for and for , and (see Eqs. (2)–(5)).
- Appendix 3 model. The local responses (Eq. (43)) are
The setting-dependent density on angle triples (Eqs. (44)–(45)) is
where , , and are the polar angles of and .
The locally causal model is the object that the GHZ theorem rules out. The Appendix 3 model shows that dropping Eq. (18) removes the obstruction.
Formalization Note The fixed state is implicit. Parties are indexed in Lean. The GHZ sign is also on the four setting triples that are not GHZ settings; the paper does not use those.
import Mathlib
import Definitions.Def_DrezetGHZ_Quantum
/-!
# Beable models of the GHZ experiment (Drezet 2023, Eqs. (14), (17), (18), (33), (39)–(44))
-/
namespace DrezetGHZ
open MeasureTheory
/-- A **Bell-local (locally causal) beable model** of the three-party experiment
(Eqs. (14), (17), (18)).
* `ρ` is the probability distribution of the beables `λ ∈ Λ`; it does **not** depend on
the settings (statistical independence / no superdeterminism, Eq. (18)).
* `P j λ n α` is the local probability `P_j(α | λ, n̂_j, ψ)` that party `j`
(`0` = Alice, `1` = Bob, `2` = Charlie) records outcome `α ∈ {±1}` given the beable `λ`
and **its own** setting `n` only (local factorizability, Eq. (17)).
The fixed quantum state `ψ` is left implicit. -/
structure LocalCausalModel (Λ : Type*) [MeasurableSpace Λ] where
/-- Setting-independent distribution `ρ(λ | ψ)` of the beables. -/
ρ : Measure Λ
isProbabilityMeasure : IsProbabilityMeasure ρ
/-- Local response probabilities `P_j(α | λ, n̂_j, ψ)`. -/
P : Fin 3 → Λ → Setting → ℤˣ → ℝ
P_nonneg : ∀ j lam n α, 0 ≤ P j lam n α
P_sum_one : ∀ j lam n, ∑ α, P j lam n α = 1
P_measurable : ∀ j n α, Measurable fun lam => P j lam n α
/-- Joint outcome probability predicted by a locally causal model (Eq. (14) with (17), (18)):
`P(α, β, γ | n̂₁, n̂₂, n̂₃) = ∫ P₁(α|λ,n̂₁) P₂(β|λ,n̂₂) P₃(γ|λ,n̂₃) dρ(λ)`. -/
noncomputable def LocalCausalModel.predict {Λ : Type*} [MeasurableSpace Λ]
(M : LocalCausalModel Λ) (n₁ n₂ n₃ : Setting) (α β γ : ℤˣ) : ℝ :=
∫ lam, M.P 0 lam n₁ α * M.P 1 lam n₂ β * M.P 2 lam n₃ γ ∂M.ρ
/-- The sign `s` of the GHZ constraint `αβγ = s` for the four GHZ settings
(Eqs. (2)–(5)): `-1` for `(x̂, x̂, x̂)`; `+1` for `(x̂, ŷ, ŷ)`, `(ŷ, x̂, ŷ)`, `(ŷ, ŷ, x̂)`.
(It is also `+1` on the other four setting triples, which play no role.) -/
def ghzSign : Setting → Setting → Setting → ℤˣ
| .x, .x, .x => -1
| _, _, _ => 1
/-- Local response probabilities of Appendix 3, Eq. (43):
`P_j(α | θ_j, x̂) = (1 + α cos θ_j)/2` and `P_j(α | θ_j, ŷ) = (1 + α sin θ_j)/2`,
where `θ_j` is the polar angle (in the `xy`-plane) of the unit vector `θ̂_j`. -/
noncomputable def appendixResponse (θ : ℝ) : Setting → ℤˣ → ℝ
| .x, α => (1 + ((α : ℤ) : ℝ) * Real.cos θ) / 2
| .y, α => (1 + ((α : ℤ) : ℝ) * Real.sin θ) / 2
/-- Polar angle of the unit vector `v n̂` (`v = ±1`, `n̂ ∈ {x̂, ŷ}`) in the `xy`-plane:
`x̂ ↦ 0`, `-x̂ ↦ π`, `ŷ ↦ π/2`, `-ŷ ↦ -π/2`. -/
noncomputable def settingAngle : Setting → ℤˣ → ℝ
| .x, v => if v = 1 then 0 else Real.pi
| .y, v => if v = 1 then Real.pi / 2 else -(Real.pi / 2)
/-- The setting-dependent ("superdeterministic") beable density of Appendix 3, Eq. (44):
`ρ(θ₁, θ₂, θ₃ | n̂₁, n̂₂, n̂₃, ψ) = ¼ ∑_{v₁v₂v₃ = s} δ(θ̂₁ − v₁n̂₁) δ(θ̂₂ − v₂n̂₂) δ(θ̂₃ − v₃n̂₃)`,
with `s = ghzSign n₁ n₂ n₃`, realised as a measure on angle triples `(θ₁, θ₂, θ₃) ∈ ℝ³`. -/
noncomputable def appendixDensity (n₁ n₂ n₃ : Setting) : Measure (ℝ × ℝ × ℝ) :=
(1 / 4 : ENNReal) •
∑ v ∈ Finset.univ.filter (fun v : ℤˣ × ℤˣ × ℤˣ => v.1 * v.2.1 * v.2.2 = ghzSign n₁ n₂ n₃),
Measure.dirac (settingAngle n₁ v.1, settingAngle n₂ v.2.1, settingAngle n₃ v.2.2)
end DrezetGHZ
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind
Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements of this proposal, with full knowledge of the source paper and of the intended meaning. It is not a blind, independent audit and must not be mistaken for independent testimony; reviewers should compare the Lean code against the source themselves.
This file defines, inside the namespace DrezetGHZ, and depends on the quantum definitions (settings and outcomes ):
A locally causal model on . Fix a type with a σ-algebra. A model consists of a measure on , a proof that is a probability measure, and a function such that:
- for all arguments;
- for all ;
- is measurable for every .
carries no setting argument, and receives only one setting.
Prediction. For settings and outcomes ,
is a Bochner integral. It would be if the integrand were not integrable, but here the integrand is measurable and takes values in .
GHZ sign. and on all seven other triples of settings.
Angle response. For : and .
Setting angle. if and otherwise; if and otherwise.
Appendix density. For settings , the measure on
Each such sum has exactly four point masses, so this is a probability measure.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.