diff options
author | Enrico Tassi <gareuselesinge@debian.org> | 2015-01-25 14:42:51 +0100 |
---|---|---|
committer | Enrico Tassi <gareuselesinge@debian.org> | 2015-01-25 14:42:51 +0100 |
commit | 7cfc4e5146be5666419451bdd516f1f3f264d24a (patch) | |
tree | e4197645da03dc3c7cc84e434cc31d0a0cca7056 /theories/NArith/BinNatDef.v | |
parent | 420f78b2caeaaddc6fe484565b2d0e49c66888e5 (diff) |
Imported Upstream version 8.5~beta1+dfsg
Diffstat (limited to 'theories/NArith/BinNatDef.v')
-rw-r--r-- | theories/NArith/BinNatDef.v | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/theories/NArith/BinNatDef.v b/theories/NArith/BinNatDef.v index 9abf4955..9de2e7e1 100644 --- a/theories/NArith/BinNatDef.v +++ b/theories/NArith/BinNatDef.v @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2014 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2015 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) @@ -325,8 +325,8 @@ Definition lxor n m := (** Shifts *) -Definition shiftl_nat (a:N)(n:nat) := nat_iter n double a. -Definition shiftr_nat (a:N)(n:nat) := nat_iter n div2 a. +Definition shiftl_nat (a:N) := nat_rect _ a (fun _ => double). +Definition shiftr_nat (a:N) := nat_rect _ a (fun _ => div2). Definition shiftl a n := match a with @@ -337,7 +337,7 @@ Definition shiftl a n := Definition shiftr a n := match n with | 0 => a - | pos p => Pos.iter p div2 a + | pos p => Pos.iter div2 a p end. (** Checking whether a particular bit is set or not *) @@ -375,7 +375,7 @@ Definition of_nat (n:nat) := Definition iter (n:N) {A} (f:A->A) (x:A) : A := match n with | 0 => x - | pos p => Pos.iter p f x + | pos p => Pos.iter f x p end. End N.
\ No newline at end of file |