diff options
author | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-12-21 21:47:43 +0000 |
---|---|---|
committer | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-12-21 21:47:43 +0000 |
commit | ec8332223b1f6716e49bbf78e0489881ca7bfa2b (patch) | |
tree | 95c23e65916507f8442e3d5f1ac11e675fca52b8 /theories/NArith/BinNatDef.v | |
parent | e9428d3127ca159451437c2abbc6306e0c31f513 (diff) |
nat_iter n f x -> nat_rect _ x (fun _ => f) n
It is much beter for everything (includind guard condition and simpl refolding)
excepts typeclasse inference because unification does not recognize
(fun x => f x b) a when it sees f a b ...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16112 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/NArith/BinNatDef.v')
-rw-r--r-- | theories/NArith/BinNatDef.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/theories/NArith/BinNatDef.v b/theories/NArith/BinNatDef.v index 08e1138f0..3c0bbbad9 100644 --- a/theories/NArith/BinNatDef.v +++ b/theories/NArith/BinNatDef.v @@ -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)(n:nat) := nat_rect _ a (fun _ => double) n. +Definition shiftr_nat (a:N)(n:nat) := nat_rect _ a (fun _ => div2) n. Definition shiftl a n := match a with |