File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,20 @@ Highlights
14
14
15
15
* Pseudo random generators for ℕ (available from ` Data.Nat.Pseudorandom.LCG ` )
16
16
17
+ * Large increase in the number of proofs about both normalised and unnormalised rational numbers.
18
+
19
+ * Drastically increased performance of normalised rational numbers.
20
+
17
21
Bug-fixes
18
22
---------
19
23
20
24
* The sum operator ` _⊎_ ` in ` Data.Container.Indexed.Combinator ` was not as universe
21
25
polymorphic as it should have been. This has been fixed. The old, less universe
22
26
polymorphic variant is still available under the new name ` _⊎′_ ` .
27
+
28
+ * The performance of the ` gcd ` operator over naturals and hence all operations in
29
+ ` Data.Rational.Base ` has been drastically increased by using the new ` <-wellFounded-fast `
30
+ operation in ` Data.Nat.Induction ` .
23
31
24
32
* The proof ` isEquivalence ` in ` Function.Properties.(Equivalence/Inverse) ` used to be
25
33
defined in an anonymous module that took two unneccessary ` Setoid ` arguments:
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Bit = Digit 2
51
51
52
52
toNatDigits : (base : ℕ) {base≤16 : True (1 ≤? base)} → ℕ → List ℕ
53
53
toNatDigits base@(suc zero) n = replicate n 1
54
- toNatDigits base@(suc (suc b)) n = aux (<-wellFounded n) []
54
+ toNatDigits base@(suc (suc b)) n = aux (<-wellFounded-fast n) []
55
55
where
56
56
aux : {n : ℕ} → Acc _<_ n → List ℕ → List ℕ
57
57
aux {zero} _ xs = (0 ∷ xs)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ open import Data.Nat.DivMod
14
14
open import Data.Nat.GCD.Lemmas
15
15
open import Data.Nat.Properties
16
16
open import Data.Nat.Induction
17
- using (Acc; acc; <′-Rec; <′-recBuilder; <-wellFounded)
17
+ using (Acc; acc; <′-Rec; <′-recBuilder; <-wellFounded-fast )
18
18
open import Data.Product
19
19
open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
20
20
open import Function
@@ -43,9 +43,9 @@ gcd′ m n@(suc n-1) (acc rec) n<m = gcd′ n (m % n) (rec _ n<m) (m%n<n m n-1)
43
43
44
44
gcd : ℕ → ℕ → ℕ
45
45
gcd m n with <-cmp m n
46
- ... | tri< m<n _ _ = gcd′ n m (<-wellFounded n) m<n
46
+ ... | tri< m<n _ _ = gcd′ n m (<-wellFounded-fast n) m<n
47
47
... | tri≈ _ _ _ = m
48
- ... | tri> _ _ n<m = gcd′ m n (<-wellFounded m) n<m
48
+ ... | tri> _ _ n<m = gcd′ m n (<-wellFounded-fast m) n<m
49
49
50
50
------------------------------------------------------------------------
51
51
-- Core properties of gcd′
You can’t perform that action at this time.
0 commit comments