Updated version of the Delete Theorem in Disj.LP, along with related encodings and theorems #60
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.