Skip to content

simple functional queue from Okasaki#558

Open
c-cube wants to merge 8 commits into
leanprover:mainfrom
c-cube:c-cube/functionalQueue
Open

simple functional queue from Okasaki#558
c-cube wants to merge 8 commits into
leanprover:mainfrom
c-cube:c-cube/functionalQueue

Conversation

@c-cube
Copy link
Copy Markdown

@c-cube c-cube commented May 11, 2026

Hi, this is my first attempt at contributing Lean code.

I dug out the old Okasaki, and started off with the simple queue. This should
contain a correctness proof, a complexity proof, and a mapping to a ghost list
of elements. TimeM doesn't seem to be enough for amortized complexity so
I added a module for that, and I also removed the ZeroAdd typeclass constraint
because \N doesn't implement it(!).

AI disclosure: all code is mine, but I had some assistance from GLM 5.1 to
tidy up proof terms and get unstuck.

@c-cube c-cube force-pushed the c-cube/functionalQueue branch from b7c4a9c to a3c0424 Compare May 11, 2026 02:50
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