File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,20 @@ Highlights
1414
1515* Pseudo random generators for ℕ (available from ` Data.Nat.Pseudorandom.LCG ` )
1616
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+
1721Bug-fixes
1822---------
1923
2024* The sum operator ` _⊎_ ` in ` Data.Container.Indexed.Combinator ` was not as universe
2125 polymorphic as it should have been. This has been fixed. The old, less universe
2226 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 ` .
2331
2432* The proof ` isEquivalence ` in ` Function.Properties.(Equivalence/Inverse) ` used to be
2533 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
5151
5252toNatDigits : (base : ℕ) {base≤16 : True (1 ≤? base)} → ℕ → List ℕ
5353toNatDigits 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) []
5555 where
5656 aux : {n : ℕ} → Acc _<_ n → List ℕ → List ℕ
5757 aux {zero} _ xs = (0 ∷ xs)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ open import Data.Nat.DivMod
1414open import Data.Nat.GCD.Lemmas
1515open import Data.Nat.Properties
1616open import Data.Nat.Induction
17- using (Acc; acc; <′-Rec; <′-recBuilder; <-wellFounded)
17+ using (Acc; acc; <′-Rec; <′-recBuilder; <-wellFounded-fast )
1818open import Data.Product
1919open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
2020open 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)
4343
4444gcd : ℕ → ℕ → ℕ
4545gcd 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
4747... | 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
4949
5050------------------------------------------------------------------------
5151-- Core properties of gcd′
You can’t perform that action at this time.
0 commit comments