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. The dirac v₀ measure concentrates all probability mass at the single point v₀, so this models a situation where the outcome is known to be v₀ with certainty.
K v₀: This is the hyper-assertion from the family K corresponding to the single outcome v₀.
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 ha to assume a is a resource where the left-hand side holds.
- Unfold the definition of
jointCondition in ha. This will give you existential witnesses: a family of probability spaces P, permissions p, compatibility proofs h, and kernels κ.
- You will also have three conditions relating these witnesses to
a and K.
- Simplify these conditions using the properties of
μ := (MeasureTheory.Measure.dirac v₀).toPMF.
- The support
μ.support is the singleton set {v₀}. This simplifies the universal quantification over the support to a single case for v₀.
- The measure
μ.toMeasure is Measure.dirac v₀. The condition (P i).μ = μ.toMeasure.bind (κ i) will simplify to (P i).μ = κ i v₀.
- Use this equality to show that the resource passed to
K v₀ in the third condition is precisely the resource res := (fun i => ⟨⟨WithTop.some (P i), p i⟩, h i⟩) constructed from the witnesses.
- You now have
res ≤ a (from the first condition) and res ∈ K v₀ (from the third, simplified condition).
- Since
K v₀ is a HyperAssertion, it is an UpperSet and thus upward-closed. From res ≤ a and res ∈ K v₀, you can conclude a ∈ 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, where ha : a ∈ K v₀. The goal is to show that a is in the set defined by jointCondition, which means proving an existential statement.
- You need to provide witnesses for
P, p, h, and κ. The key is to construct a resource res of the "concrete" form fun 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
a itself to construct res. If a is already in this concrete form (i.e., none of its PSp components are ⊥), you can extract P, p, and h directly from a. In this case, res would be a, res ≤ a is trivial, and res ∈ K v₀ is exactly the hypothesis ha.
- The main difficulty is the general case where
a may contain ⊥ components for some probability spaces. You need to find a way to construct a "concrete" resource res that is included in a (res ≤ a) and for which you can prove res ∈ K v₀. This step might require a lemma about the structure of the IndexedPSpPm CMRA, possibly showing that any resource a can be decomposed into a concrete part and a remainder.
- Once you have such a
res (built from P, p, h), you can define the kernel κ as κ i v₀ := (P i).μ (and some arbitrary measure for v ≠ v₀) to satisfy the measure equality condition. The sorry for IsProbabilityMeasure in the definition of jointCondition can be discharged because (P i).μ is a probability measure by construction.
Goal: Replace the sorry with a complete proof.
Link to the sorry on GitHub
Code Snippet:
theorem C_unit_left [Countable β] [MeasurableSingletonClass β] {v₀ : β} :
𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K ⊣⊢ K v₀ := by
sorry
A proof in
src/Bluebell/Logic/JointCondition.leancontains asorry.🤖 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 withv₀.Context
This theorem is a fundamental "unit law" or "elimination rule" for the
jointConditionmodality (𝑪_). 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) >>= fsimplifying tof xin 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 usingapply iff_entails.mpr; splitor a similar tactic.1. Direction 1:
𝑪_ (MeasureTheory.Measure.dirac v₀).toPMF K ⊢ K v₀This is the more straightforward direction.
intro a hato assumeais a resource where the left-hand side holds.jointConditioninha. This will give you existential witnesses: a family of probability spacesP, permissionsp, compatibility proofsh, and kernelsκ.aandK.μ := (MeasureTheory.Measure.dirac v₀).toPMF.μ.supportis the singleton set{v₀}. This simplifies the universal quantification over the support to a single case forv₀.μ.toMeasureisMeasure.dirac v₀. The condition(P i).μ = μ.toMeasure.bind (κ i)will simplify to(P i).μ = κ i v₀.K v₀in the third condition is precisely the resourceres := (fun i => ⟨⟨WithTop.some (P i), p i⟩, h i⟩)constructed from the witnesses.res ≤ a(from the first condition) andres ∈ K v₀(from the third, simplified condition).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 KThis direction is more challenging as it requires constructing witnesses.
intro a ha, whereha : a ∈ K v₀. The goal is to show thatais in the set defined byjointCondition, which means proving an existential statement.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₀.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.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.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
sorrywith a complete proof.Link to the sorry on GitHub
Code Snippet: