Updated version of the Delete Theorem in Disj.LP, along with related encodings and theorems#60
Merged
fblanqui merged 1 commit intoDeducteam:masterfrom Feb 2, 2026
Merged
Conversation
Member
|
Thanks Melanie. The only thing I am worried about is the efficiency of undup_first. I am wondering whether we could not find something more efficient like perhaps: I improved the efficiency of List.rev in #61 to this end. Would you like to try to prove that the two definitions of undup_first and undup are equal (in a separate PR)? |
fblanqui
reviewed
Feb 2, 2026
| coerce_rule coerce 𝔹 Prop $x ↪ istrue $x; | ||
|
|
||
| symbol istrue=true [x] : π (istrue x) → π (x = true) ≔ | ||
| opaque symbol istrue=true [x] : π (istrue x) → π (x = true) ≔ |
Member
There was a problem hiding this comment.
Good catch! Is there any other theorem not declared as opaque?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original version of
deleteneeds to be instantiated with two lists: one representing the indices of literals in the original clause (with identical literals sharing the same number), and another list of literal indices representing the clause after the deletion of duplicate literals. The theorem then verifies that the resulting list still contains each literal at least once. This admissibility check evaluates to⊤for every valid deletion and therefore has to be instantiated using⊤ᵢ.This PR introduces
undup_firstinList.lp, which deletes all but the first occurrence of each element in a list. Based onundup_first, a new convenience version ofdeleteis defined that only needs to be instantiated with the original list of indices and automatically removes all duplicate occurrences except the first. I also proved a general theorem showing that this operation always preserves one occurrence of each literal of the original clause. As a result, it is no longer necessary to explicitly compute admissibility or to instantiate the proof with⊤ᵢ.In addition, several supporting theorems were added to
Bool.lp,List.lp, andNat.lp.