]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/Q/ratio/ratio.ma
Preparing for 0.5.9 release.
[helm.git] / helm / software / matita / library / Q / ratio / ratio.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/fraction/fraction.ma".
16
17 inductive ratio : Set \def
18       one :  ratio
19     | frac : fraction \to ratio.
20
21 definition unfrac \def \lambda f.
22 match f with
23   [one \Rightarrow pp O
24   |frac f \Rightarrow f
25   ]
26 .
27
28 lemma injective_frac: injective fraction ratio frac.
29 unfold.intros.
30 change with ((unfrac (frac x)) = (unfrac (frac y))).
31 rewrite < H.reflexivity.
32 qed.