diff options
| author | letouzey | 2010-11-05 18:27:39 +0000 |
|---|---|---|
| committer | letouzey | 2010-11-05 18:27:39 +0000 |
| commit | fb2e6501516184a03fbc475921c20499f87d3aac (patch) | |
| tree | 42b2d7db1823b7548f016aed6bfa5f7d0a37889f /theories/Numbers/Integer/Binary | |
| parent | c8ba2bca3d2d2118b290a199e374a1777e85e4b0 (diff) | |
Numbers: axiomatization, properties and implementations of gcd
- For nat, we create a brand-new gcd function, structural in
the sense of Coq, even if it's Euclid algorithm. Cool...
- We re-organize the Zgcd that was in Znumtheory, create out of it
files Pgcd, Ngcd_def, Zgcd_def. Proofs of correctness are revised
in order to be much simpler (no omega, no advanced lemmas of
Znumtheory, etc).
- Abstract Properties NZGcd / ZGcd / NGcd could still be completed,
for the moment they contain up to Gauss thm. We could add stuff
about (relative) primality, relationship between gcd and div,mod,
or stuff about parity, etc etc.
- Znumtheory remains as it was, apart for Zgcd and correctness proofs
gone elsewhere. We could later take advantage of ZGcd in it.
Someday, we'll have to switch from the current Zdivide inductive,
to Zdivide' via exists. To be continued...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13623 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Numbers/Integer/Binary')
| -rw-r--r-- | theories/Numbers/Integer/Binary/ZBinary.v | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/theories/Numbers/Integer/Binary/ZBinary.v b/theories/Numbers/Integer/Binary/ZBinary.v index b92b303f0d..01d36854b1 100644 --- a/theories/Numbers/Integer/Binary/ZBinary.v +++ b/theories/Numbers/Integer/Binary/ZBinary.v @@ -10,7 +10,7 @@ Require Import ZAxioms ZProperties BinInt Zcompare Zorder ZArith_dec - Zbool Zeven Zsqrt_def Zpow_def Zlog_def. + Zbool Zeven Zsqrt_def Zpow_def Zlog_def Zgcd_def. Local Open Scope Z_scope. @@ -161,6 +161,15 @@ Definition log2_spec := Zlog2_spec. Definition log2_nonpos := Zlog2_nonpos. Definition log2 := Zlog2. +(** Gcd *) + +Definition gcd_divide_l := Zgcd_divide_l. +Definition gcd_divide_r := Zgcd_divide_r. +Definition gcd_greatest := Zgcd_greatest. +Definition gcd_nonneg := Zgcd_nonneg. +Definition divide := Zdivide'. +Definition gcd := Zgcd. + (** We define [eq] only here to avoid refering to this [eq] above. *) Definition eq := (@eq Z). |
