agda-stdlib icon indicating copy to clipboard operation
agda-stdlib copied to clipboard

lib-2.0: factors-∣ rather than ∣-factors in divisibility in CommutativeMagma

Open mechvel opened this issue 2 years ago • 4 comments

lib-2.0 has in Algebra.Properties.CommutativeMagma.Divisibility:

∣-factors :  ∀ x y → (x ∣ x ∙ y) × (y ∣ x ∙ y)

This means "each of factors divides the product". But seeing the name only, the user would think "something divides each of factors". Therefore the name rather has to be factors-∣ Has it? The same is with ∣-factors-≈

mechvel avatar Jan 03 '24 14:01 mechvel

I agree that this would be pronounced "factors divide" and so a name that puts things in the same order makes sense.

JacquesCarette avatar Jan 03 '24 20:01 JacquesCarette

The naming convention of the standard library is either to spell out the type explicitly, or put the operator at the front of "meaningful" word. So factors-∣ would not be in line with that.

We could rename it x|xy∧y|xy?

MatthewDaggitt avatar Mar 24 '24 08:03 MatthewDaggitt

May be, change this convention? On the other hand x|xy∧y|xy looks reasonable.

mechvel avatar Mar 24 '24 13:03 mechvel

May be, change this convention?

I don't think the chaos and the ~200 people hours that would involve is really worth it...

MatthewDaggitt avatar Mar 25 '24 01:03 MatthewDaggitt