proposition: Lemma r_put_get_swap : ∀ ℓ ℓ' v, ℓ' != ℓ → ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ #put ℓ := v ;; x ← get ℓ' ;; ret x ≈ x ← get ℓ' ;; #put ℓ := v ;; ret x ⦃ eq ⦄.
proof: Proof. intros ℓ ℓ' v ne. eapply rsymmetry. eapply rsym_pre. 1: auto. eapply rpost_weaken_rule. - eapply r_get_put_swap. auto. - intros [] []. 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)