]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/procedural/Coq/Arith/Div2.mma
48ace138d7070e00144a0ec6561327adafe02a4d
[helm.git] / helm / software / matita / contribs / procedural / Coq / Arith / Div2.mma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* This file was automatically generated: do not edit *********************)
16
17 include "Coq.ma".
18
19 (*#**********************************************************************)
20
21 (*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
22
23 (* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
24
25 (*   \VV/  *************************************************************)
26
27 (*    //   *      This file is distributed under the terms of the      *)
28
29 (*         *       GNU Lesser General Public License Version 2.1       *)
30
31 (*#**********************************************************************)
32
33 (*i $Id: Div2.v,v 1.15 2003/11/29 17:28:28 herbelin Exp $ i*)
34
35 include "Arith/Lt.ma".
36
37 include "Arith/Plus.ma".
38
39 include "Arith/Compare_dec.ma".
40
41 include "Arith/Even.ma".
42
43 (* UNEXPORTED
44 Open Local Scope nat_scope.
45 *)
46
47 (* UNEXPORTED
48 Implicit Type n : nat.
49 *)
50
51 (*#* Here we define [n/2] and prove some of its properties *)
52
53 inline procedural "cic:/Coq/Arith/Div2/div2.con" as definition.
54
55 (*#* Since [div2] is recursively defined on [0], [1] and [(S (S n))], it is
56     useful to prove the corresponding induction principle *)
57
58 inline procedural "cic:/Coq/Arith/Div2/ind_0_1_SS.con" as lemma.
59
60 (*#* [0 <n  =>  n/2 < n] *)
61
62 inline procedural "cic:/Coq/Arith/Div2/lt_div2.con" as lemma.
63
64 (* UNEXPORTED
65 Hint Resolve lt_div2: arith.
66 *)
67
68 (*#* Properties related to the parity *)
69
70 inline procedural "cic:/Coq/Arith/Div2/even_odd_div2.con" as lemma.
71
72 (*#* Specializations *)
73
74 inline procedural "cic:/Coq/Arith/Div2/even_div2.con" as lemma.
75
76 inline procedural "cic:/Coq/Arith/Div2/div2_even.con" as lemma.
77
78 inline procedural "cic:/Coq/Arith/Div2/odd_div2.con" as lemma.
79
80 inline procedural "cic:/Coq/Arith/Div2/div2_odd.con" as lemma.
81
82 (* UNEXPORTED
83 Hint Resolve even_div2 div2_even odd_div2 div2_odd: arith.
84 *)
85
86 (*#* Properties related to the double ([2n]) *)
87
88 inline procedural "cic:/Coq/Arith/Div2/double.con" as definition.
89
90 (* UNEXPORTED
91 Hint Unfold double: arith.
92 *)
93
94 inline procedural "cic:/Coq/Arith/Div2/double_S.con" as lemma.
95
96 inline procedural "cic:/Coq/Arith/Div2/double_plus.con" as lemma.
97
98 (* UNEXPORTED
99 Hint Resolve double_S: arith.
100 *)
101
102 inline procedural "cic:/Coq/Arith/Div2/even_odd_double.con" as lemma.
103
104 (*#* Specializations *)
105
106 inline procedural "cic:/Coq/Arith/Div2/even_double.con" as lemma.
107
108 inline procedural "cic:/Coq/Arith/Div2/double_even.con" as lemma.
109
110 inline procedural "cic:/Coq/Arith/Div2/odd_double.con" as lemma.
111
112 inline procedural "cic:/Coq/Arith/Div2/double_odd.con" as lemma.
113
114 (* UNEXPORTED
115 Hint Resolve even_double double_even odd_double double_odd: arith.
116 *)
117
118 (*#* Application: 
119     - if [n] is even then there is a [p] such that [n = 2p]
120     - if [n] is odd  then there is a [p] such that [n = 2p+1]
121
122     (Immediate: it is [n/2]) *)
123
124 inline procedural "cic:/Coq/Arith/Div2/even_2n.con" as lemma.
125
126 inline procedural "cic:/Coq/Arith/Div2/odd_S2n.con" as lemma.
127