You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [ add ] inequalities for `2 ^ log₂ n`
This adds the inequalities `2 ^ ⌊log₂ n ⌋ ≤ n` for non-zero `n` and
`n ≤ 2 ^ ⌈log₂ n ⌉` for all natural numbers `n`. Similar to the existing
properties of the logarithm, the main proofs
that keep track of the accumulators are added to
`Data.Nat.Logarithm.Core`. Both use a lemma that `2 * (ℕ.suc n) ≡ 2 + (n + n)`
which is added to `Data.Nat.Logarithm.Core` as well.
The respective simplified versions on `⌊log₂_⌋` and `⌈log₂_⌉` are added
directly to `Data.Nat.Logarithm`.
* move 2*suc[n]≡2+n+n to Data.Nat.Properties
* ℕ.suc -> suc
* Further ℕ.suc -> suc
* replace 1 + with suc
* Switch to equational reasoning
* Update Changelog
* RM unused 'trans'
* Use NonZero instance
* Update Changelog
* Update src/Data/Nat/Logarithm.agda
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
* Update CHANGELOG.md
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
---------
Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
0 commit comments