proposition: Theorem comp_spec_irr_r : forall (A B C : Set){eqda : EqDec A}{eqdb : EqDec B}{eqdc : EqDec C}(c1 : Comp A)(c2 : Comp B)(f2 : B -> Comp C) P, well_formed_comp c2 -> (forall b, In b (getSupport c2) -> comp_spec P c1 (f2 b)) -> comp_spec P c1 (Bind c2 f2).
proof: Proof. intuition. apply list_choice in H0. destruct H0. exists (y <-$ c2; x y). intuition. unfold marginal_l. dist_inline_first. dist_irr_r. specialize (H0 x0); intuition idtac. eapply H0. unfold marginal_r. dist_inline_first. dist_skip. specialize (H0 x0); intuition idtac. apply H2. repeat simp_in_support. specialize (H0 x0); intuition. intuition. eapply (EqDec_dec _). apply (x <-$ c1; y <-$ c2; z <-$ f2 y; ret (x, z)). Qed.
imports: FCF.Crypto FCF.Bernoulli FCF.NotationV1