1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
17 include "Q/fraction/finv.ma".
19 theorem denominator_integral_factor_finv:
20 ∀f. enumerator_integral_fraction f = denominator_integral_fraction (finv f).
26 elim z; simplify; reflexivity]
29 definition is_positive ≝
36 definition is_negative ≝
44 theorem is_positive_denominator_Qinv:
45 ∀q. is_positive q → enumerator q = denominator (Qinv q).
52 | rewrite > denominator_integral_factor_finv;
56 theorem is_negative_denominator_Qinv:
57 ∀q. is_negative q → enumerator q = -(denominator (Qinv q)).
64 | rewrite > denominator_integral_factor_finv;
66 elim (denominator_integral_fraction (finv f));
69 | generalize in match (lt_O_defactorize_aux (nat_fact_of_integral_fraction a) O);
70 elim (defactorize_aux (nat_fact_of_integral_fraction a) O);
72 [ elim (Not_lt_n_n ? H)
76 theorem is_positive_enumerator_Qinv:
77 ∀q. is_positive q → enumerator (Qinv q) = denominator q.
79 lapply (is_positive_denominator_Qinv (Qinv q));
80 [ rewrite > Qinv_Qinv in Hletin;
82 | elim q in H ⊢ %; assumption]
85 theorem is_negative_enumerator_Qinv:
86 ∀q. is_negative q → enumerator (Qinv q) = -(denominator q).
88 lapply (is_negative_denominator_Qinv (Qinv q));
89 [ rewrite > Qinv_Qinv in Hletin;
91 | elim q in H ⊢ %; assumption]