~ubuntu-branches/ubuntu/hardy/coq-doc/hardy

« back to all changes in this revision

Viewing changes to library/Coq.Reals.DiscrR.html

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2004-09-18 13:28:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040918132822-ees5mb8qmzd6a0fw
Tags: 8.0pl1.0-1
* Added the Coq faq, moved the tutorial to the root directory and added
  doc-base files for both, closes: #272204.
* Set dh_compat to level 4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html xmlns="http://www.w3.org/1999/xhtml">
 
2
<head>
 
3
<meta http-equiv="Content-Type" content="text/html; charset="><link rel="stylesheet" href="style.css" type="text/css"><title>Coq.Reals.DiscrR</title>
 
4
</head>
 
5
 
 
6
<body>
 
7
 
 
8
<h1>Library Coq.Reals.DiscrR</h1>
 
9
 
 
10
<code>
 
11
<code class="keyword">Require</code> <code class="keyword">Import</code> RIneq.<br/>
 
12
<code class="keyword">Require</code> <code class="keyword">Import</code> Omega. Open <code class="keyword">Local</code> Scope R_scope.<br/>
 
13
 
 
14
<br/>
 
15
<code class="keyword">Lemma</code> <a name="Rlt_R0_R2"></a>Rlt_R0_R2 : 0 &lt; 2.<br/>
 
16
replace 2 with (<a href="Coq.Reals.Raxioms.html#INR">INR</a> 2); [ apply lt_INR_0; apply lt_O_Sn | reflexivity ].<br/>
 
17
<code class="keyword">Qed</code>.<br/>
 
18
 
 
19
<br/>
 
20
<code class="keyword">Lemma</code> <a name="Rplus_lt_pos"></a>Rplus_lt_pos : forall x y:<a href="Coq.Reals.Rdefinitions.html#R">R</a>, 0 &lt; x -&gt; 0 &lt; y -&gt; 0 &lt; x + y.<br/>
 
21
intros.<br/>
 
22
apply <a href="Coq.Reals.Raxioms.html#Rlt_trans">Rlt_trans</a> with x.<br/>
 
23
assumption. <br/>
 
24
pattern x at 1 in |- *; rewrite &lt;- <a href="Coq.Reals.RIneq.html#Rplus_0_r">Rplus_0_r</a>.<br/>
 
25
apply <a href="Coq.Reals.Raxioms.html#Rplus_lt_compat_l">Rplus_lt_compat_l</a>.<br/>
 
26
assumption.<br/>
 
27
<code class="keyword">Qed</code>.<br/>
 
28
 
 
29
<br/>
 
30
<code class="keyword">Lemma</code> <a name="IZR_eq"></a>IZR_eq : forall z1 z2:<a href="Coq.ZArith.BinInt.html#Z">Z</a>, z1 = z2 -&gt; <a href="Coq.Reals.Raxioms.html#IZR">IZR</a> z1 = <a href="Coq.Reals.Raxioms.html#IZR">IZR</a> z2.<br/>
 
31
intros; rewrite H; reflexivity.<br/>
 
32
<code class="keyword">Qed</code>.<br/>
 
33
 
 
34
<br/>
 
35
<code class="keyword">Lemma</code> <a name="IZR_neq"></a>IZR_neq : forall z1 z2:<a href="Coq.ZArith.BinInt.html#Z">Z</a>, z1 &lt;&gt; z2 -&gt; <a href="Coq.Reals.Raxioms.html#IZR">IZR</a> z1 &lt;&gt; <a href="Coq.Reals.Raxioms.html#IZR">IZR</a> z2.<br/>
 
36
intros; red in |- *; intro; elim H; apply <a href="Coq.Reals.RIneq.html#eq_IZR">eq_IZR</a>; assumption.<br/>
 
37
<code class="keyword">Qed</code>.<br/>
 
38
 
 
39
<br/>
 
40
<code class="keyword">Ltac</code> discrR :=<br/>
 
41
&nbsp;&nbsp;try<br/>
 
42
&nbsp;&nbsp;&nbsp;match goal with<br/>
 
43
&nbsp;&nbsp;&nbsp;|  |- (?X1 &lt;&gt; ?X2) =&gt;<br/>
 
44
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace 2 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 2);<br/>
 
45
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ replace 1 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 1);<br/>
 
46
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ replace 0 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 0);<br/>
 
47
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ repeat
 
48
                 rewrite &lt;- plus_IZR ||
 
49
                   rewrite &lt;- mult_IZR ||
 
50
                     rewrite &lt;- Ropp_Ropp_IZR || rewrite Z_R_minus;
 
51
                 apply IZR_neq; try discriminate
 
52
              | reflexivity ]<br/>
 
53
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| reflexivity ]<br/>
 
54
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| reflexivity ]<br/>
 
