feat(fields): fast binary tower fields (up to 128 bits) - #286
Conversation
…tem) Module headers on Fast.lean and its tests, de-private helpers the module system requires in exposed bodies, regenerated import lists. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🤖 PR SummaryMathematical Formalization
Infrastructure & CI
Refactoring / API exposure
Testing
Performance summary (from PR body)
Statistics
Lean Declarations ✏️ Added: 235 declaration(s)
…and 85 more not listed.
Coverage Notes
Partially Analyzed Files
📋 **Additional Analysis**The pull request introduces new arithmetic definitions and correctness proofs for packed-word binary tower fields ( 📄 **Per-File Summaries**
Last updated: 2026-08-07 09:52 UTC. |
|
@mitschabaude am I waiting on a review from you on this or is this ready for review? |
|
I am broadly happy with it (nice improvement on performance here 😃 ) |
Fast arithmetic for the binary tower GF(2^(2^k)), k <= 7, in pure Lean, no externs, no
native_decide.UInt64per element up to GF(2^64), two limbs for GF(2^128); unrolled Karatsuba ladderArray.ofFn, so correctness is structural and the kernel never evaluates a tableConcreteBTFieldprecompileModules#guardtests +fields-tower-bt128-{mul,inv}bench groups in CIConcreteBTField: ~3ms / ~5ms)Earlier drafts had a C extern tier, but pure Lean matched it on mul and beats it on inv so it was dropped.