-
Notifications
You must be signed in to change notification settings - Fork 3
Description
A proof in src/Bluebell/Logic/Ownership.lean contains a sorry.
🤖 AI Analysis:
Statement Explanation
This theorem, sampledFrom_inj, establishes a uniqueness property for probability distributions within the hyper-assertion logic. It states that if an expression E at a specific index i is asserted to be sampled from a probability mass function (PMF) μ, and simultaneously asserted to be sampled from another PMF μ', then these two PMFs must be identical (μ = μ').
The hypothesis is a conjunction (HyperAssertion.and) of two assertSampledFrom assertions. The conclusion is a pure assertion, which lifts the standard proposition μ = μ' into the logic. Essentially, this rule allows you to deduce the equality of two distributions from the fact that they both describe the same random variable.
Context
This theorem is a fundamental rule for ensuring consistency in probabilistic reasoning. It's an "injectivity" property for the assertSampledFrom assertion constructor. Without this rule, the logic could potentially hold contradictory information about the distribution of a variable.
The proof relies on digging into the definitions of assertSampledFrom, ownIndexedProb, and the structure of the underlying resource model, IndexedPSpPm. A key insight is that owning a probability space resource (ownIndexedProb) constrains the underlying ProbabilitySpace to be a specific one. The structure of the PSpPm CMRA, particularly its compatibility predicate, prevents owning a "top" or "universal" probability space that would otherwise break this uniqueness. This theorem connects the abstract logical assertions with the concrete properties of the mathematical model of probability spaces.
Proof Suggestion
- Start by unfolding the
HyperAssertion.entailsdefinition. This will give you a resourcexand the hypothesis thatxsatisfies theandof the twoassertSampledFromassertions. - Unfold
HyperAssertion.andandassertSampledFrom. This will introduce two existentially quantified families of probability spaces, let's call themPandP'. You will also get propositions stating thatμ.toMeasureis the pushforward measure of(P i).μalongE, and similarly forμ'andP'. - The core of the argument is to show that these two families of probability spaces must be identical, i.e.,
P = P'. To do this, unpack theownIndexedProbassertions. You will find that for each indexj, the resourcex jmust be an upper bound for both a resource constructed fromP jand one fromP' j. - The definition of the
PSpPmCMRA is crucial here. The compatibility predicate withinPSpPmrules out the possibility of the probability space component ofx jbeing⊤(the top element). This forcesP jandP' jto be equal to the space owned byx j. - Since
P = P', it follows thatP i = P' i. - Substitute this equality into the measure equations obtained in step 2. You will find that
μ.toMeasure = μ'.toMeasure. - Use the injectivity of the
toMeasurefunction for PMFs, such asPMF.toMeasure_injorPMF.ext_iff_toMeasure_eq, to conclude thatμ = μ'. Note that this may require an assumption like[MeasurableSingletonClass β]. - Finally, unfold
HyperAssertion.purein the goal and use the derived equalityμ = μ'to complete the proof. Useful tactics for this proof will beintro,rcases,unfold,simp, andrw.
Goal: Replace the sorry with a complete proof.
Code Snippet:
theorem sampledFrom_inj {β : Type*} [MeasurableSpace β]
{i : I} {E : (α → V) → β} {μ μ' : PMF β} :
HyperAssertion.entails
(HyperAssertion.and
(assertSampledFrom (I := I) (α := α) (V := V) (F := F) i E μ)
(assertSampledFrom (I := I) (α := α) (V := V) (F := F) i E μ'))
(HyperAssertion.pure (μ = μ')) := by
sorry