Skip to content

isolated some of the issues of dataflow rewriter #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

goens
Copy link
Collaborator

@goens goens commented Jul 28, 2025

and removed the mathlib dependency

@marcusrossel marcusrossel merged commit 6af6503 into main Jul 28, 2025
1 check passed
@marcusrossel
Copy link
Owner

marcusrossel commented Jul 28, 2025

For the case:

example {val n} (isLt : val < n) (isLt' : (@LT.lt Nat instLTNat (↑(Fin.mk val isLt)) n)) : isLt = isLt'

we do find an explanation by egg [*]. It's just that proof reconstruction explicitly fails with:

egg received invalid explanation: step contains non-defeq type-level rewrite in proof or type class instance

We get this error because we are rewriting with the structure projection reduction ↑⟨?val, ?isLt⟩ = ?val in the type of isLt'. What is buggy is that the given structure projection theorem does hold definitionally. So there must be some place where the proof reconstruction doesn't correctly recognize this theorem as a defeq theorem.

@marcusrossel
Copy link
Owner

Same for the final example:

example {val T x1} (isLt : val < x1.length) :
  Eq (@Fin.val_lt_of_le (@List.length T x1) (@List.length T x1) (@Fin.mk (@List.length T x1) val isLt) (Nat.le_refl x1.length)) isLt

if we use egg [*, Fin.val_lt_of_le].

@marcusrossel
Copy link
Owner

This is kind of fixed in the latest commit now.

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