aboutsummaryrefslogtreecommitdiff
path: root/theories/Numbers
diff options
context:
space:
mode:
authorletouzey2011-06-28 23:30:10 +0000
committerletouzey2011-06-28 23:30:10 +0000
commita0b31c88aa2bcd50524cbc48d16eb78c62da3445 (patch)
treeebf4533e46fb630e520a745f2b3df41d489a33ec /theories/Numbers
parent2941378aee6586bcff9f8a117f11e5c5c2327607 (diff)
Deletion of useless Zsqrt_def
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14245 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Numbers')
-rw-r--r--theories/Numbers/Cyclic/ZModulo/ZModulo.v12
-rw-r--r--theories/Numbers/Integer/BigZ/ZMake.v4
-rw-r--r--theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v4
-rw-r--r--theories/Numbers/Natural/BigN/NMake.v2
-rw-r--r--theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v2
5 files changed, 12 insertions, 12 deletions
diff --git a/theories/Numbers/Cyclic/ZModulo/ZModulo.v b/theories/Numbers/Cyclic/ZModulo/ZModulo.v
index 3bdbca44a8..d039fdcbf6 100644
--- a/theories/Numbers/Cyclic/ZModulo/ZModulo.v
+++ b/theories/Numbers/Cyclic/ZModulo/ZModulo.v
@@ -574,15 +574,15 @@ Section ZModulo.
generalize (Z_mod_lt [|x|] 2); omega.
Qed.
- Definition sqrt x := Zsqrt [|x|].
+ Definition sqrt x := Z.sqrt [|x|].
Lemma spec_sqrt : forall x,
[|sqrt x|] ^ 2 <= [|x|] < ([|sqrt x|] + 1) ^ 2.
Proof.
intros.
unfold sqrt.
repeat rewrite Zpower_2.
- replace [|Zsqrt [|x|]|] with (Zsqrt [|x|]).
- apply Zsqrt_spec; auto with zarith.
+ replace [|Z.sqrt [|x|]|] with (Z.sqrt [|x|]).
+ apply Z.sqrt_spec; auto with zarith.
symmetry; apply Zmod_small.
split. apply Z.sqrt_nonneg; auto.
apply Zle_lt_trans with [|x|]; auto.
@@ -594,7 +594,7 @@ Section ZModulo.
match z with
| Z0 => (0, C0 0)
| Zpos p =>
- let (s,r) := Zsqrtrem (Zpos p) in
+ let (s,r) := Z.sqrtrem (Zpos p) in
(s, if Z_lt_le_dec r wB then C0 r else C1 (r-wB))
| Zneg _ => (0, C0 0)
end.
@@ -610,8 +610,8 @@ Section ZModulo.
remember ([|x|]*wB+[|y|]) as z.
destruct z.
auto with zarith.
- generalize (Zsqrtrem_spec (Zpos p)).
- destruct Zsqrtrem as (s,r); intros [U V]; auto with zarith.
+ generalize (Z.sqrtrem_spec (Zpos p)).
+ destruct Z.sqrtrem as (s,r); intros [U V]; auto with zarith.
assert (s < wB).
destruct (Z_lt_le_dec s wB); auto.
assert (wB * wB <= Zpos p).
diff --git a/theories/Numbers/Integer/BigZ/ZMake.v b/theories/Numbers/Integer/BigZ/ZMake.v
index 173a8f1777..0bcf22e328 100644
--- a/theories/Numbers/Integer/BigZ/ZMake.v
+++ b/theories/Numbers/Integer/BigZ/ZMake.v
@@ -383,13 +383,13 @@ Module Make (N:NType) <: ZType.
| Neg nx => Neg N.zero
end.
- Theorem spec_sqrt: forall x, to_Z (sqrt x) = Zsqrt (to_Z x).
+ Theorem spec_sqrt: forall x, to_Z (sqrt x) = Z.sqrt (to_Z x).
Proof.
destruct x as [p|p]; simpl.
apply N.spec_sqrt.
rewrite N.spec_0.
destruct (Z_le_lt_eq_dec _ _ (N.spec_pos p)) as [LT|EQ].
- rewrite Zsqrt_neg; auto with zarith.
+ rewrite Z.sqrt_neg; auto with zarith.
now rewrite <- EQ.
Qed.
diff --git a/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
index 390b52ebee..dd83b65da1 100644
--- a/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
+++ b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
@@ -311,12 +311,12 @@ Qed.
Lemma sqrt_spec : forall n, 0<=n ->
(sqrt n)*(sqrt n) <= n /\ n < (succ (sqrt n))*(succ (sqrt n)).
Proof.
- intros n. zify. apply Zsqrt_spec.
+ intros n. zify. apply Z.sqrt_spec.
Qed.
Lemma sqrt_neg : forall n, n<0 -> sqrt n == 0.
Proof.
- intros n. zify. apply Zsqrt_neg.
+ intros n. zify. apply Z.sqrt_neg.
Qed.
(** Log2 *)
diff --git a/theories/Numbers/Natural/BigN/NMake.v b/theories/Numbers/Natural/BigN/NMake.v
index aabbf87f28..66b39aca9b 100644
--- a/theories/Numbers/Natural/BigN/NMake.v
+++ b/theories/Numbers/Natural/BigN/NMake.v
@@ -771,7 +771,7 @@ Module Make (W0:CyclicType) <: NType.
intros x. rewrite sqrt_fold. destr_t x as (n,x). exact (ZnZ.spec_sqrt x).
Qed.
- Theorem spec_sqrt: forall x, [sqrt x] = Zsqrt [x].
+ Theorem spec_sqrt: forall x, [sqrt x] = Z.sqrt [x].
Proof.
intros x.
symmetry. apply Z.sqrt_unique.
diff --git a/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v b/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v
index 57277b4893..9bed794f29 100644
--- a/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v
+++ b/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v
@@ -263,7 +263,7 @@ Qed.
Lemma sqrt_spec : forall n, 0<=n ->
(sqrt n)*(sqrt n) <= n /\ n < (succ (sqrt n))*(succ (sqrt n)).
Proof.
- intros n. zify. apply Zsqrt_spec.
+ intros n. zify. apply Z.sqrt_spec.
Qed.
Lemma sqrt_neg : forall n, n<0 -> sqrt n == 0.