feat(Foundations): define polynomial growth and relate it to big-O - #1067
SamuelSchlesinger wants to merge 3 commits into
Conversation
2571822 to
43316c1
Compare
43316c1 to
93344e7
Compare
|
There's clearly other review work that needs to be done, but as a first thought is there a reason you didn't use Asymptotics.IsBigO? There's no |
No, I can change it to that and see if that is an improvement. |
|
actually |
93344e7 to
d09d87d
Compare
d09d87d to
14146b0
Compare
thomaskwaring
left a comment
There was a problem hiding this comment.
this all looks good to me — i've suggested a few places where i think proofs can be simplified, particularly using grw and looser bounds (since the statement is existential it makes no difference)
also, i don't have a strong opinion either way, but perhaps you could define a trivial norm on Nat which might be fractionally easier than working with the casts
|
|
||
| /-- A function is polynomially bounded if a fixed power eventually bounds its values. -/ | ||
| def PolynomiallyBounded (f : ℕ → ℕ) : Prop := | ||
| ∃ d : ℕ, ∀ᶠ n in atTop, f n ≤ n ^ d |
There was a problem hiding this comment.
i think the idiomatic spelling is
| ∃ d : ℕ, ∀ᶠ n in atTop, f n ≤ n ^ d | |
| ∃ d : ℕ, f ≤ᶠ[atTop] (· ^ d) |
which is defeq
Co-authored-by: Thomas Krishna Waring <51426330+thomaskwaring@users.noreply.github.com>
Co-authored-by: Thomas Krishna Waring <51426330+thomaskwaring@users.noreply.github.com>
|
Applied your changes. |
Following @thomaskwaring's suggestion, defines
PolynomiallyBounded ffor natural-valued functions by eventual domination by a fixed powern ^ d. Proves equivalence with Mathlib'sAsymptotics.IsBigOafter casting to the reals, and with a boundc * (n + 1) ^ dvalid at every input.This supplies the growth condition used for polynomial losses and hybrid lengths in the crypto stack. It makes no computability claim.
Originally composed with Claude Code; reworked with Codex to use eventual bounds and Mathlib's asymptotics API.