proposition: Lemma SDistr_bind_unit_unit : ∀ (A B C : ord_choiceType) (f : A → B) (g : B → C) u, SDistr_bind (λ y, SDistr_unit _ (g y)) (SDistr_bind (λ x, SDistr_unit _ (f x)) u) = SDistr_bind (λ x, SDistr_unit _ (g (f x))) u.
proof: Proof. intros A B C f g u. apply distr_ext. simpl. intro z. unfold SDistr_bind. unfold SDistr_unit. rewrite dlet_dlet. eapply eq_in_dlet. 2:{ intro. reflexivity. } intros x hx y. rewrite dlet_unit. 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)