proposition: Lemma rsame_head_alt : ∀ {A B : ord_choiceType} {L} (m : raw_code A) (f₀ f₁ : A → raw_code B) pre (post : postcond B B), ValidCode L [interface] m → (∀ (ℓ : Location), ℓ \in L → get_pre_cond ℓ pre) → (∀ (ℓ : Location) v, ℓ \in L → put_pre_cond ℓ v pre) → (∀ a, ⊢ ⦃ pre ⦄ f₀ a ≈ f₁ a ⦃ post ⦄) → ⊢ ⦃ pre ⦄ x ← m ;; f₀ x ≈ x ← m ;; f₁ x ⦃ post ⦄.
proof: Proof. intros A B L m f₀ f₁ pre post hm hget hput hf. eapply rsame_head_alt_pre. 2: auto. eapply rpre_weaken_rule. 1: eapply rpost_weaken_rule. - eapply r_reflexivity_alt. all: eauto. - intros [] [] []. intuition eauto. - simpl. 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)