]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/Q/ratio/rinv.ma
Preparing for 0.5.9 release.
[helm.git] / helm / software / matita / library / Q / ratio / rinv.ma
1 (**************************************************************************)
2 (*       ___                                                                *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "Q/ratio/ratio.ma".
16 include "Q/fraction/finv.ma".
17
18 definition rinv : ratio \to ratio \def
19 \lambda r:ratio.
20   match r with
21   [one \Rightarrow one
22   | (frac f) \Rightarrow frac (finv f)].
23
24 theorem rinv_rinv: ∀r. rinv (rinv r) = r.
25  intro;
26  elim r;
27   [ reflexivity
28   | simplify;
29     rewrite > finv_finv;
30     reflexivity]
31 qed.