Skip to content

Truncated logarithm over the natural numbers#1311

Open
LorenzoMolena wants to merge 3 commits into
agda:masterfrom
LorenzoMolena:logN
Open

Truncated logarithm over the natural numbers#1311
LorenzoMolena wants to merge 3 commits into
agda:masterfrom
LorenzoMolena:logN

Conversation

@LorenzoMolena

Copy link
Copy Markdown
Contributor

This PR introduces the truncated logarithm of x in base b, as the unique natural number l such that b ^ l ≤ x < b ^ (suc l).
The base b and argument x are also natural numbers subject to 2 ≤ b and 1 ≤ x; these assumptions are enforced by implicit arguments of type 2 ≤ᵗ b and 1 ≤ᵗ x, to make computing with log easier.
However, for stating and proving the properties, it was more straightforward to work with a base of the form suc (suc m), rather than using an implicit argument.

Some auxiliary lemmas were also added in the Nat.Mod and Nat.Order modules; in particular, ≤-·sk-cancel and <-·sk-cancel have been moved from Fin.Properties to Nat.Order, using shorter inductive proofs.

LorenzoMolena and others added 3 commits May 31, 2026 08:12
…t/Mod` ; move `≤-·sk-cancel` and `<-·sk-cancel` from `Fin/Properties` to `Nat/Order`, giving shorter inductive proofs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant