-
Notifications
You must be signed in to change notification settings - Fork 3
Description
A proof in src/Bluebell/Logic/JointCondition.lean contains a sorry.
🤖 AI Analysis:
Statement Explanation
This theorem states that the joint conditioning modality 𝑪_ behaves as a unit element when applied to a deterministic probability distribution.
The goal is to prove an equivalence (⊣⊢) between two hyper-assertions:
𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K: This is the joint conditioning modality applied with a probability mass function (PMF) that is deterministic. Thedirac v₀measure concentrates all probability mass at the single pointv₀, so this models a situation where the outcome is known to bev₀with certainty.K v₀: This is the hyper-assertion from the familyKcorresponding to the single outcomev₀.
In essence, the theorem says that conditioning on a certain event v₀ is logically equivalent to simply asserting the hyper-assertion associated with v₀.
Context
This theorem is a fundamental "unit law" or "elimination rule" for the jointCondition modality (𝑪_). The 𝑪_ modality is designed to reason about properties that hold across all possible outcomes of a random process described by a PMF μ. This theorem provides a crucial sanity check: when the random process is not random at all (i.e., it's deterministic), the complex modality should simplify to a direct assertion.
This is analogous to unit laws in other contexts, for example, (return x) >>= f simplifying to f x in monads. It connects the general, probabilistic reasoning power of 𝑪_ back to the simpler, non-probabilistic fragment of the logic. Such properties are essential for ensuring the modality is well-behaved and for simplifying proofs involving deterministic cases.
Proof Suggestion
The proof goal is an equivalence (⊣⊢), which corresponds to proving entailment in both directions. You should structure your proof accordingly, likely using apply iff_entails.mpr; split or a similar tactic.
1. Direction 1: 𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K ⊢ K v₀
This is the more straightforward direction.
- Start with
intro a hato assumeais a resource where the left-hand side holds. - Unfold the definition of
jointConditioninha. This will give you existential witnesses: a family of probability spacesP, permissionsp, compatibility proofsh, and kernelsκ. - You will also have three conditions relating these witnesses to
aandK. - Simplify these conditions using the properties of
μ := (MeasureTheory.Measure.dirac v₀).toPMF.- The support
μ.supportis the singleton set{v₀}. This simplifies the universal quantification over the support to a single case forv₀. - The measure
μ.toMeasureisMeasure.dirac v₀. The condition(P i).μ = μ.toMeasure.bind (κ i)will simplify to(P i).μ = κ i v₀.
- The support
- Use this equality to show that the resource passed to
K v₀in the third condition is precisely the resourceres := (fun i => ⟨⟨WithTop.some (P i), p i⟩, h i⟩)constructed from the witnesses. - You now have
res ≤ a(from the first condition) andres ∈ K v₀(from the third, simplified condition). - Since
K v₀is aHyperAssertion, it is anUpperSetand thus upward-closed. Fromres ≤ aandres ∈ K v₀, you can concludea ∈ K v₀.
2. Direction 2: K v₀ ⊢ 𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K
This direction is more challenging as it requires constructing witnesses.
- Start with
intro a ha, whereha : a ∈ K v₀. The goal is to show thatais in the set defined byjointCondition, which means proving an existential statement. - You need to provide witnesses for
P,p,h, andκ. The key is to construct a resourceresof the "concrete" formfun i => ⟨⟨WithTop.some (P i), p i⟩, h i⟩that satisfies two properties:res ≤ a(inclusion in the CMRA sense).res ∈ K v₀.
- A natural first attempt is to use
aitself to constructres. Ifais already in this concrete form (i.e., none of itsPSpcomponents are⊥), you can extractP,p, andhdirectly froma. In this case,reswould bea,res ≤ ais trivial, andres ∈ K v₀is exactly the hypothesisha. - The main difficulty is the general case where
amay contain⊥components for some probability spaces. You need to find a way to construct a "concrete" resourceresthat is included ina(res ≤ a) and for which you can proveres ∈ K v₀. This step might require a lemma about the structure of theIndexedPSpPmCMRA, possibly showing that any resourceacan be decomposed into a concrete part and a remainder. - Once you have such a
res(built fromP,p,h), you can define the kernelκasκ i v₀ := (P i).μ(and some arbitrary measure forv ≠ v₀) to satisfy the measure equality condition. ThesorryforIsProbabilityMeasurein the definition ofjointConditioncan be discharged because(P i).μis a probability measure by construction.
Goal: Replace the sorry with a complete proof.
Code Snippet:
theorem C_unit_left [Countable β] [MeasurableSingletonClass β] {v₀ : β} :
𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K ⊣⊢ K v₀ := by
sorry