-
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 an equivalence (⊣⊢) for the jointCondition modality 𝑪_. The equivalence relates a pure assertion about the probability mass function μ to an assertion inside the modality's body.
On the left-hand side (LHS), ⌜ ∑' x : s, μ x = 1 ⌝ ∗ 𝑪_ μ K asserts two things hold on separate resources:
⌜ ∑' x : s, μ x = 1 ⌝: A pure (pure) assertion stating that the total probability mass of the PMFμover the setsis equal to 1. This is equivalent to saying that the support ofμis a subset ofs.𝑪_ μ K: ThejointConditionmodality, which asserts the existence of a resource decomposition (probability spacesP, permissionsp, and kernelsκ) such that for every outcomevin the support ofμ, the hyper-assertionK vholds on the corresponding updated resource.
On the right-hand side (RHS), 𝑪_ μ (fun v => sep (pure (v ∈ s)) (K v)) is a single jointCondition assertion. It is similar to the one on the LHS, but the body of the modality is different. For each outcome v in the support of μ, it asserts that K v holds and that the pure proposition v ∈ s is true.
In essence, the theorem shows that a pure fact about the distribution μ (that its support is in s) can be moved inside the 𝑪_ modality, becoming a pure fact about each outcome v.
Context
This theorem is a "purity" law, a fundamental property for the jointCondition modality (𝑪_). It establishes how pure, propositional facts interact with the modality. This is analogous to similar rules in other Iris-like separation logics (e.g., ⌜φ⌝ ∗ P ⊣⊢ ⌜φ⌝ ∧ P).
This law is part of a larger collection of theorems in the JointConditioning section that define the logical behavior of 𝑪_. Other theorems like C_conseq (monotonicity), C_frame (framing), C_assoc (associativity), and C_and (conjunction) work together to provide a robust logical framework for reasoning about probabilistic computations. This particular theorem is crucial for using global information about a probability distribution to reason about properties that must hold for any of its possible outcomes.
Proof Suggestion
The goal is an equivalence (⊣⊢), which requires proving entailment in both directions. The core of the proof relies on the relationship between ∑' x : s, μ x = 1 and μ.support ⊆ s.
Direction 1: LHS ⊢ RHS
- Start by unfolding the definitions of entailment,
∗(sep),⌜...⌝(pure), and𝑪_(jointCondition). - You will have hypotheses stating that
∑' x : s, μ x = 1is true, and that there exist witnessesP, p, h, κfor𝑪_ μ Kholding on some resourcec. - Your goal is to show
a ∈ 𝑪_ μ (fun v => sep (pure (v ∈ s)) (K v)). Use the same witnessesP, p, h, κ. - You need to prove the three properties for these witnesses:
a. The inclusion property for the resource. This should follow from the upward-closure of hyper-assertions and the properties of separating conjunction with a pure assertion.
b. The measure equality(P i).μ = μ.toMeasure.bind (κ i), which you already have from the hypothesis.
c. The property∀ v ∈ μ.support, sep (pure (v ∈ s)) (K v) (...). For a givenv ∈ μ.support, you need to showpure (v ∈ s)andK v.K vis true by hypothesis. To showpure (v ∈ s), you need to prove the propositionv ∈ s. Use the fact∑' x : s, μ x = 1and a lemma likePMF.tsum_eq_one_iff_support_subsetfrom Mathlib to establish thatμ.support ⊆ s.
Direction 2: RHS ⊢ LHS
- Unfold the definitions. Your hypothesis gives you witnesses
P, p, h, κfor𝑪_ μ (fun v => sep (pure (v ∈ s)) (K v)). - Your goal is to prove
a ∈ ⌜...⌝ ∗ 𝑪_ μ K. A common strategy is to provea ∈ ⌜...⌝ ∧ 𝑪_ μ K, aspure φ ∗ Pis often equivalent topure φ ∧ P. - To prove
⌜ ∑' x : s, μ x = 1 ⌝, you need to show the proposition∑' x : s, μ x = 1.
a. Your hypothesis implies that for anyv ∈ μ.support,pure (v ∈ s)holds.
b. This meansv ∈ sis true for allvin the support, soμ.support ⊆ s.
c. UsePMF.tsum_eq_one_iff_support_subsetto conclude∑' x : s, μ x = 1. - To prove
𝑪_ μ K, reuse the witnessesP, p, h, κfrom the hypothesis.
a. The inclusion and measure properties are directly available.
b. You need to show∀ v ∈ μ.support, K v (...). Your hypothesis givessep (pure (v ∈ s)) (K v) (...), which implies thatK vholds on some sub-resource. SinceK vis aHyperAssertion, it is upward-closed, so it will also hold on the larger resource(fun j => ...)as required.
Goal: Replace the sorry with a complete proof.
Code Snippet:
theorem C_pure {s : _root_.Set β} :
⌜ ∑' x : s, μ x = 1 ⌝ ∗ 𝑪_ μ K ⊣⊢ 𝑪_ μ (fun v => sep (pure (v ∈ s)) (K v)) := by
sorry