X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Flibrary%2FZ%2Finversion.ma;fp=matita%2Flibrary%2FZ%2Finversion.ma;h=d93a75268f8275de451e604a5187915a652c10fc;hp=0000000000000000000000000000000000000000;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1 diff --git a/matita/library/Z/inversion.ma b/matita/library/Z/inversion.ma new file mode 100644 index 000000000..d93a75268 --- /dev/null +++ b/matita/library/Z/inversion.ma @@ -0,0 +1,101 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| A.Asperti, C.Sacerdoti Coen, *) +(* ||A|| E.Tassi, S.Zacchiroli *) +(* \ / *) +(* \ / Matita is distributed under the terms of the *) +(* v GNU Lesser General Public License Version 2.1 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/Z/inversion". + +include "Z/dirichlet_product.ma". +include "Z/moebius.ma". + +definition sigma_div: (nat \to Z) \to nat \to Z \def +\lambda f.\lambda n. sigma_p (S n) (\lambda d.divides_b d n) f. + +theorem sigma_div_moebius: +\forall n:nat. O < n \to sigma_div moebius n = is_one n. +intros.elim H + [reflexivity + |rewrite > is_one_OZ + [unfold sigma_div. + apply sigma_p_moebius. + apply le_S_S. + assumption + |unfold Not.intro. + apply (lt_to_not_eq ? ? H1). + apply injective_S. + apply sym_eq. + assumption + ] + ] +qed. + +(* moebius inversion theorem *) +theorem inversion: \forall f:nat \to Z.\forall n:nat.O < n \to +dirichlet_product moebius (sigma_div f) n = f n. +intros. +rewrite > commutative_dirichlet_product + [apply (trans_eq ? ? (dirichlet_product (dirichlet_product f (\lambda n.Zone)) moebius n)) + [unfold dirichlet_product. + apply eq_sigma_p1;intros + [reflexivity + |apply eq_f2 + [apply sym_eq. + unfold sigma_div. + apply dirichlet_product_one_r. + apply (divides_b_true_to_lt_O ? ? H H2) + |reflexivity + ] + ] + |rewrite > associative_dirichlet_product + [apply (trans_eq ? ? (dirichlet_product f (sigma_div moebius) n)) + [unfold dirichlet_product. + apply eq_sigma_p1;intros + [reflexivity + |apply eq_f2 + [reflexivity + |unfold sigma_div. + apply dirichlet_product_one_l. + apply (lt_times_n_to_lt x) + [apply (divides_b_true_to_lt_O ? ? H H2) + |rewrite > divides_to_div + [assumption + |apply (divides_b_true_to_divides ? ? H2) + ] + ] + ] + ] + |apply (trans_eq ? ? (dirichlet_product f is_one n)) + [unfold dirichlet_product. + apply eq_sigma_p1;intros + [reflexivity + |apply eq_f2 + [reflexivity + |apply sigma_div_moebius. + apply (lt_times_n_to_lt x) + [apply (divides_b_true_to_lt_O ? ? H H2) + |rewrite > divides_to_div + [assumption + |apply (divides_b_true_to_divides ? ? H2) + ] + ] + ] + ] + |apply dirichlet_product_is_one_r + ] + ] + |assumption + ] + ] + |assumption + ] +qed. + \ No newline at end of file