Skip to content

feat: BitHeaps using Vector#22

Merged
osmanyasar05 merged 8 commits into
mainfrom
vector_bh
Jun 25, 2026
Merged

feat: BitHeaps using Vector#22
osmanyasar05 merged 8 commits into
mainfrom
vector_bh

Conversation

@osmanyasar05

Copy link
Copy Markdown
Collaborator

No description provided.

@bollu bollu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core change LGTM. I think we can drop width and refactor everything to use the w directly, right? I'd make that change before comitting.

Comment thread DatapathVerification/BitHeap/BitHeap.lean
Comment on lines -68 to +63
def highestColumn (h : BitHeap) : Option Nat :=
def highestColumn (h : BitHeap w) : Option Nat :=
let target := h.maxHeight
h.columns.toList.findSome? (fun (idx, col) => if col.height == target then some idx else none)
if target == 0 then none else
h.columns.toList.zipIdx.findSome?
(fun (col, idx) => if col.height == target then some idx else none)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this, since it is dead code now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might use this function in the future, so I'd keep it.

Comment thread DatapathVerification/BitHeap/BitHeap.lean Outdated
@bollu

bollu commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Also, we probably want CI to pass :)

@osmanyasar05

Copy link
Copy Markdown
Collaborator Author

thanks for the feedback, we now use w directly as suggested. what do you think about the removeBit/addBit implementations?

@osmanyasar05

Copy link
Copy Markdown
Collaborator Author

I'm merging this PR. We will work on addBit/removeBit theorems in the upcoming PRs.

@osmanyasar05 osmanyasar05 merged commit 2ef3b7d into main Jun 25, 2026
2 checks passed
bollu added a commit to opencompl/lean-mlir that referenced this pull request Jun 26, 2026
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.

2 participants