This is Hadamard.info, produced by Macaulay2, version 1.20

Hadamard -- a package to study Hadamard products of varieties.
**************************************************************

Author
======

  * Iman Bahmani Jafarloo (see http://calvino.polito.it/~imanbj )
    <ibahmani89@gmail.com>

Version
=======

This documentation describes version 0.1 of Hadamard.

Source code
===========

The source code from which this documentation is derived is in the file
Hadamard.m2 (see common/share/Macaulay2/Hadamard.m2 ).

Exports
=======

  * Types
      * Point -- a new type for points in projective space
  * Functions and commands
      * hadamardPower -- computes the Hadamard powers of
        varieties
      * hadamardProduct -- computes the Hadamard
        product of varieties
      * idealOfProjectivePoints -- computes the
        ideal of set of points
      * point -- consructs a projective point from the list (or
        array) of coordinates.
  * Methods
      * hadamardPower(Ideal,ZZ), --
        computes the $r$-th Hadmard powers of varieties
      * hadamardPower(List,ZZ) -- computes
        the $r$-th Hadmard powers of a set points
      * hadamardProduct(Ideal,Ideal),
        -- Hadamard product of two homogeneous ideals
      * hadamardProduct(List) -- Hadamard
        product of a list of homogeneous ideals, or points
      * hadamardProduct(List,List), --
        Hadamard product of two sets of points
      * "idealOfProjectivePoints(List,Ring)" -- see
        idealOfProjectivePoints, -- computes the ideal
        of set of points
      * "point(VisibleList)" -- see point, -- consructs a
        projective point from the list (or array) of coordinates.
      * Point * Point -- entrywise product of two
        projective points
      * Point == Point -- check equality of two
        projective points

For the programmer
==================

The object Hadamard, is a package (Macaulay2Doc).

hadamardPower -- computes the Hadamard powers of varieties
**********************************************************

Ways to use hadamardPower :
===========================

  * hadamardPower(Ideal,ZZ) -- computes
    the $r$-th Hadmard powers of varieties
  * hadamardPower(List,ZZ) -- computes the
    $r$-th Hadmard powers of a set points

For the programmer
==================

The object hadamardPower, is a method function (Macaulay2Doc).

hadamardPower(Ideal,ZZ) -- computes the $r$-th Hadmard powers of varieties
**************************************************************************

Synopsis
========

  * Function: hadamardPower,
  * Usage:
        hadamardPower(I,r)
  * Inputs:
      * I, an ideal (Macaulay2Doc), of (homogeneous) ideals (Macaulay2Doc),
      * r, an integer (Macaulay2Doc), a positive integer $>=1$
  * Outputs:
      * an ideal (Macaulay2Doc),

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

Give a homogeneous ideal $I$, the $r$-th Hadamard power of $I$ is $r$-times
Hadamard product of I to itself; $( I x\cdots x I)_{r-times}$

+-----------------------------------------------------------------------------+
|i1 : S=QQ[x,y,z,w]                                                           |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(random(1,S),random(1,S),random(1,S))                            |
|                                                                             |
|            9    1    9    1       3    3    3   7    7     7    1           |
|o2 = ideal (-x + -y + -z + -w, x + -y + -z + -w, -x + -y + --z + -w)         |
|            2    2    4    2       4    2    4   4    9    10    2           |
|                                                                             |
|o2 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i3 : hadamardPower(I,3)                                                      |
|                                                                             |
|o3 = ideal (731189187729z + 12167000000w, 1003003001y + 217081801w,          |
|     ------------------------------------------------------------------------|
|     27081081027x - 15625000w)                                               |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * hadamardPower(Ideal,ZZ) -- computes
    the $r$-th Hadmard powers of varieties

hadamardPower(List,ZZ) -- computes the $r$-th Hadmard powers of a set points
****************************************************************************

Synopsis
========

  * Function: hadamardPower,
  * Usage:
        hadamardPower(L,r)
  * Inputs:
      * L, a list (Macaulay2Doc), of (projective) points,
      * r, an integer (Macaulay2Doc), a positive integer $>=1$
  * Outputs:
      * a list (Macaulay2Doc),

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

Give a set of points $L$, the $r$-th Hadamard power of $L$ is $r$-times
Hadamard product of L to itself; $( L x\cdots x L)_{r-times}$

+-----------------------------------------------------------------------------+
|i1 : L={point{1,1,1/2},point{1,0,1},point{1,2,4}}                            |
|                                                                             |
|                  1                                                          |
|o1 = {Point{1, 1, -}, Point{1, 0, 1}, Point{1, 2, 4}}                        |
|                  2                                                          |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : hadamardPower(L,3)                                                      |
|                                                                             |
|                                                                   1         |
|o2 = {Point{1, 4, 8}, Point{1, 0, 16}, Point{1, 0, 1}, Point{1, 1, -},       |
|                                                                   8         |
|     ------------------------------------------------------------------------|
|                                 1                                           |
|     Point{1, 0, 2}, Point{1, 0, -}, Point{1, 2, 1}, Point{1, 0, 4}, Point{1,|
|                                 2                                           |
|     ------------------------------------------------------------------------|
|        1                                                                    |
|     0, -}, Point{1, 8, 64}}                                                 |
|        4                                                                    |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * hadamardPower(List,ZZ) -- computes the
    $r$-th Hadmard powers of a set points

hadamardProduct -- computes the Hadamard product of varieties
*************************************************************

Ways to use hadamardProduct :
=============================

  * hadamardProduct(Ideal,Ideal), --
    Hadamard product of two homogeneous ideals
  * hadamardProduct(List) -- Hadamard product
    of a list of homogeneous ideals, or points
  * hadamardProduct(List,List), --
    Hadamard product of two sets of points

For the programmer
==================

The object hadamardProduct, is a method function (Macaulay2Doc).

hadamardProduct(Ideal,Ideal) -- Hadamard product of two homogeneous ideals
**************************************************************************

Synopsis
========

  * Function: hadamardProduct,
  * Usage:
        hadamardProduct(I,J)
  * Inputs:
      * I, an ideal (Macaulay2Doc), (homogeneous)
      * J, an ideal (Macaulay2Doc), (homogeneous)
  * Outputs:
      * an ideal (Macaulay2Doc),

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

Given two projective subvarieties $X$ and $Y$, their Hadamard product is
defined as the Zariski closure of the set of (well-defined) entrywise products
of pairs of points in the cartesian product $X \times Y$. This can also be
regarded as the image of the Segre product of $X \times Y$ via the linear
projection on the $z_{ii}$ coordinates. The latter is the way the function is
implemented.

Consider for example the entrywise product of two points.

+-------------------------------------+
|i1 : S = QQ[x,y,z,t];                |
+-------------------------------------+
|i2 : p = point {1,1,1,2};            |
+-------------------------------------+
|i3 : q = point {1,-1,-1,-1};         |
+-------------------------------------+
|i4 : idealOfProjectivePoints({p*q},S)|
|                                     |
|o4 = ideal (2z - t, 2y - t, 2x + t)  |
|                                     |
|o4 : Ideal of S                      |
+-------------------------------------+

This can be computed also from their defining ideals as explained.

+-----------------------------------+
|i5 : IP = ideal(x-y,x-z,2*x-t)     |
|                                   |
|o5 = ideal (x - y, x - z, 2x - t)  |
|                                   |
|o5 : Ideal of S                    |
+-----------------------------------+
|i6 : IQ = ideal(x+y,x+z,x+t)       |
|                                   |
|o6 = ideal (x + y, x + z, x + t)   |
|                                   |
|o6 : Ideal of S                    |
+-----------------------------------+
|i7 : hadamardProduct(IP,IQ)        |
|                                   |
|o7 = ideal (2z - t, 2y - t, 2x + t)|
|                                   |
|o7 : Ideal of S                    |
+-----------------------------------+

We can also consider Hadamard product of higher dimensional varieties. For
example, the Hadamard product of two lines.

+-----------------------------------------------------------------------------+
|i8 : I = ideal(random(1,S),random(1,S));                                     |
|                                                                             |
|o8 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i9 : J = ideal(random(1,S),random(1,S));                                     |
|                                                                             |
|o9 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i10 : hadamardProduct(I,J)                                                   |
|                                                                             |
|                     2                                                       |
|o10 = ideal(97048224x  - 42121625x*y + 287249760x*z - 14791875y*z +          |
|      -----------------------------------------------------------------------|
|               2                                                             |
|      88905600z  + 4761000x*t + 12420000z*t)                                 |
|                                                                             |
|o10 : Ideal of S                                                             |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * hadamardProduct(Ideal,Ideal), --
    Hadamard product of two homogeneous ideals

hadamardProduct(List) -- Hadamard product of a list of homogeneous ideals, or points
************************************************************************************

Synopsis
========

  * Function: hadamardProduct,
  * Usage:
        hadamardProduct(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of (homogeneous) ideals (Macaulay2Doc),
        or (projective) points,
  * Outputs:
      * an ideal (Macaulay2Doc),
      * an instance of the type Point,

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

The Hadamard product of a list of ideals or points constructed by using
iteratively the binary function hadamardProduct(Ideal,Ideal),
or  Point * Point.

+-----------------------------------------------------------------------------+
|i1 : S = QQ[x,y,z,t];                                                        |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(random(1,S),random(1,S));                                     |
|                                                                             |
|o2 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i3 : J = ideal(random(1,S),random(1,S));                                     |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : L = {I,J};                                                              |
+-----------------------------------------------------------------------------+
|i5 : hadamardProduct(L)                                                      |
|                                                                             |
|                    2                                                       2|
|o5 = ideal(97048224x  - 42121625x*y + 287249760x*z - 14791875y*z + 88905600z |
|     ------------------------------------------------------------------------|
|     + 4761000x*t + 12420000z*t)                                             |
|                                                                             |
|o5 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i6 : P = point\{{1,2,3},{-1,1,1},{1,1/2,-1/3}}                               |
|                                                                             |
|                                                1    1                       |
|o6 = {Point{1, 2, 3}, Point{-1, 1, 1}, Point{1, -, - -}}                     |
|                                                2    3                       |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : hadamardProduct(P)                                                      |
|                                                                             |
|o7 = Point{-1, 1, -1}                                                        |
|                                                                             |
|o7 : Point                                                                   |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * hadamardProduct(List) -- Hadamard product
    of a list of homogeneous ideals, or points

hadamardProduct(List,List) -- Hadamard product of two sets of points
********************************************************************

Synopsis
========

  * Function: hadamardProduct,
  * Usage:
        hadamardProduct(L,M)
  * Inputs:
      * L, a list (Macaulay2Doc), of Point,
      * M, a list (Macaulay2Doc), of Point,
  * Outputs:
      * a list (Macaulay2Doc), of Point,

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

Given two sets of points $L$ and $M$ returns the list of (well-defined)
entrywise multiplication of pairs of points in the cartesian product $L\times
M$.

+--------------------------------------------+
|i1 : L = {point{0,1}, point{1,2}};          |
+--------------------------------------------+
|i2 : M = {point{1,0}, point{2,2}};          |
+--------------------------------------------+
|i3 : hadamardProduct(L,M)                   |
|                                            |
|o3 = {Point{1, 0}, Point{0, 2}, Point{2, 4}}|
|                                            |
|o3 : List                                   |
+--------------------------------------------+

Ways to use this method:
========================

  * hadamardProduct(List,List), --
    Hadamard product of two sets of points

idealOfProjectivePoints -- computes the ideal of set of points
**************************************************************

Synopsis
========

  * Usage:
        idealOfProjectivePoints(L,S)
  * Inputs:
      * L, a list (Macaulay2Doc), of (projective) points,
      * S, a ring (Macaulay2Doc),
  * Outputs:
      * I, an ideal (Macaulay2Doc),

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

Given a set points $X$, it returns the defining ideal of $I(X)$

+-----------------------------------------------------------------------------+
|i1 : S = QQ[x,y,z]                                                           |
|                                                                             |
|o1 = S                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : X = {point{1,1,0},point{0,1,1},point{1,2,-1}}                           |
|                                                                             |
|o2 = {Point{1, 1, 0}, Point{0, 1, 1}, Point{1, 2, -1}}                       |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : I = idealOfProjectivePoints(X,S)                                        |
|                                                                             |
|                          2           2           2    2     2            2  |
|o3 = ideal (3x*z - y*z + z , 3x*y - 3y  - y*z + 4z , 3x  - 3y  - 2y*z + 5z , |
|     ------------------------------------------------------------------------|
|      2       2     3                                                        |
|     y z + y*z  - 2z )                                                       |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : I2 = hadamardPower(I,2)                                                 |
|                                                                             |
|             2         2      2     3              2   2       2    3     2  |
|o4 = ideal (y z - 18x*z  + y*z  - 2z , x*y*z - 4x*z , x z - x*z , 2x  - 3x y |
|     ------------------------------------------------------------------------|
|          2       2                                                          |
|     + x*y  - 6x*z )                                                         |
|                                                                             |
|o4 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i5 : X2 = hadamardPower(X,2)                                                 |
|                                                                             |
|o5 = {Point{1, 4, 1}, Point{0, 2, -1}, Point{0, 1, 0}, Point{0, 1, 1},       |
|     ------------------------------------------------------------------------|
|     Point{1, 1, 0}, Point{1, 2, 0}}                                         |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : I2 == idealOfProjectivePoints(X2,S)                                     |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use idealOfProjectivePoints :
=====================================

  * "idealOfProjectivePoints(List,Ring)"

For the programmer
==================

The object idealOfProjectivePoints, is a
method function (Macaulay2Doc).

Point -- a new type for points in projective space
**************************************************

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

A point in projective space is represented as an object in the class
Point. An element of this class is a BasicList (Macaulay2Doc).

Methods that use an object of class Point :
===========================================

  * Point * Point -- entrywise product of two
    projective points
  * Point == Point -- check equality of two projective
    points

For the programmer
==================

The object Point, is a type (Macaulay2Doc), with
ancestor classes BasicList (Macaulay2Doc), < Thing (Macaulay2Doc).

point -- consructs a projective point from the list (or array) of coordinates.
******************************************************************************

Synopsis
========

  * Usage:
        point(L)
  * Inputs:
      * L, a list (Macaulay2Doc), or array (Macaulay2Doc),
        or visible list (Macaulay2Doc),
  * Outputs:
      * an instance of the type Point,

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

+-------------------+
|i1 : point {1,2,3} |
|                   |
|o1 = Point{1, 2, 3}|
|                   |
|o1 : Point         |
+-------------------+
|i2 : point [1,4,6] |
|                   |
|o2 = Point{1, 4, 6}|
|                   |
|o2 : Point         |
+-------------------+

Ways to use point :
===================

  * "point(VisibleList)"

For the programmer
==================

The object point, is a method function (Macaulay2Doc).

Point * Point -- entrywise product of two projective points
***********************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        p * q
  * Inputs:
      * p, an instance of the type Point,
      * q, an instance of the type Point,
  * Outputs:
      * an instance of the type Point,

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

+------------------------+
|i1 : p = point {1,2,3}; |
+------------------------+
|i2 : q = point {-1,2,5};|
+------------------------+
|i3 : p * q              |
|                        |
|o3 = Point{-1, 4, 15}   |
|                        |
|o3 : Point              |
+------------------------+

Note that this operation is not always well-defined in projective space, e.g.,
the Hadamard product of the points $[1:0]$ and $[0:1]$ is not well-defined

Ways to use this method:
========================

  * Point * Point -- entrywise product of two
    projective points

Point == Point -- check equality of two projective points
*********************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        p == q
  * Inputs:
      * p, an instance of the type Point,
      * q, an instance of the type Point,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

+---------------------+
|i1 : p = point {1,1};|
+---------------------+
|i2 : q = point {2,2};|
+---------------------+
|i3 : p == q          |
|                     |
|o3 = true            |
+---------------------+

Ways to use this method:
========================

  * Point == Point -- check equality of two projective
    points