You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a long-standing legacy issue (cf. #1099 ) that causes problems esp. regarding:
the dependency graph: Data.List.Base and Properties need to import Data.Nat.Divisibility otherwise unnecessarily; also, how much of Algebra should be imported by 'concrete' Data modules? Data.List.Properties ends up being where properties of sum and product get proved...
abstraction level: these are operations definable on (Raw)Monoids, and should be treated as such
extensibility: every time a 'new' property needs to be proven, the above questions need to be re-examined (esp. wrt dependency, eg do we want to import Data.List.Relation.Binary.Permutation.* into Data.List.Properties, etc.?)
etc.
Just as, in the end, it was (judged to be) 'better' to lift out scans from Data.List.Base, sum and product should be lifted out from Data.List.Base (and correspondingly their properties from Data.List.Properties) into (at least!) a separate module.
Lots of design choices here:
a general theory under Algebra.Definitions.RawMonoid/Algebra.Properties.Monoid? Deprecation problems wrt the existing definitions and properties of sum etc. so potentially lots of breaking changes, otherwise a mess of deprecations?
theory of interaction(s) between them (esp. wrt distributivity) under Algebra.Properties.(Commutative)(Semi)Ring etc.
instantiation for Nat (and the other numeric types Integer and Rational?): what should the module be called?
definition in terms of concrete List, or abstract FreeMonoid? (the latter seems preferable, as an algebraic definition; the former for computation... usual issues/trade-offs arise cf. The design of 'free objects' #2539 etc.) This might (usefully!) uncouple the dependency currently on Data.Vec.Functional for sum etc.
This is a long-standing legacy issue (cf. #1099 ) that causes problems esp. regarding:
Data.List.BaseandPropertiesneed to importData.Nat.Divisibilityotherwise unnecessarily; also, how much ofAlgebrashould be imported by 'concrete'Datamodules?Data.List.Propertiesends up being where properties ofsumandproductget proved...(Raw)Monoids, and should be treated as suchData.List.Relation.Binary.Permutation.*intoData.List.Properties, etc.?)Just as, in the end, it was (judged to be) 'better' to lift out
scans fromData.List.Base,sumandproductshould be lifted out fromData.List.Base(and correspondingly their properties fromData.List.Properties) into (at least!) a separate module.Lots of design choices here:
Algebra.Definitions.RawMonoid/Algebra.Properties.Monoid? Deprecation problems wrt the existing definitions and properties ofsumetc. so potentially lots ofbreakingchanges, otherwise a mess of deprecations?Algebra.Properties.(Commutative)(Semi)Ringetc.Nat(and the other numeric typesIntegerandRational?): what should the module be called?List, or abstractFreeMonoid? (the latter seems preferable, as an algebraic definition; the former for computation... usual issues/trade-offs arise cf. The design of 'free objects' #2539 etc.) This might (usefully!) uncouple the dependency currently onData.Vec.Functionalforsumetc.Possible implementation pathway (UPDATED):
Data.Nat.ListAction#2558 and [ refactor ] AddData.Bool.ListAction#2561UPDATED: I got the locations wrong! But in many ways, having these
Natoperations underListis even less appropriate!?