chore: expose Nat.log2 (#11401)

Necessary for kernel reduction of `binaryRec`, see
leanprover-community/mathlib4#30144
This commit is contained in:
Junyan Xu 2025-12-14 06:19:29 +01:00 committed by GitHub
parent c20378682e
commit fb6c96e54b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ Examples:
* `Nat.log2 7 = 2`
* `Nat.log2 8 = 3`
-/
@[extern "lean_nat_log2"]
@[expose, extern "lean_nat_log2"]
def log2 (n : @& Nat) : Nat :=
-- Lean "assembly"
n.rec (fun _ => nat_lit 0) (fun _ ih n =>