proposition: Theorem rbind_rule : ∀ {A1 A2 B1 B2 : ord_choiceType} {f1 f2} m1 m2 (pre : precond) (mid : postcond A1 A2) (post : postcond B1 B2), r⊨ ⦃ pre ⦄ m1 ≈ m2 ⦃ mid ⦄ → (∀ a1 a2, r⊨ ⦃ λ '(s1, s2), mid (a1, s1) (a2, s2) ⦄ f1 a1 ≈ f2 a2 ⦃ post ⦄ ) → r⊨ ⦃ pre ⦄ bind m1 f1 ≈ bind m2 f2 ⦃ post ⦄.
proof: Proof. intros A1 A2 B1 B2 f1 f2 m1 m2 pre mid post hm hf. rewrite !repr_bind. apply (bind_rule_pp (repr m1) (repr m2) pre mid post hm hf). 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)