proposition: Lemma r_get_vs_get_remember_rhs : ∀ {A B : choiceType} ℓ r₀ r₁ (pre : precond) (post : postcond A B), Syncs ℓ pre → (∀ x, ⊢ ⦃ λ '(s₀, s₁), (pre ⋊ rem_rhs ℓ x) (s₀, s₁) ⦄ r₀ x ≈ r₁ x ⦃ post ⦄ ) → ⊢ ⦃ λ '(s₀, s₁), pre (s₀, s₁) ⦄ x ← get ℓ ;; r₀ x ≈ x ← get ℓ ;; r₁ x ⦃ post ⦄.
proof: Proof. intros A B ℓ r₀ r₁ pre post ht h. eapply r_get_remember_lhs. intro x. eapply r_get_remember_rhs. intro y. eapply rpre_hypothesis_rule. intros s₀ s₁ [[hpre e1] e2]. simpl in e1, e2. eapply ht in hpre as e. rewrite e in e1. subst. eapply rpre_weaken_rule. - eapply h. - simpl. intuition subst. split. 1: auto. reflexivity. 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)