proposition: Lemma rswap_cmd_assertD_eq : ∀ A (B : choice_type) b (c : command A) (r : _ → _ → raw_code B), ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ x ← cmd c ;; #assert b as e ;; r e x ≈ #assert b as e ;; x ← cmd c ;; r e x ⦃ eq ⦄.
proof: Proof. intros A B b c r. eapply rsymmetry. eapply rpost_weaken_rule. 1: eapply rpre_weaken_rule. - eapply rswap_assertD_cmd_eq. - simpl. intuition auto. - intros [] []. intuition auto. 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)