-
Notifications
You must be signed in to change notification settings - Fork 260
Description
Have now added revised types for the new lemmas, and note the following:
++⁺ʳnow has a type corresponding to the explicitly quantified version ofAlgebra.Definitions.LeftCongruent++⁺ˡnow has a type corresponding to the explicitly quantified version ofAlgebra.Definitions.RightCongruent
(and explicit because "_++_can't infer its arguments"... at least in the first case)
Which nomenclature/notation should be taken as canon? (Potential issue: I think that the use(s) of left/right superscript annotations in the Data.List.Relation* hierarchy are opposite to those of the Algebra.* congruence properties... sigh)
Barring the resolution of this question, I think this is (should be! ;-)) good to go now.
Originally posted by @jamesmckinna in #2426 (comment)
cf. #1436
Design decisions to be made:
- It's very unfortunate (ahem) that I seem to be the one who introduced the left/right inversion relative to the existing conventions in
Relation.Binary.DefinitionsandAlgebra.Definitions, so I'll try to remedy that with a v3.0 PR, and I'm inclined to decide in favour of theAlgebra.Definitionsleft/right convention, unless anyone strongly objects. NB this goes against @MatthewDaggitt 's original comments on Add left- and right-Pointwisecongruence for_++_onList#2426 ... - A separate issue is one regarding implicit/explicit quantification in the definition of
Left/RightCongruent: when considering prefixingxs ++_as aPointwise-respecting (or any otherData.List.Relation.Binary.*), most, if not all of the uses of such properties do not requirexsto be given explicitly (and as a suffixing operation, seemingly never, thanks to unification), and only a handful (typically those underData.List.Relation.Unary.Any.Properties) actually do induction onxsto prove the relevant property, but again, never seem to use it in anger when applying those proofs. So I'm strongly tempted not to change the quantifiers inAlgebra.Definitions, again unless anyone strongly objects, and to modify the quantification inData.List.Relation.*.Properties. This goes slightly against the design advocated in Standardise implicit arguments of cancellation properties. #1436 and elsewhere (egAssociativity... which similarly almost never needs its arguments supplied explicitly), but is conformant with the abstract use of-congˡand-congʳderived forms inAlgebra.Structures.IsMagma.
(Similar remarks apply to the corresponding lemmas under Data.Vec.Relation.* in the usual way)
Ahead of any review discussion (and consequent potential waste of bandwidth/effort) on a candidate PR, it would be useful to poll opinion on the wisdom of such choices, or otherwise!