proposition: Lemma contract_put : ∀ A ℓ v v' (r : raw_code A), ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ #put ℓ := v' ;; r ≈ #put ℓ := v ;; #put ℓ := v' ;; r ⦃ eq ⦄.
proof: Proof. intros A ℓ v v' r. eapply rrewrite_eqDistrR. 1: eapply rreflexivity_rule. intros s. simpl. unfold θ_dens, θ0. simpl. unfold Theta_dens.unary_theta_dens_obligation_1. unfold OrderEnrichedRelativeAdjunctionsExamples.ToTheS_obligation_1. simpl. unfold UniversalFreeMap.outOfFree_obligation_1. rewrite set_heap_contract. 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)