Additions to Haskell.Law.Bool#389
Merged
jespercockx merged 3 commits intoagda:masterfrom Jan 22, 2025
Merged
Conversation
Member
|
Thank you for the PR! I think your reasoning for the naming and the layout makes perfect sense, I'm happy to go along with it. |
jespercockx
approved these changes
Jan 21, 2025
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.
This pull request adds additional properties to
Haskell.Law.Bool.This pull request tries to be systematic about these additions:
||and&&that inspect the second argument, e.g.(x || True) ≡ True. These properties currently cannot be reached by computation, i.e. while(True || x)reduces tox, the expression(x || True)does not reduce further.--and intersperses--for visual separation between type ("interesting") and implementation ("don't care").prop-. Agda makes no distinction between programs and proofs, but when proving properties about Haskell programs, I find it conceptually helpful to distinguish target language (Haskell) from metalanguage (Agda), andprop-is a very clear visual separator.prop-into my editor (VSCodium), I get suggestions for completion, and these are now filtered to be metalanguage proofs rather than target programs.prop_prefix is a convention used by QuickCheck. Usingprop-in Agda2hs allows me to generate Haddock documentation like this:prop-? I think that this prefix helps as well.The content of these additions is highly useful for an axiomatization of
Data.Setthat I would like to contribute in a later pull request.However, the main purpose of this pull request is to test maintainer opinions regarding the
prop-prefix style, and the other style choices.(In order to preserve backward-compatibility, I have chosen to not remove any now-redundant properties such as
&&-sym. This can be done is a separate pull request if desired.)