proposition: Theorem rsame_head : ∀ {A B : ord_choiceType} {f₀ f₁ : A → raw_code B} (m : raw_code A) (post : postcond B B), (∀ a, ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ f₀ a ≈ f₁ a ⦃ post ⦄) → ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ bind m f₀ ≈ bind m f₁ ⦃ post ⦄.
proof: Proof. intros A B f₀ f₁ m post h. eapply (r_bind m m). - eapply rreflexivity_rule. - intros a₀ a₁. eapply rpre_hypothesis_rule. intros s₀ s₁ e. noconf e. eapply rpre_weaken_rule. 1: eapply h. cbn. intros ? ? [? ?]. subst. 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)