55
&nbsp;&nbsp;&nbsp;end.<br/>
 
56
 
 
57
<br/>
 
58
<code class="keyword">Ltac</code> prove_sup0 :=<br/>
 
59
&nbsp;&nbsp;match goal with<br/>
 
60
&nbsp;&nbsp;|  |- (0 &lt; 1) =&gt; apply <a href="Coq.Reals.RIneq.html#Rlt_0_1">Rlt_0_1</a><br/>
 
61
&nbsp;&nbsp;|  |- (0 &lt; ?X1) =&gt;<br/>
 
62
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;repeat<br/>
 
63
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(apply <a href="Coq.Reals.RIneq.html#Rmult_lt_0_compat">Rmult_lt_0_compat</a> || apply <a href="Coq.Reals.DiscrR.html#Rplus_lt_pos">Rplus_lt_pos</a>;<br/>
 
64
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try apply <a href="Coq.Reals.RIneq.html#Rlt_0_1">Rlt_0_1</a> || apply <a href="Coq.Reals.DiscrR.html#Rlt_R0_R2">Rlt_R0_R2</a>)<br/>
 
65
&nbsp;&nbsp;|  |- (?X1 &gt; 0) =&gt; change (0 &lt; X1) in |- *; prove_sup0<br/>
 
66
&nbsp;&nbsp;end.<br/>
 
67
 
 
68
<br/>
 
69
<code class="keyword">Ltac</code> omega_sup :=<br/>
 
70
&nbsp;&nbsp;replace 2 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 2);<br/>
 
71
&nbsp;&nbsp;&nbsp;[ replace 1 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 1);<br/>
 
72
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ replace 0 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 0);<br/>
 
73
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ repeat
 
74
            rewrite &lt;- plus_IZR ||
 
75
              rewrite &lt;- mult_IZR ||
 
76
                rewrite &lt;- Ropp_Ropp_IZR || rewrite Z_R_minus; 
 
77
            apply IZR_lt; omega
 
78
         | reflexivity ]<br/>
 
79
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| reflexivity ]<br/>
 
80
&nbsp;&nbsp;&nbsp;| reflexivity ].<br/>
 
81
&nbsp;&nbsp;<br/>
 
82
<code class="keyword">Ltac</code> prove_sup :=<br/>
 
83
&nbsp;&nbsp;match goal with<br/>
 
84
&nbsp;&nbsp;|  |- (?X1 &gt; ?X2) =&gt; change (X2 &lt; X1) in |- *; prove_sup<br/>
 
85
&nbsp;&nbsp;|  |- (0 &lt; ?X1) =&gt; prove_sup0<br/>
 
86
&nbsp;&nbsp;|  |- (- ?X1 &lt; 0) =&gt; rewrite &lt;- <a href="Coq.Reals.RIneq.html#Ropp_0">Ropp_0</a>; prove_sup<br/>
 
87
&nbsp;&nbsp;|  |- (- ?X1 &lt; - ?X2) =&gt; apply <a href="Coq.Reals.RIneq.html#Ropp_lt_gt_contravar">Ropp_lt_gt_contravar</a>; prove_sup<br/>
 
88
&nbsp;&nbsp;|  |- (- ?X1 &lt; ?X2) =&gt; apply <a href="Coq.Reals.Raxioms.html#Rlt_trans">Rlt_trans</a> with 0; prove_sup<br/>
 
89
&nbsp;&nbsp;|  |- (?X1 &lt; ?X2) =&gt; omega_sup<br/>
 
90
&nbsp;&nbsp;| _ =&gt; idtac<br/>
 
91
&nbsp;&nbsp;end.<br/>
 
92
 
 
93
<br/>
 
94
<code class="keyword">Ltac</code> Rcompute :=<br/>
 
95
&nbsp;&nbsp;replace 2 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 2);<br/>
 
96
&nbsp;&nbsp;&nbsp;[ replace 1 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 1);<br/>
 
97
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ replace 0 with (<a href="Coq.Reals.Raxioms.html#IZR">IZR</a> 0);<br/>
 
98
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ repeat
 
99
            rewrite &lt;- plus_IZR ||
 
100
              rewrite &lt;- mult_IZR ||
 
101
                rewrite &lt;- Ropp_Ropp_IZR || rewrite Z_R_minus; 
 
102
            apply IZR_eq; try reflexivity
 
103
         | reflexivity ]<br/>
 
104
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| reflexivity ]<br/>
 
105
&nbsp;&nbsp;&nbsp;| reflexivity ].</code>
 
106
<hr/><a href="index.html">Index</a><hr/><font size="-1">This page has been generated by <a href="http://www.lri.fr/~filliatr/coqdoc/">coqdoc</a></font>
 
107
</body>
 
108
</html>
 
 
b'\\ No newline at end of file'