Entailment-shaped goal decomposition: unfolding Triple.of_entails_wp, splitting
PostCond.entails/ExceptConds.entails, and the multi-phase solveSPredEntails
that drives H ⊢ₛ T to either a closed goal or a residual.
Unfold ⦃P⦄ x ⦃Q⦄ into P ⊢ₛ wp⟦x⟧ Q by applying Tiple.of_wp, ensuring that PostShape.args ps
is reduced.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply SPred.entails_cons_intro to introduce one state variable, then introsSimp,
then peel a leading SPred.pure (σ::σs) φ s from each side of ⊢ₛ via
apply_pure_cons_entails_l/r. Returns none if no entails_cons_intro was applicable.
Performs the pure-cons cleanup at the exact iteration the state variable is introduced, so the goal stays in canonical form throughout the eta-expansion loop.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Break down H ⊢ₛ T as far as possible, reporting none when no progress was made.
- If
His pure⌜φ₁⌝, turn the goal intoh : φ₁ ⊢ ⊢ₛ T. - If also
Tis pure⌜φ₂⌝, turn the goal intoh : φ₁ ⊢ φ₂, then exit. - Otherwise,
HorTwas not pure. We continue by introducing all state variables,H s₁ ... sₙ ⊢ₛ T s₁ ... sₙ. For a monomorphic monad stack, this will an entailment onSPred []. If eitherHorTwas pure,⌜·⌝, state introduction preserves this. - Finally, turn
H ⊢ₛ Tintoh : H.down ⊢ T.down(atSPred []). - If either
Twas pure⌜φ₂⌝(andHwas not), we turnT.downintoφ₂. (NB: IfHwas pure, then we have already liftedφ₁to the local context.)
Equations
- One or more equations did not get rendered due to their size.