proposition: Theorem r_assert : ∀ b₀ b₁ (pre : precond) (post : postcond _ _), (∀ s, pre s → b₀ = b₁) → (∀ s₀ s₁, b₀ = true ∧ b₁ = true → post s₀ s₁) → ⊢ ⦃ pre ⦄ assert b₀ ≈ assert b₁ ⦃ post ⦄.
proof: Proof. intros b₀ b₁ pre post hpre hpost. eapply rpre_weaken_rule. 1: eapply rpost_weaken_rule. 1: eapply r_assert'. - simpl. intros [? ?] [? ?]. eapply hpost. - simpl. intros ? ?. eapply hpre. Qed.
imports: Coq(Utf8) Relational(OrderEnrichedCategory OrderEnrichedRelativeMonadExamples) mathcomp(ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice reals distr seq all_algebra fintype realsum) extructures(ord fset fmap) Mon(SPropBase) Crypt(Prelude Axioms ChoiceAsOrd SubDistr Couplings RulesStateProb UniformStateProb UniformDistrLemmas StateTransfThetaDens StateTransformingLaxMorph choice_type pkg_core_definition pkg_notation pkg_tactics pkg_composition pkg_heap pkg_semantics pkg_lookup pkg_advantage pkg_invariants pkg_distr) Equations.Prop.DepElim Equations(Equations) Crypt(FreeProbProg)