proposition: Lemma lagrange_basis_1 {R: fieldType} (x: R) (s: seq R): (x \notin s) = ((lagrange_basis s x).[x] == 1).
proof: Proof. rewrite /lagrange_basis. elim: s => [|a s IHs]. 1: by rewrite big_nil hornerC eq_refl. rewrite in_cons big_cons hornerM hornerZ !horner_cons hornerC GRing.mul0r GRing.add0r GRing.mul1r. destruct (x == a) eqn:Heq. - move /eqP in Heq. by rewrite Heq GRing.subrr GRing.mulr0 GRing.mul0r eq_sym GRing.oner_eq0. - apply negbT in Heq. rewrite -GRing.subr_eq0 in Heq. by rewrite GRing.mulVf // GRing.mul1r IHs. 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)