-
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 describes how the jointCondition modality (𝑪_) interacts with separating conjunction (∗, written as sep) when one of the conjuncts is an assertTrue assertion.
The theorem states:
𝑪_ μ (fun v => sep (K v) (assertTrue i E)) ⊢ assertTrue i E ∗ 𝑪_ μ K
In simpler terms:
- LHS: Assume that under a probabilistic context defined by a probability mass function
μ, for each possible outcomev, the hyper-assertionK vholds for some part of the resource, and simultaneously, the assertionassertTrue i Eholds for a disjoint part of the resource.assertTrue i Emeans that the boolean-valued expressionEis true almost surely at indexi. - RHS: This implies that we can split the total resource into two disjoint parts. One part satisfies
assertTrue i Eon its own, and the other part satisfies the joint condition𝑪_ μ Kfor the family of assertionsK.
Essentially, this theorem allows "pulling out" a v-independent assertTrue assertion from inside the 𝑪_ modality, transforming an internal separation (for each v) into an external separation on the whole resource.
Context
This theorem is a crucial structural rule for the jointCondition modality, similar to a framing or distributivity law. It is part of a series of theorems in the JointConditioning section that establish the logical properties of 𝑪_.
-
It is related to
C_frame, which allows pushing a separated assertion into the modality (P ∗ 𝑪_ μ K ⊢ 𝑪_ μ (fun v => sep P (K v))). This theorem,C_sep_assertTrue, provides a rule for the other direction, but specifically forassertTrueassertions. This is important for modular reasoning, allowing properties established with certainty (likeassertTrue) to be separated from properties that depend on probabilistic outcomes. -
The proof will deeply interact with the underlying CMRA model,
IndexedPSpPm. An element of this type is a function from an index setItoPSpPmelements. APSpPmis a pair of a probability space (PSp) and a permission map (Permission). The separating conjunction (∗) is defined in terms of the pointwise composition (•) of these structures, which for probability spaces involves theindepProductoperation.assertTrue i Eprimarily constrains the probability space at indexi.
Proof Suggestion
-
Unfold definitions: Start by assuming an arbitrary resource
asatisfies the LHS. Useintro a ha. Your goal is to showa ∈ assertTrue i E ∗ 𝑪_ μ K.- Unfold the definition of
𝑪_inha. This gives you witnesses(P, p, h, κ)and three key properties: an inclusion (h_incl), a measure equality (h_μ), and a property for each outcomev(h_K). - Unfold the goal. You need to find two resources,
aEandaC, such thataE • aC ≤ a,aEsatisfiesassertTrue i E, andaCsatisfies𝑪_ μ K.
- Unfold the definition of
-
Deconstruct the hypothesis: The core of the argument comes from
h_K, which states that for eachv ∈ μ.support, the resource constructed from the kernelκcan be separated:res κ v ∈ sep (K v) (assertTrue i E).- This means for each
v, there's a decompositionres κ v = rK v • rE v, whererK v ∈ K vandrE v ∈ assertTrue i E. - This decomposition of
PSpPmresources implies decompositions of the underlying probability spaces and permissions at each indexj.
- This means for each
-
Exploit
v-independence: The assertionassertTrue i Eis independent of the outcomev. The resourcesrE vthat satisfy it might depend onv, but they all makeEtrue at indexi. The propertyassertTrue i Eshould have{i}as its set ofrelevantIndices. This means forj ≠ i,rE v jis likely the identity element of the CMRA, so the resource decomposition is only non-trivial at indexi. -
Construct witnesses for the goal:
- Construct
aE: DefineaEas the resource that establishesassertTrue i E. This resource should be trivial (identity) for all indicesj ≠ i. For indexi, you need to construct its probability space and permission components by "aggregating" or finding a common component among all therE v iresources. - Construct
aC: DefineaCas the "remainder" of the original resource fromhaafter carving outaE. You will need to showaE • aC ≤ a, which should follow from the initial inclusionh_incl.
- Construct
-
Prove
aC ∈ 𝑪_ μ K: This is the most involved step. You need to provide new witnesses(P', p', h', κ')foraC.- These new witnesses will be the "K-parts" of the original witnesses
(P, p, h, κ). - For example,
p' iwill be what's left ofp iafter separating the permission part foraE. Similarly forP' i. - The new kernel
κ' i vwill correspond to the measure of the probability space component ofrK v i. - You will then need to verify the three conditions for
𝑪_with these new witnesses. The main challenge is proving the measure equality(P' i).μ = μ.toMeasure.bind (κ' i), which will involve reasoning about howindepProductof probability spaces andMeasure.bindinteract. The fact thatres κ' vis essentiallyrK vwill make provingres κ' v ∈ K vstraightforward.
- These new witnesses will be the "K-parts" of the original witnesses
Goal: Replace the sorry with a complete proof.
Code Snippet:
theorem C_sep_assertTrue {i : I} {E : (α → V) → Bool} :
𝑪_ μ (fun v => sep (K v) (assertTrue i E)) ⊢ assertTrue i E ∗ 𝑪_ μ K := by
sorry