proposition: Lemma coef_poly_eq {R: ringType} (q1 q2: {poly R}): (forall i, q1`_i = q2`_i) <-> q1 = q2.
proof: Proof. split=> H. 2: by rewrite H. apply: poly_inj. move: H. case: q2. case: q1. elim=> [|a1 s1 IHs1] Hs1 [|a2 s2 ] //= Hs2 H. - move /eqP in Hs2. destruct Hs2. specialize (H (size s2)). rewrite nth_nil nth_last in H. by rewrite H. - move /eqP in Hs1. destruct Hs1. specialize (H (size s1)). rewrite nth_nil nth_last in H. by rewrite -H. - move: (fun i => H i.+1) => HS. specialize (H 0%N). simpl in *. rewrite H. f_equal. apply: IHs1 => //. all: apply: last_neq_0. + by apply: Hs1. + by apply: Hs2. Qed.
imports: Relational(OrderEnrichedCategory GenericRulesSimple) mathcomp(all_ssreflect all_algebra reals distr realsum ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice seq) Mon(SPropBase) Crypt(Axioms ChoiceAsOrd SubDistr Couplings UniformDistrLemmas FreeProbProg Theta_dens RulesStateProb pkg_core_definition choice_type pkg_composition pkg_rhl Package Prelude) extructures(ord fset fmap) Equations(Equations)