Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
343 stars 230 forks source link

"intersect" and "intersection" do the same thing #2257

Open DanGrayson opened 2 years ago

DanGrayson commented 2 years ago

Get rid of "intersection", as it is the more recent one.


i1 : apropos "intersect"

o1 = {intersect, intersectInP, intersection}

o1 : List

i2 : help intersect

o2 = intersect -- compute an intersection
     ************************************

     Description
     ===========

     This function calculates the intersection of a list or sequence of compatible objects.

     ...

i3 : help intersection

o3 = intersection -- compute an intersection
     ***************************************

     Description
     ===========

     This function calculates the intersection of a list or sequence of compatible objects.

     ...
mahrud commented 2 years ago

Why? Some packages have used intersection instead for ages, like Polyhedra: https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.17/share/doc/Macaulay2/Polyhedra/html/_intersection.html And the point of making it shared was to allow different packages to be able to use it, as in #1649.

What should instead be fixed is the documentation, which in v1.18 is hijacked by the shared documentation from Macaulay2Doc: https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2/share/doc/Macaulay2/Polyhedra/html/_intersection.html

DanGrayson commented 2 years ago

Well, in order to avoid any disruption, what if we make intersect and intersection (which are in the core) synonyms, the way res and resolution are synonyms? Then it wouldn't matter if you don't remember whether to use the verb or the noun.