]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/library/Q/ratio/rinv.ma
0.99.3 -> 0.99.4
[helm.git] / matita / 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.