diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-05-27 15:55:22 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-05-27 15:55:22 +0000 |
commit | 8e66deea4ee46535164ba1cbf97ed27bf6782543 (patch) | |
tree | 4768c91847f405d90612aa77da24ce28d34be381 /theories/ZArith/Zpow_facts.v | |
parent | bd553335ab58426c1425591b5f21365cbfefa000 (diff) |
Cyclic31: migrate auxiliary lemmas to their legitimate files
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10999 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/ZArith/Zpow_facts.v')
-rw-r--r-- | theories/ZArith/Zpow_facts.v | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/theories/ZArith/Zpow_facts.v b/theories/ZArith/Zpow_facts.v index 8f86fdf79..b5b73c1ab 100644 --- a/theories/ZArith/Zpow_facts.v +++ b/theories/ZArith/Zpow_facts.v @@ -262,6 +262,20 @@ Proof. intros; apply Zlt_le_weak; apply Zpower2_lt_lin; auto. Qed. +Lemma Zpower2_Psize : + forall n p, Zpos p < 2^(Z_of_nat n) <-> (Psize p <= n)%nat. +Proof. + induction n. + destruct p; split; intros H; discriminate H || inversion H. + destruct p; simpl Psize. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zpos_xI; specialize IHn with p; omega. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zpos_xO; specialize IHn with p; omega. + split; auto with arith. + intros _; apply Zpower_gt_1; auto with zarith. + rewrite inj_S; generalize (Zle_0_nat n); omega. +Qed. (** * Zpower and modulo *) |