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.Definitions
andAlgebra.Definitions
, so I'll try to remedy that with a v3.0 PR, and I'm inclined to decide in favour of theAlgebra.Definitions
left/right convention, unless anyone strongly objects. NB this goes against @MatthewDaggitt 's original comments on Add left- and right-Pointwise
congruence 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 requirexs
to 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 onxs
to 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!