Skip to content

Conversation

@math-fehr
Copy link
Collaborator

In the proofs related to insertIntoCurrent, we need to be in a state where the IR is well formed except for some uses.

In the proofs related to `insertIntoCurrent`, we need to be in a state
where the IR is well formed except for some uses.
Copy link
Collaborator

@tobiasgrosser tobiasgrosser left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment.

inBounds : ctx.FieldsInBounds
valueDefUseChains (valuePtr : ValuePtr) (valuePtrInBounds : valuePtr.InBounds ctx) :
∃ array, ValuePtr.DefUse valuePtr ctx array
∃ array, ValuePtr.DefUse valuePtr ctx array (missingOperandUses.filter (λ use => (use.get! ctx).value = valuePtr))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you write ((\cdot.get! ctx).value = valuePtr) instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't work for me, because (\cdot.get! ctx).value = valuePtr makes the inner parenthesis a function, so .value doesn't work after that.


deriving instance DecidableEq for Except

@[simp, grind =]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it really necessary??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So https://leanprover-community.github.io/mathlib4_docs/Std/Data/ExtHashSet/Lemmas.html#Std.ExtHashSet.filter_eq_empty_iff is the nearest theorem, otherwise there is no existing theorem like this.
grind = is necessary for some proofs when I checked.

@math-fehr math-fehr added this pull request to the merge queue Jan 20, 2026
Merged via the queue into main with commit bb86946 Jan 20, 2026
2 checks passed
@math-fehr math-fehr deleted the math-fehr/wellformed-missing branch January 20, 2026 18:03
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.

5 participants