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

HyperplaneArrangements -- manipulating hyperplane arrangements
**************************************************************

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

A hyperplane arrangement is a finite set of hyperplanes in an affine or
projective space.  In this package, an arrangement is expressed as a list of
(linear) defining equations for the hyperplanes.  The tools provided allow the
user to create new arrangements from old, and to compute various algebraic
invariants of arrangements.

Introductions to the theory of hyperplane arrangements can be found in the
following textbooks:

  * Alexandru Dimca (see https://math.unice.fr/~dimca/ ), Hyperplane
    arrangements (see https://doi.org/10.1007/978-3-319-56221-6 ),
    Universitext,Springer, Cham, 2017. ISBN: 978-3-319-56221-6
  * Peter Orlik (see https://en.wikipedia.org/wiki/Peter_Orlik ) and Hiroaki
    Terao (see https://en.wikipedia.org/wiki/Hiroaki_Terao ), Arrangements of
    hyperplanes (see https://doi.org/10.1007/978-3-662-02772-1 ), Grundlehren
    der mathematischen Wissenschaften 300,Springer-Verlag, Berlin, 1992. ISBN:
    978-3-662-02772-1
  * Richard P. Stanley (see https://math.mit.edu/~rstan/ ), An introduction to
    hyperplane arrangements (see https://doi.org/10.1090/pcms/013 ), in
    Geometric Combinatorics, 389-496, IAS/Park City Mathematics Series 13,
    American Mathematical Society, Providence, RI, 2007. ISBN:
    978-1-4704-3912-5

Authors
=======

  * Graham Denham (see http://gdenham.math.uwo.ca/ )
  * Gregory G. Smith (see http://www.mast.queensu.ca/~ggsmith )
    <ggsmith@mast.queensu.ca>
  * Avi Steiner (see https://sites.google.com/view/avi-steiner )
    <avi.steiner@gmail.com>

Version
=======

This documentation describes version 2.0 of HyperplaneArrangements.

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

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

Exports
=======

  * Types
      * Arrangement -- the class of all hyperplane
        arrangements
      * CentralArrangement -- the class of all
        central hyperplane arrangements
      * Flat -- intersection of hyperplanes
  * Functions and commands
      * "arrangement" -- see arrangement(List,Ring),
        -- make a hyperplane arrangement
      * "arrangementSum" -- see arrangementSum(Arrangement,Arrangement),
        -- make the direct sum
        of two arrangements
      * "deCone" -- see deCone(CentralArrangement,RingElement),
        -- produce an affine
        arrangement from a central one
      * "der" -- see der(CentralArrangement,List),
        -- compute the module of
        logarithmic derivations
      * "EPY" -- see EPY(Arrangement,PolynomialRing),
        -- compute the
        Eisenbud-Popescu-Yuzvinsky module of an arrangement
      * "eulerRestriction" -- see
        eulerRestriction(CentralArrangement,List,ZZ),
        -- form the Euler
        restriction of a central multiarrangement
      * "flat" -- see flat(Arrangement,List),
        -- make a flat from a list of indices
      * "genericArrangement" -- see genericArrangement(ZZ,ZZ,Ring),
        -- realize the uniform matroid
        using points on the monomial curve
      * "graphic" -- see graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * "isCentral" -- see isCentral(Arrangement),
        -- test to see if a hyperplane arrangement
        is central
      * "isDecomposable" -- see isDecomposable(CentralArrangement,Ring),
        -- whether a hyperplane
        arrangement decomposable in the sense of Papadima-Suciu
      * "lct" -- see logCanonicalThreshold(CentralArrangement),
        -- compute the
        log-canonical threshold of an arrangement
      * "logCanonicalThreshold" -- see
        logCanonicalThreshold(CentralArrangement),
        -- compute the
        log-canonical threshold of an arrangement
      * "makeEssential" -- see makeEssential(CentralArrangement),
        -- make an essential arrangement
        out of an arbitrary one
      * "meet" -- see meet(Flat,Flat), -- compute
        the meet operation in the intersection lattice
      * "multIdeal" -- see multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multiplierIdeal" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "orlikSolomon" -- see orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * "orlikTerao" -- see
        orlikTerao(CentralArrangement,PolynomialRing),
        -- compute the
        defining ideal for the Orlik-Terao algebra
      * "randomArrangement" -- see
        randomArrangement(ZZ,PolynomialRing,ZZ),
        -- generate an
        arrangement at random
      * "subArrangement" -- see subArrangement(Arrangement,Flat),
        -- create the hyperplane
        arrangement containing a flat
      * "typeA" -- see typeA(ZZ,Ring), -- make the
        hyperplane arrangement defined by a type $A_n$ root system
      * "typeB" -- see typeB(ZZ,Ring), -- make the
        hyperplane arrangement defined by a type $B_n$ root system
      * "typeD" -- see typeD(ZZ,Ring), -- make the
        hyperplane arrangement defined by a type $D_n$ root system
      * "vee" -- see vee(Flat,Flat), -- compute the
        vee operation in the intersection lattice
  * Methods
      * Arrangement ** Ring -- change the
        coefficient ring of an arrangement
      * Arrangement == Arrangement, --
        whether two hyperplane arrangements are equal
      * arrangement(Flat) -- get the hyperplane
        arrangement to which a flat belongs
      * "arrangement(List)" -- see arrangement(List,Ring),
        -- make a hyperplane arrangement
      * arrangement(List,Ring) -- make a
        hyperplane arrangement
      * "arrangement(RingElement)" -- see arrangement(List,Ring),
        -- make a hyperplane arrangement
      * "arrangement(Matrix)" -- see arrangement(Matrix,Ring),
        -- make a hyperplane arrangement
      * arrangement(Matrix,Ring) -- make
        a hyperplane arrangement
      * "arrangement(String)" -- see arrangement(String,Ring),
        -- access a database of classic
        hyperplane arrangements
      * "arrangement(String,PolynomialRing)" -- see
        arrangement(String,Ring), -- access a
        database of classic hyperplane arrangements
      * arrangement(String,Ring), --
        access a database of classic hyperplane arrangements
      * "Arrangement ++ Arrangement" -- see
        arrangementSum(Arrangement,Arrangement),
        -- make the direct sum
        of two arrangements
      * arrangementSum(Arrangement,Arrangement)
        -- make the direct sum
        of two arrangements
      * circuits(CentralArrangement),
        -- list the circuits of an arrangement
      * "closure(Arrangement,Ideal)" -- see closure(Arrangement,List),
        -- closure operation in the
        intersection lattice
      * closure(Arrangement,List), --
        closure operation in the intersection lattice
      * coefficients(Arrangement) -- make
        a matrix from the coefficients of the defining equations
      * compress(Arrangement) -- extract
        nonzero equations
      * cone(Arrangement,RingElement)
        -- creates an associated central
        hyperplane arrangement
      * "cone(Arrangement,Symbol)" -- see cone(Arrangement,RingElement),
        -- creates an associated central
        hyperplane arrangement
      * deCone(CentralArrangement,RingElement)
        -- produce an affine
        arrangement from a central one
      * "deCone(CentralArrangement,ZZ)" -- see
        deCone(CentralArrangement,RingElement),
        -- produce an affine
        arrangement from a central one
      * "deletion(Arrangement,List)" -- see
        deletion(Arrangement,RingElement),
        -- deletion of a subset of an
        arrangement
      * deletion(Arrangement,RingElement)
        -- deletion of a subset of an
        arrangement
      * "deletion(Arrangement,Set)" -- see
        deletion(Arrangement,RingElement),
        -- deletion of a subset of an
        arrangement
      * "deletion(Arrangement,ZZ)" -- see
        deletion(Arrangement,RingElement),
        -- deletion of a subset of an
        arrangement
      * "der(CentralArrangement)" -- see der(CentralArrangement,List),
        -- compute the module of
        logarithmic derivations
      * der(CentralArrangement,List),
        -- compute the module of logarithmic derivations
      * "dual(CentralArrangement)" -- see dual(CentralArrangement,Ring),
        -- the Gale dual of an arrangement
      * dual(CentralArrangement,Ring)
        -- the Gale dual of an arrangement
      * "EPY(Arrangement)" -- see EPY(Arrangement,PolynomialRing),
        -- compute the
        Eisenbud-Popescu-Yuzvinsky module of an arrangement
      * EPY(Arrangement,PolynomialRing)
        -- compute the
        Eisenbud-Popescu-Yuzvinsky module of an arrangement
      * "EPY(Ideal)" -- see EPY(Arrangement,PolynomialRing),
        -- compute the
        Eisenbud-Popescu-Yuzvinsky module of an arrangement
      * "EPY(Ideal,PolynomialRing)" -- see
        EPY(Arrangement,PolynomialRing),
        -- compute the Eisenbud-Popescu-Yuzvinsky module of an arrangement
      * euler(CentralArrangement), --
        compute the Euler characteristic of the projective complement
      * "euler(Flat)" -- see euler(CentralArrangement),
        -- compute the Euler characteristic of
        the projective complement
      * eulerRestriction(CentralArrangement,List,ZZ)
        -- form the Euler
        restriction of a central multiarrangement
      * Flat == Flat -- whether two flats are equal
      * flat(Arrangement,List) -- make a
        flat from a list of indices
      * "flats(Arrangement)" -- see flats(ZZ,Arrangement),
        -- list the flats of an arrangement of a
        given rank
      * flats(ZZ,Arrangement) -- list the
        flats of an arrangement of a given rank
      * "flats(ZZ,CentralArrangement)" -- see flats(ZZ,Arrangement),
        -- list the flats of an arrangement of a
        given rank
      * "genericArrangement(ZZ,ZZ)" -- see
        genericArrangement(ZZ,ZZ,Ring),
        -- realize the uniform matroid using points on the monomial curve
      * genericArrangement(ZZ,ZZ,Ring)
        -- realize the uniform matroid
        using points on the monomial curve
      * "graphic(List)" -- see graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * "graphic(List,List)" -- see graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * graphic(List,List,PolynomialRing)
        -- make a graphic
        arrangement
      * "graphic(List,List,Ring)" -- see
        graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * "graphic(List,PolynomialRing)" -- see
        graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * "graphic(List,Ring)" -- see graphic(List,List,PolynomialRing),
        -- make a graphic
        arrangement
      * hyperplanes(Arrangement) -- the
        defining linear forms of an arrangement
      * "toList(Arrangement)" -- see hyperplanes(Arrangement),
        -- the defining linear forms of an
        arrangement
      * isCentral(Arrangement) -- test to
        see if a hyperplane arrangement is central
      * "isDecomposable(CentralArrangement)" -- see
        isDecomposable(CentralArrangement,Ring),
        -- whether a hyperplane
        arrangement decomposable in the sense of Papadima-Suciu
      * isDecomposable(CentralArrangement,Ring)
        -- whether a hyperplane
        arrangement decomposable in the sense of Papadima-Suciu
      * "lct(CentralArrangement)" -- see
        logCanonicalThreshold(CentralArrangement),
        -- compute the
        log-canonical threshold of an arrangement
      * logCanonicalThreshold(CentralArrangement)
        -- compute the
        log-canonical threshold of an arrangement
      * makeEssential(CentralArrangement)
        -- make an essential arrangement
        out of an arbitrary one
      * matrix(Arrangement) -- make a matrix
        from the defining equations
      * matroid(CentralArrangement), --
        get the matroid of a central arrangement
      * "Flat ^ Flat" -- see meet(Flat,Flat), --
        compute the meet operation in the intersection lattice
      * meet(Flat,Flat) -- compute the meet
        operation in the intersection lattice
      * "multIdeal(QQ,CentralArrangement)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multIdeal(QQ,CentralArrangement,List)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multIdeal(ZZ,CentralArrangement)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multIdeal(ZZ,CentralArrangement,List)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multiplierIdeal(QQ,CentralArrangement)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * multiplierIdeal(QQ,CentralArrangement,List)
        -- compute a
        multiplier ideal
      * "multiplierIdeal(ZZ,CentralArrangement)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "multiplierIdeal(ZZ,CentralArrangement,List)" -- see
        multiplierIdeal(QQ,CentralArrangement,List),
        -- compute a
        multiplier ideal
      * "orlikSolomon(Arrangement)" -- see
        orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * orlikSolomon(Arrangement,PolynomialRing)
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * "orlikSolomon(Arrangement,Ring)" -- see
        orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * "orlikSolomon(Arrangement,Symbol)" -- see
        orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * "orlikSolomon(CentralArrangement,PolynomialRing)" -- see
        orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
      * "orlikTerao(CentralArrangement)" -- see
        orlikTerao(CentralArrangement,PolynomialRing),
        -- compute the
        defining ideal for the Orlik-Terao algebra
      * orlikTerao(CentralArrangement,PolynomialRing)
        -- compute the
        defining ideal for the Orlik-Terao algebra
      * "orlikTerao(CentralArrangement,Symbol)" -- see
        orlikTerao(CentralArrangement,PolynomialRing),
        -- compute the
        defining ideal for the Orlik-Terao algebra
      * poincare(Arrangement) -- compute the
        Poincaré polynomial of an arrangement
      * "poincare(CentralArrangement)" -- see poincare(Arrangement),
        -- compute the Poincaré polynomial of an
        arrangement
      * prune(Arrangement) -- makes a new
        hyperplane arrangement in a polynomial ring
      * randomArrangement(ZZ,PolynomialRing,ZZ)
        -- generate an
        arrangement at random
      * "randomArrangement(ZZ,ZZ,ZZ)" -- see
        randomArrangement(ZZ,PolynomialRing,ZZ),
        -- generate an
        arrangement at random
      * rank(CentralArrangement), --
        compute the rank of a central hyperplane arrangement
      * rank(Flat) -- compute the rank of a flat
      * "Arrangement ^ Flat" -- see restriction(Arrangement,Ideal),
        -- construct the restriction a
        hyperplane arrangement to a subspace
      * "restriction(Arrangement,Flat)" -- see
        restriction(Arrangement,Ideal),
        -- construct the restriction a hyperplane arrangement to a subspace
      * restriction(Arrangement,Ideal)
        -- construct the restriction a
        hyperplane arrangement to a subspace
      * "restriction(Arrangement,List)" -- see
        restriction(Arrangement,Ideal),
        -- construct the restriction a hyperplane arrangement to a subspace
      * "restriction(Arrangement,RingElement)" -- see
        restriction(Arrangement,Ideal),
        -- construct the restriction a hyperplane arrangement to a subspace
      * "restriction(Arrangement,Set)" -- see
        restriction(Arrangement,Ideal),
        -- construct the restriction a hyperplane arrangement to a subspace
      * "restriction(Arrangement,ZZ)" -- see
        restriction(Arrangement,Ideal),
        -- construct the restriction a hyperplane arrangement to a subspace
      * "restriction(Flat)" -- see restriction(Arrangement,Ideal),
        -- construct the restriction a
        hyperplane arrangement to a subspace
      * ring(Arrangement) -- get the underlying
        ring of a hyperplane arrangement
      * "Arrangement _ Flat" -- see subArrangement(Arrangement,Flat),
        -- create the hyperplane
        arrangement containing a flat
      * subArrangement(Arrangement,Flat)
        -- create the hyperplane
        arrangement containing a flat
      * "subArrangement(Flat)" -- see subArrangement(Arrangement,Flat),
        -- create the hyperplane
        arrangement containing a flat
      * "Arrangement ** RingMap" -- see substitute(Arrangement,RingMap),
        -- change the ring of an
        arrangement
      * "substitute(Arrangement,Ring)" -- see
        substitute(Arrangement,RingMap),
        -- change the ring of an arrangement
      * substitute(Arrangement,RingMap)
        -- change the ring of an
        arrangement
      * toList(Flat) -- the indices of a flat
      * trim(Arrangement) -- make a simple
        hyperplane arrangement
      * "typeA(ZZ)" -- see typeA(ZZ,Ring), -- make
        the hyperplane arrangement defined by a type $A_n$ root system
      * "typeA(ZZ,PolynomialRing)" -- see typeA(ZZ,Ring),
        -- make the hyperplane arrangement defined by a
        type $A_n$ root system
      * typeA(ZZ,Ring) -- make the hyperplane
        arrangement defined by a type $A_n$ root system
      * "typeB(ZZ)" -- see typeB(ZZ,Ring), -- make
        the hyperplane arrangement defined by a type $B_n$ root system
      * "typeB(ZZ,PolynomialRing)" -- see typeB(ZZ,Ring),
        -- make the hyperplane arrangement defined by a
        type $B_n$ root system
      * typeB(ZZ,Ring) -- make the hyperplane
        arrangement defined by a type $B_n$ root system
      * "typeD(ZZ)" -- see typeD(ZZ,Ring), -- make
        the hyperplane arrangement defined by a type $D_n$ root system
      * "typeD(ZZ,PolynomialRing)" -- see typeD(ZZ,Ring),
        -- make the hyperplane arrangement defined by a
        type $D_n$ root system
      * typeD(ZZ,Ring) -- make the hyperplane
        arrangement defined by a type $D_n$ root system
      * "Flat | Flat" -- see vee(Flat,Flat), --
        compute the vee operation in the intersection lattice
      * vee(Flat,Flat) -- compute the vee
        operation in the intersection lattice
  * Symbols
      * "Popescu" -- see orlikSolomon(Arrangement,PolynomialRing),
        -- compute the defining
        ideal for the Orlik-Solomon algebra
  * Other things
      * arrangementLibrary -- access a
        database of classic hyperplane arrangements

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

The object HyperplaneArrangements, is a package (Macaulay2Doc).

Arrangement -- the class of all hyperplane arrangements
*******************************************************

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

A hyperplane is an affine-linear subspace of codimension one.  An arrangement
is a finite set of hyperplanes.

Types of hyperplane arrangement :
=================================

  * CentralArrangement -- the class of all central
    hyperplane arrangements

Functions and methods returning a hyperplane arrangement :
==========================================================

  * Arrangement ** Ring -- change the
    coefficient ring of an arrangement
  * arrangement(Flat) -- get the hyperplane
    arrangement to which a flat belongs
  * "arrangement" -- see arrangement(List,Ring),
    -- make a hyperplane arrangement
  * "arrangement(List)" -- see arrangement(List,Ring),
    -- make a hyperplane arrangement
  * arrangement(List,Ring) -- make a
    hyperplane arrangement
  * "arrangement(RingElement)" -- see arrangement(List,Ring),
    -- make a hyperplane arrangement
  * "arrangement(Matrix)" -- see arrangement(Matrix,Ring),
    -- make a hyperplane arrangement
  * arrangement(Matrix,Ring) -- make a
    hyperplane arrangement
  * "arrangement(String)" -- see arrangement(String,Ring),
    -- access a database of classic hyperplane
    arrangements
  * "arrangement(String,PolynomialRing)" -- see arrangement(String,Ring),
    -- access a database of classic hyperplane
    arrangements
  * arrangement(String,Ring) -- access a
    database of classic hyperplane arrangements
  * "Arrangement ++ Arrangement" -- see
    arrangementSum(Arrangement,Arrangement),
    -- make the direct sum of
    two arrangements
  * arrangementSum(Arrangement,Arrangement)
    -- make the direct sum of
    two arrangements
  * compress(Arrangement) -- extract nonzero
    equations
  * deCone(CentralArrangement,RingElement)
    -- produce an affine
    arrangement from a central one
  * "deCone(CentralArrangement,ZZ)" -- see
    deCone(CentralArrangement,RingElement),
    -- produce an affine
    arrangement from a central one
  * "deletion(Arrangement,List)" -- see
    deletion(Arrangement,RingElement),
    -- deletion of a subset of an arrangement
  * deletion(Arrangement,RingElement)
    -- deletion of a subset of an
    arrangement
  * "deletion(Arrangement,Set)" -- see deletion(Arrangement,RingElement),
    -- deletion of a subset of an
    arrangement
  * "deletion(Arrangement,ZZ)" -- see deletion(Arrangement,RingElement),
    -- deletion of a subset of an
    arrangement
  * "genericArrangement" -- see genericArrangement(ZZ,ZZ,Ring),
    -- realize the uniform matroid
    using points on the monomial curve
  * "genericArrangement(ZZ,ZZ)" -- see genericArrangement(ZZ,ZZ,Ring),
    -- realize the uniform matroid
    using points on the monomial curve
  * genericArrangement(ZZ,ZZ,Ring)
    -- realize the uniform matroid
    using points on the monomial curve
  * "graphic(List)" -- see graphic(List,List,PolynomialRing),
    -- make a graphic arrangement
  * "graphic(List,PolynomialRing)" -- see
    graphic(List,List,PolynomialRing),
    -- make a graphic arrangement
  * "graphic(List,Ring)" -- see graphic(List,List,PolynomialRing),
    -- make a graphic arrangement
  * prune(Arrangement) -- makes a new hyperplane
    arrangement in a polynomial ring
  * randomArrangement(ZZ,PolynomialRing,ZZ)
    -- generate an arrangement
    at random
  * "randomArrangement(ZZ,ZZ,ZZ)" -- see
    randomArrangement(ZZ,PolynomialRing,ZZ),
    -- generate an arrangement
    at random
  * "Arrangement ^ Flat" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "restriction(Arrangement,Flat)" -- see
    restriction(Arrangement,Ideal), --
    construct the restriction a hyperplane arrangement to a subspace
  * restriction(Arrangement,Ideal),
    -- construct the restriction a hyperplane arrangement to a subspace
  * "restriction(Arrangement,List)" -- see
    restriction(Arrangement,Ideal), --
    construct the restriction a hyperplane arrangement to a subspace
  * "restriction(Arrangement,RingElement)" -- see
    restriction(Arrangement,Ideal), --
    construct the restriction a hyperplane arrangement to a subspace
  * "restriction(Arrangement,Set)" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "restriction(Arrangement,ZZ)" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "restriction(Flat)" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "Arrangement _ Flat" -- see subArrangement(Arrangement,Flat),
    -- create the hyperplane
    arrangement containing a flat
  * "subArrangement" -- see subArrangement(Arrangement,Flat),
    -- create the hyperplane
    arrangement containing a flat
  * subArrangement(Arrangement,Flat)
    -- create the hyperplane
    arrangement containing a flat
  * "subArrangement(Flat)" -- see subArrangement(Arrangement,Flat),
    -- create the hyperplane
    arrangement containing a flat
  * "Arrangement ** RingMap" -- see substitute(Arrangement,RingMap),
    -- change the ring of an arrangement
  * "substitute(Arrangement,Ring)" -- see
    substitute(Arrangement,RingMap), --
    change the ring of an arrangement
  * substitute(Arrangement,RingMap)
    -- change the ring of an arrangement
  * trim(Arrangement) -- make a simple hyperplane
    arrangement
  * "typeA(ZZ)" -- see typeA(ZZ,Ring), -- make the
    hyperplane arrangement defined by a type $A_n$ root system
  * "typeA(ZZ,PolynomialRing)" -- see typeA(ZZ,Ring),
    -- make the hyperplane arrangement defined by a type
    $A_n$ root system
  * typeA(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $A_n$ root system
  * "typeB(ZZ)" -- see typeB(ZZ,Ring), -- make the
    hyperplane arrangement defined by a type $B_n$ root system
  * "typeB(ZZ,PolynomialRing)" -- see typeB(ZZ,Ring),
    -- make the hyperplane arrangement defined by a type
    $B_n$ root system
  * typeB(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $B_n$ root system
  * "typeD(ZZ)" -- see typeD(ZZ,Ring), -- make the
    hyperplane arrangement defined by a type $D_n$ root system
  * "typeD(ZZ,PolynomialRing)" -- see typeD(ZZ,Ring),
    -- make the hyperplane arrangement defined by a type
    $D_n$ root system
  * typeD(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $D_n$ root system

Methods that use a hyperplane arrangement :
===========================================

  * Arrangement == Arrangement -- whether
    two hyperplane arrangements are equal
  * "closure(Arrangement,Ideal)" -- see closure(Arrangement,List),
    -- closure operation in the intersection
    lattice
  * closure(Arrangement,List), --
    closure operation in the intersection lattice
  * coefficients(Arrangement) -- make a
    matrix from the coefficients of the defining equations
  * cone(Arrangement,RingElement),
    -- creates an associated central hyperplane arrangement
  * "cone(Arrangement,Symbol)" -- see cone(Arrangement,RingElement),
    -- creates an associated central
    hyperplane arrangement
  * "EPY(Arrangement)" -- see EPY(Arrangement,PolynomialRing),
    -- compute the
    Eisenbud-Popescu-Yuzvinsky module of an arrangement
  * EPY(Arrangement,PolynomialRing)
    -- compute the
    Eisenbud-Popescu-Yuzvinsky module of an arrangement
  * flat(Arrangement,List) -- make a flat
    from a list of indices
  * "flats(Arrangement)" -- see flats(ZZ,Arrangement),
    -- list the flats of an arrangement of a given
    rank
  * flats(ZZ,Arrangement) -- list the flats
    of an arrangement of a given rank
  * hyperplanes(Arrangement) -- the
    defining linear forms of an arrangement
  * "toList(Arrangement)" -- see hyperplanes(Arrangement),
    -- the defining linear forms of an
    arrangement
  * isCentral(Arrangement) -- test to see if
    a hyperplane arrangement is central
  * matrix(Arrangement) -- make a matrix from
    the defining equations
  * "orlikSolomon(Arrangement)" -- see
    orlikSolomon(Arrangement,PolynomialRing),
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * orlikSolomon(Arrangement,PolynomialRing)
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * "orlikSolomon(Arrangement,Ring)" -- see
    orlikSolomon(Arrangement,PolynomialRing),
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * "orlikSolomon(Arrangement,Symbol)" -- see
    orlikSolomon(Arrangement,PolynomialRing),
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * poincare(Arrangement) -- compute the
    Poincaré polynomial of an arrangement
  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement

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

The object Arrangement, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

Arrangement ** Ring -- change the coefficient ring of an arrangement
********************************************************************

Synopsis
========

  * Operator: ** (Macaulay2Doc),
  * Usage:
        A ** K
  * Inputs:
      * A, a hyperplane arrangement,
      * K, a ring (Macaulay2Doc),
  * Outputs:
      * a hyperplane arrangement, the hyperplane
        arrangement defined by tensoring the underlying ring,
        with $K$.

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

This methods makes a new hyperplane arrangement by changing the coefficient
ring of the underlying ring.

+-----------------------------+
|i1 : R = ZZ[x,y];            |
+-----------------------------+
|i2 : A = arrangement{x,y,x-y}|
|                             |
|o2 = {x, y, x - y}           |
|                             |
|o2 : Hyperplane Arrangement  |
+-----------------------------+
|i3 : A' = A ** QQ            |
|                             |
|o3 = {x, y, x - y}           |
|                             |
|o3 : Hyperplane Arrangement  |
+-----------------------------+
|i4 : ring A'                 |
|                             |
|o4 = QQ[x..y]                |
|                             |
|o4 : PolynomialRing          |
+-----------------------------+
|i5 : assert(R =!= ring A')   |
+-----------------------------+

See also
========

  * substitute(Arrangement,RingMap)
    -- change the ring of an arrangement
  * substitute(Arrangement,Ring),
    -- change the ring of an arrangement
  * Arrangement ** RingMap, --
    change the ring of an arrangement

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

  * Arrangement ** Ring -- change the
    coefficient ring of an arrangement

Arrangement == Arrangement -- whether two hyperplane arrangements are equal
***************************************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        A == B
  * Inputs:
      * A, a hyperplane arrangement,
      * B, a hyperplane arrangement,
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true if the
        underlying rings are equal and the lists of hyperplanes are the same

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

Two hyperplane arrangements are equal their underlying rings are identical and
their defining linear forms are listed in the same order.

Although the following two arrangements have the same hyperplanes, they are not
equal because the linear forms are different.

+---------------------------------+
|i1 : R = QQ[x, y];               |
+---------------------------------+
|i2 : A = arrangement{x, y, x+y}  |
|                                 |
|o2 = {x, y, x + y}               |
|                                 |
|o2 : Hyperplane Arrangement      |
+---------------------------------+
|i3 : assert(A == A)              |
+---------------------------------+
|i4 : B = arrangement{2*x, y, x+y}|
|                                 |
|o4 = {2x, y, x + y}              |
|                                 |
|o4 : Hyperplane Arrangement      |
+---------------------------------+
|i5 : A == B                      |
|                                 |
|o5 = false                       |
+---------------------------------+
|i6 : assert not (A == B)         |
+---------------------------------+
|i7 : assert( A != B )            |
+---------------------------------+

The order in which the hyperplanes are listed is also important.

+--------------------------------+
|i8 : A' = arrangement{y, x, x+y}|
|                                |
|o8 = {y, x, x + y}              |
|                                |
|o8 : Hyperplane Arrangement     |
+--------------------------------+
|i9 : A == A'                    |
|                                |
|o9 = false                      |
+--------------------------------+
|i10 : assert( A != A' )         |
+--------------------------------+

See also
========

  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement
  * hyperplanes(Arrangement) -- the
    defining linear forms of an arrangement

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

  * Arrangement == Arrangement -- whether
    two hyperplane arrangements are equal

arrangement(Flat) -- get the hyperplane arrangement to which a flat belongs
***************************************************************************

Synopsis
========

  * Function: arrangement,
  * Usage:
        arrangement F
  * Inputs:
      * F, a flat in an hyperplane arrangement,
  * Outputs:
      * a hyperplane arrangement, to which the flat belongs

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

A flat is a set of hyperplanes that are maximal with respect to the property
that they contain a given affine subspace.  In this package, flats are treated
as lists of indices of hyperplanes in the arrangement.  Given a flat, this
method returns the underlying hyperplane arrangement.

+-------------------------------------------------------------------+
|i1 : A3 = typeA 3                                                  |
|                                                                   |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }        |
|       1    2   1    3   1    4   2    3   2    4   3    4         |
|                                                                   |
|o1 : Hyperplane Arrangement                                        |
+-------------------------------------------------------------------+
|i2 : F = flat(A3,{3,4,5})                                          |
|                                                                   |
|o2 = {3, 4, 5}                                                     |
|                                                                   |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|               1    2   1    3   1    4   2    3   2    4   3    4 |
+-------------------------------------------------------------------+
|i3 : assert(arrangement F === A3)                                  |
+-------------------------------------------------------------------+

See also
========

  * flat(Arrangement,List) -- make a flat
    from a list of indices
  * flats(Arrangement) -- list the flats of
    an arrangement of a given rank

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

  * arrangement(Flat) -- get the hyperplane
    arrangement to which a flat belongs

arrangement(List,Ring) -- make a hyperplane arrangement
*******************************************************

Synopsis
========

  * Function: arrangement,
  * Usage:
        arrangement(L, R)
        arrangement L
  * Inputs:
      * L, a list (Macaulay2Doc), of affine-linear equations in the
        ring $R$ or a ring element (Macaulay2Doc), that is a
        product of linear forms
      * R, a ring (Macaulay2Doc), a polynomial ring or linear
        quotient of a polynomial ring
  * Outputs:
      * a hyperplane arrangement, determined by the input
        data

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

A hyperplane is an affine-linear subspace of codimension one.  An arrangement
is a finite set of hyperplanes.  When each hyperplane contains the origin, the
arrangement is central.

Probably the best-known hyperplane arrangement is the braid arrangement
consisting of all the diagonal hyperplanes.  In $4$-space, it is constructed as
follows.

+----------------------------------------------------+
|i1 : S = QQ[w,x,y,z];                               |
+----------------------------------------------------+
|i2 : A3 = arrangement {w-x, w-y, w-z, x-y, x-z, y-z}|
|                                                    |
|o2 = {w - x, w - y, w - z, x - y, x - z, y - z}     |
|                                                    |
|o2 : Hyperplane Arrangement                         |
+----------------------------------------------------+
|i3 : assert isCentral A3                            |
+----------------------------------------------------+

When a hyperplane arrangement is created from a product of linear forms, the
order of the factors is not preserved.

+------------------------------------------------------------+
|i4 : A3' = arrangement ((w-x)*(w-y)*(w-z)*(x-y)*(x-z)*(y-z))|
|                                                            |
|o4 = {y - z, x - z, x - y, w - z, w - y, w - x}             |
|                                                            |
|o4 : Hyperplane Arrangement                                 |
+------------------------------------------------------------+
|i5 : assert(A3 != A3')                                      |
+------------------------------------------------------------+
|i6 : arrangement (x^2*y^2*(x^2-y^2)*(x^2-z^2))              |
|                                                            |
|o6 = {y, y, x, x, x - z, x + z, x - y, x + y}               |
|                                                            |
|o6 : Hyperplane Arrangement                                 |
+------------------------------------------------------------+

The package can recognize that a polynomial splits into linear forms over the
base field.

+-----------------------------------------------------------------------------+
|i7 : kk = toField(QQ[p]/(p^2+p+1)) -- toField is necessary so that M2 treats |
|                                                                             |
|o7 = kk                                                                      |
|                                                                             |
|o7 : PolynomialRing                                                          |
|-----------------------------------------------------------------------------|
|this as a field                                                              |
+-----------------------------------------------------------------------------+
|i8 : R = kk[s,t]                                                             |
|                                                                             |
|o8 = R                                                                       |
|                                                                             |
|o8 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i9 : arrangement (s^3-t^3)                                                   |
|                                                                             |
|o9 = {s - t, s - p*t, s + (p + 1)t}                                          |
|                                                                             |
|o9 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+

If we project onto a linear subspace, then we obtain an essential arrangement,
meaning that the rank of the arrangement is equal to the dimension of its
ambient vector space.

+---------------------------------------------------------------------+
|i10 : R = S/ideal(w+x+y+z);                                          |
+---------------------------------------------------------------------+
|i11 : A3'' = arrangement({w-x,w-y,w-z,x-y,x-z,y-z}, R)               |
|                                                                     |
|o11 = {- 2x - y - z, - x - 2y - z, - x - y - 2z, x - y, x - z, y - z}|
|                                                                     |
|o11 : Hyperplane Arrangement                                         |
+---------------------------------------------------------------------+
|i12 : ring A3''                                                      |
|                                                                     |
|o12 = R                                                              |
|                                                                     |
|o12 : QuotientRing                                                   |
+---------------------------------------------------------------------+
|i13 : assert(rank A3'' === dim ring A3'')                            |
+---------------------------------------------------------------------+

The trivial arrangement has no equations.

+---------------------------------+
|i14 : trivial = arrangement({},S)|
|                                 |
|o14 = {}                         |
|                                 |
|o14 : Hyperplane Arrangement     |
+---------------------------------+
|i15 : ring trivial               |
|                                 |
|o15 = S                          |
|                                 |
|o15 : PolynomialRing             |
+---------------------------------+
|i16 : assert isCentral trivial   |
+---------------------------------+

Caveat
======

If the entries in $L$ are not ring elements (Macaulay2Doc),
in $R$, then the induced identity map is used to map them from the ring of
first element in $L$ into $R$.

See also
========

  * HyperplaneArrangements -- manipulating hyperplane arrangements
  * arrangement(Matrix) -- make a
    hyperplane arrangement
  * arrangement(String,PolynomialRing),
    -- access a database of classic hyperplane arrangements
  * isCentral(Arrangement) -- test to see if
    a hyperplane arrangement is central

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

  * "arrangement(List)"
  * arrangement(List,Ring) -- make a
    hyperplane arrangement
  * "arrangement(RingElement)"

arrangement(Matrix,Ring) -- make a hyperplane arrangement
*********************************************************

Synopsis
========

  * Function: arrangement,
  * Usage:
        arrangement(M, R)
        arrangement M
  * Inputs:
      * M, a matrix (Macaulay2Doc), a matrix whose columns
        represent linear forms defining hyperplanes
      * R, a ring (Macaulay2Doc), a polynomial ring or linear
        quotient of a polynomial ring
  * Outputs:
      * a hyperplane arrangement, determined by the input
        data

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

A hyperplane is an affine-linear subspace of codimension one.  An arrangement
is a finite set of hyperplanes.  When each hyperplane contains the origin, the
arrangement is central.

Probably the best-known hyperplane arrangement is the braid arrangement
consisting of all the diagonal hyperplanes.  In $4$-space, it is constructed as
follows.

+-----------------------------------------------------------------------------+
|i1 : S = QQ[w,x,y,z];                                                        |
+-----------------------------------------------------------------------------+
|i2 : A3 = arrangement(matrix{{1,1,1,0,0,0},{-1,0,0,1,1,0},{0,-1,0,-1,0,1},{0,|
|                                                                             |
|o2 = {w - x, w - y, w - z, x - y, x - z, y - z}                              |
|                                                                             |
|o2 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|0,-1,0,-1,-1}}, S)                                                           |
+-----------------------------------------------------------------------------+
|i3 : assert isCentral A3                                                     |
+-----------------------------------------------------------------------------+

If we project along onto a subspace, then we obtain an essential arrangement,
meaning that the rank of the arrangement is equal to the dimension of its
ambient vector space.

+-----------------------------------------------------------------------------+
|i4 : R = S/ideal(w+x+y+z);                                                   |
+-----------------------------------------------------------------------------+
|i5 : A3' = arrangement(matrix{{1,1,1,0,0,0},{-1,0,0,1,1,0},{0,-1,0,-1,0,1},{0|
|                                                                             |
|o5 = {- 2x - y - z, - x - 2y - z, - x - y - 2z, x - y, x - z, y - z}         |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|,0,-1,0,-1,-1}}, R)                                                          |
+-----------------------------------------------------------------------------+
|i6 : ring A3'                                                                |
|                                                                             |
|o6 = R                                                                       |
|                                                                             |
|o6 : QuotientRing                                                            |
+-----------------------------------------------------------------------------+
|i7 : assert(rank A3' === dim ring A3')                                       |
+-----------------------------------------------------------------------------+

The trivial arrangement has no equations.

+--------------------------------------------+
|i8 : trivial = arrangement(map(S^4,S^0,0),S)|
|                                            |
|o8 = {}                                     |
|                                            |
|o8 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i9 : ring trivial                           |
|                                            |
|o9 = S                                      |
|                                            |
|o9 : PolynomialRing                         |
+--------------------------------------------+
|i10 : assert isCentral trivial              |
+--------------------------------------------+

See also
========

  * HyperplaneArrangements -- manipulating hyperplane arrangements
  * arrangement(List) -- make a hyperplane
    arrangement
  * arrangement(String,PolynomialRing),
    -- access a database of classic hyperplane arrangements
  * isCentral(Arrangement) -- test to see if
    a hyperplane arrangement is central

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

  * "arrangement(Matrix)"
  * arrangement(Matrix,Ring) -- make a
    hyperplane arrangement

arrangement(String,Ring) -- access a database of classic hyperplane arrangements
********************************************************************************

Synopsis
========

  * Function: arrangement,
  * Usage:
        arrangement(s, R)
        arrangement s
  * Inputs:
      * s, a string (Macaulay2Doc), corresponding to the name of
        a hyperplane arrangement in the database
      * R, a ring (Macaulay2Doc), that determines the coefficient
        ring of the hyperplane arrangement or a polynomial ring (Macaulay2Doc),
        that determines the ambient ring,
  * Outputs:
      * a hyperplane arrangement, from the database

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

A hyperplane is an affine-linear subspace of codimension one.  An arrangement
is a finite set of hyperplanes.  This method allows convenient access to the
hyperplane arrangements with the following names

+-----------------------------------------------------------------------------+
|i1 : sort keys arrangementLibrary                                            |
|                                                                             |
|o1 = {(9_3)_2, bracelet, braid, Desargues, Hessian, MacLane, nonFano,        |
|     ------------------------------------------------------------------------|
|     notTame, Pappus, prism, X2, X3, Ziegler1, Ziegler2}                     |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+

We illustrate various ways to specify the ambient ring for some classic
hyperplane arrangements.

+-----------------------------------------------------------------------------+
|i2 : A0 = arrangement "(9_3)_2"                                              |
|                                                                             |
|o2 = {x , x , x , x  + x , x  + x , x  + 3x , x  + 2x  + x , x  + 2x  + 3x , |
|       1   2   3   1    2   2    3   1     3   1     2    3   1     2     3  |
|                                                                             |
|o2 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|4x  + 6x  + 6x }                                                             |
|  1     2     3                                                              |
+-----------------------------------------------------------------------------+
|i3 : ring A0                                                                 |
|                                                                             |
|o3 = QQ[x ..x ]                                                              |
|         1   3                                                               |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : A1 = arrangement("bracelet", ZZ)                                        |
|                                                                             |
|o4 = {x , x , x , x  + x , x  + x , x  + x , x  + x  + x , x  + x  + x , x  +|
|       1   2   3   1    4   2    4   3    4   1    2    4   1    3    4   2  |
|                                                                             |
|o4 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|x  + x }                                                                     |
| 3    4                                                                      |
+-----------------------------------------------------------------------------+
|i5 : ring A1                                                                 |
|                                                                             |
|o5 = ZZ[x ..x ]                                                              |
|         1   4                                                               |
|                                                                             |
|o5 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i6 : A2 = arrangement("braid", ZZ/101)                                       |
|                                                                             |
|o6 = {x , x , x , x  - x , x  - x , x  - x }                                 |
|       1   2   3   1    2   1    3   2    3                                  |
|                                                                             |
|o6 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i7 : ring A2                                                                 |
|                                                                             |
|      ZZ                                                                     |
|o7 = ---[x ..x ]                                                             |
|     101  1   3                                                              |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i8 : A3 = arrangement("Desargues", ZZ[vars(0..2)])                           |
|                                                                             |
|o8 = {a, b, c, a + b + c, 2a - 3c, 2a + b - 3c, - 3a - 2b + 2c, a + 2b + c,  |
|                                                                             |
|o8 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|3a + 2b + c, 2a + b}                                                         |
+-----------------------------------------------------------------------------+
|i9 : ring A3                                                                 |
|                                                                             |
|o9 = ZZ[a..c]                                                                |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : A4 = arrangement("nonFano", QQ[a..c])                                  |
|                                                                             |
|o10 = {a, b, c, b - c, a - c, a - b, a + b - c}                              |
|                                                                             |
|o10 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+
|i11 : ring A4                                                                |
|                                                                             |
|o11 = QQ[a..c]                                                               |
|                                                                             |
|o11 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i12 : A5 = arrangement("notTame", ZZ/32003[w,x,y,z])                         |
|                                                                             |
|o12 = {w, x, y, z, w + x, w + y, w + z, x + y, x + z, y + z, w + x + y, w + x|
|                                                                             |
|o12 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|+ z, w + y + z, x + y + z, w + x + y + z}                                    |
+-----------------------------------------------------------------------------+
|i13 : ring A5                                                                |
|                                                                             |
|        ZZ                                                                   |
|o13 = -----[w..z]                                                            |
|      32003                                                                  |
|                                                                             |
|o13 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+

Two of the entries in the database are defined over the finite field with
$31627$ elements where $6419$ is a cube root of unity.

+-----------------------------------------------------------------------------+
|i14 : A6 = arrangement "MacLane"                                             |
|                                                                             |
|o14 = {x , x , x , x  - x , x  - x , x  - 6420x , x  - 6420x  - x , x  -     |
|        1   2   3   1    2   1    3   2        3   1        2    3   1       |
|                                                                             |
|o14 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|6420x  + 6419x }                                                             |
|     2        3                                                              |
+-----------------------------------------------------------------------------+
|i15 : ring A6                                                                |
|                                                                             |
|        ZZ                                                                   |
|o15 = -----[x ..x ]                                                          |
|      31627  1   3                                                           |
|                                                                             |
|o15 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i16 : A7 = arrangement("Hessian", ZZ/31627[a,b,c])                           |
|                                                                             |
|o16 = {a, b, c, a + b + c, a + b + 6419c, a + b - 6420c, a + 6419b + c, a +  |
|                                                                             |
|o16 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|6419b + 6419c, a + 6419b - 6420c, a - 6420b + c, a - 6420b + 6419c, a - 6420b|
|-----------------------------------------------------------------------------|
|- 6420c}                                                                     |
+-----------------------------------------------------------------------------+
|i17 : ring A7                                                                |
|                                                                             |
|        ZZ                                                                   |
|o17 = -----[a..c]                                                            |
|      31627                                                                  |
|                                                                             |
|o17 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+

Every entry in this database determines a central hyperplane arrangement.

+-----------------------------------------------------------------------+
|i18 : assert all(keys arrangementLibrary, s -> isCentral arrangement s)|
+-----------------------------------------------------------------------+

The following two examples have the property that the six triple points lie on
a conic in the one arrangement, but not in the other.  The difference is not
reflected in the matroid.  However, Hal Schenck's and Ştefan O. Tohǎneanu's
paper "The Orlik-Terao algebra and 2-formality" Mathematical Research Letters
16 (2009) 171-182 arXiv:0901.0253 (see https://arxiv.org/abs/0901.0253 )
observes a difference between their respective Orlik-Terao,
algebras.

+-----------------------------------------------------------------------------+
|i19 : Z1 = arrangement "Ziegler1"                                            |
|                                                                             |
|o19 = {x , x , x , x  + x  + x , 2x  + x  + x , 2x  + 3x  + x , 2x  + 3x  +  |
|        1   2   3   1    2    3    1    2    3    1     2    3    1     2    |
|                                                                             |
|o19 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|4x , 3x  + 5x , 3x  + 4x  + 5x }                                             |
|  3    1     3    1     2     3                                              |
+-----------------------------------------------------------------------------+
|i20 : Z2 = arrangement "Ziegler2"                                            |
|                                                                             |
|o20 = {x , x , x , x  + x  + x , 2x  + x  + x , 2x  + 3x  + x , 2x  + 3x  +  |
|        1   2   3   1    2    3    1    2    3    1     2    3    1     2    |
|                                                                             |
|o20 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|4x , x  + 3x , x  + 2x  + 3x }                                               |
|  3   1     3   1     2     3                                                |
+-----------------------------------------------------------------------------+
|i21 : assert(matroid Z1 == matroid Z2) -- same underlying matroid            |
+-----------------------------------------------------------------------------+
|i22 : I1 = orlikTerao Z1;                                                    |
|                                                                             |
|o22 : Ideal of QQ[y ..y ]                                                    |
|                   1   9                                                     |
+-----------------------------------------------------------------------------+
|i23 : I2 = orlikTerao Z2;                                                    |
|                                                                             |
|o23 : Ideal of QQ[y ..y ]                                                    |
|                   1   9                                                     |
+-----------------------------------------------------------------------------+
|i24 : assert(hilbertPolynomial I1 == hilbertPolynomial I2) -- same Hilbert   |
|-----------------------------------------------------------------------------|
|polynomial                                                                   |
+-----------------------------------------------------------------------------+
|i25 : hilbertPolynomial ideal super basis(2,I1)                              |
|                                                                             |
|o25 = 240*P  - 192*P  + 64*P                                                 |
|           0        1       2                                                |
|                                                                             |
|o25 : ProjectiveHilbertPolynomial                                            |
+-----------------------------------------------------------------------------+
|i26 : hilbertPolynomial ideal super basis(2,I2) -- but not (graded)          |
|                                                                             |
|o26 = - 5*P  + 24*P  - 38*P  + 20*P                                          |
|           0       1       2       3                                         |
|                                                                             |
|o26 : ProjectiveHilbertPolynomial                                            |
|-----------------------------------------------------------------------------|
|isomorphic                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement
  * typeA -- make the hyperplane arrangement
    defined by a type $A_n$ root system
  * typeB -- make the hyperplane arrangement
    defined by a type $B_n$ root system
  * typeD -- make the hyperplane arrangement
    defined by a type $D_n$ root system
  * isCentral(Arrangement) -- test to see if
    a hyperplane arrangement is central

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

  * "arrangement(String)"
  * "arrangement(String,PolynomialRing)"
  * arrangement(String,Ring) -- access a
    database of classic hyperplane arrangements

arrangementSum(Arrangement,Arrangement) -- make the direct sum of two arrangements
**********************************************************************************

Synopsis
========

  * Function: arrangementSum,
  * Usage:
        arrangementSum(A,B)
        A ++ B
  * Inputs:
      * A, a hyperplane arrangement,
      * B, a hyperplane arrangement,
  * Outputs:
      * a hyperplane arrangement, the sum ${\mathcal A}
        \oplus {\mathcal B}$

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

Given two hyperplane arrangements ${\mathcal A}$ in $V$ and ${\mathcal B}$ in
$W$, the sum ${\mathcal A} \oplus {\mathcal B}$ is the hyperplane arrangement
in $V \oplus W$ with hyperplanes $\{ H \oplus W \colon H \in {\mathcal A} \}
\cup \{ V \oplus H \colon H\in {\mathcal B} \}$.  The ring of the direct sum is
(ring A) ** (ring B) with all the generators assigned degree 1.

+-----------------------------------------------------+
|i1 : R = QQ[w,x];                                    |
+-----------------------------------------------------+
|i2 : S = QQ[y,z];                                    |
+-----------------------------------------------------+
|i3 : A = arrangement{w, x, w-x}                      |
|                                                     |
|o3 = {w, x, w - x}                                   |
|                                                     |
|o3 : Hyperplane Arrangement                          |
+-----------------------------------------------------+
|i4 : B = arrangement{y, z, y+z}                      |
|                                                     |
|o4 = {y, z, y + z}                                   |
|                                                     |
|o4 : Hyperplane Arrangement                          |
+-----------------------------------------------------+
|i5 : C = A ++ B                                      |
|                                                     |
|o5 = {w, x, w - x, y, z, y + z}                      |
|                                                     |
|o5 : Hyperplane Arrangement                          |
+-----------------------------------------------------+
|i6 : gens ring C                                     |
|                                                     |
|o6 = {w, x, y, z}                                    |
|                                                     |
|o6 : List                                            |
+-----------------------------------------------------+
|i7 : assert (degrees ring C === {{1}, {1}, {1}, {1}})|
+-----------------------------------------------------+

Caveat
======

Both hyperplane arrangements must be defined over the same coefficient ring.

See also
========

  * subArrangement(Flat), --
    create the hyperplane arrangement containing a flat
  * restriction(Flat) -- construct
    the restriction a hyperplane arrangement to a subspace
  * isDecomposable, --
    whether a hyperplane arrangement decomposable in the sense of
    Papadima-Suciu

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

  * arrangementSum(Arrangement,Arrangement)
    -- make the direct sum of
    two arrangements

CentralArrangement -- the class of all central hyperplane arrangements
**********************************************************************

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

A central arrangement is a finite set of linear hyperplanes. In other words,
each hyperplane passes through the origin.

Functions and methods returning a central hyperplane arrangement :
==================================================================

  * cone(Arrangement,RingElement),
    -- creates an associated central hyperplane arrangement
  * "cone(Arrangement,Symbol)" -- see cone(Arrangement,RingElement),
    -- creates an associated central
    hyperplane arrangement
  * "dual(CentralArrangement)" -- see dual(CentralArrangement,Ring),
    -- the Gale dual of an arrangement
  * dual(CentralArrangement,Ring),
    -- the Gale dual of an arrangement
  * makeEssential(CentralArrangement)
    -- make an essential arrangement out
    of an arbitrary one

Methods that use a central hyperplane arrangement :
===================================================

  * circuits(CentralArrangement), --
    list the circuits of an arrangement
  * deCone(CentralArrangement,RingElement)
    -- produce an affine
    arrangement from a central one
  * "deCone(CentralArrangement,ZZ)" -- see
    deCone(CentralArrangement,RingElement),
    -- produce an affine
    arrangement from a central one
  * "der(CentralArrangement)" -- see der(CentralArrangement,List),
    -- compute the module of logarithmic
    derivations
  * der(CentralArrangement,List), --
    compute the module of logarithmic derivations
  * euler(CentralArrangement) -- compute
    the Euler characteristic of the projective complement
  * eulerRestriction(CentralArrangement,List,ZZ)
    -- form the Euler
    restriction of a central multiarrangement
  * "flats(ZZ,CentralArrangement)" -- see flats(ZZ,Arrangement),
    -- list the flats of an arrangement of a given
    rank
  * "isDecomposable(CentralArrangement)" -- see
    isDecomposable(CentralArrangement,Ring),
    -- whether a hyperplane
    arrangement decomposable in the sense of Papadima-Suciu
  * isDecomposable(CentralArrangement,Ring)
    -- whether a hyperplane
    arrangement decomposable in the sense of Papadima-Suciu
  * "lct(CentralArrangement)" -- see
    logCanonicalThreshold(CentralArrangement),
    -- compute the log-canonical
    threshold of an arrangement
  * logCanonicalThreshold(CentralArrangement)
    -- compute the log-canonical
    threshold of an arrangement
  * matroid(CentralArrangement) -- get
    the matroid of a central arrangement
  * "multIdeal(QQ,CentralArrangement)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "multIdeal(QQ,CentralArrangement,List)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "multIdeal(ZZ,CentralArrangement)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "multIdeal(ZZ,CentralArrangement,List)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "multiplierIdeal(QQ,CentralArrangement)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * multiplierIdeal(QQ,CentralArrangement,List)
    -- compute a
    multiplier ideal
  * "multiplierIdeal(ZZ,CentralArrangement)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "multiplierIdeal(ZZ,CentralArrangement,List)" -- see
    multiplierIdeal(QQ,CentralArrangement,List),
    -- compute a
    multiplier ideal
  * "orlikSolomon(CentralArrangement,PolynomialRing)" -- see
    orlikSolomon(Arrangement,PolynomialRing),
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * "orlikTerao(CentralArrangement)" -- see
    orlikTerao(CentralArrangement,PolynomialRing),
    -- compute the
    defining ideal for the Orlik-Terao algebra
  * orlikTerao(CentralArrangement,PolynomialRing)
    -- compute the
    defining ideal for the Orlik-Terao algebra
  * "orlikTerao(CentralArrangement,Symbol)" -- see
    orlikTerao(CentralArrangement,PolynomialRing),
    -- compute the
    defining ideal for the Orlik-Terao algebra
  * "poincare(CentralArrangement)" -- see poincare(Arrangement),
    -- compute the Poincaré polynomial of an
    arrangement
  * rank(CentralArrangement) -- compute
    the rank of a central hyperplane arrangement

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

The object CentralArrangement, is a type (Macaulay2Doc),
with ancestor classes Arrangement, <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

circuits(CentralArrangement) -- list the circuits of an arrangement
*******************************************************************

Synopsis
========

  * Function: circuits (Matroids),
  * Usage:
        circuits(A)
  * Inputs:
      * A, a central hyperplane arrangement,
        hyperplane arrangement
  * Outputs:
      * a list (Macaulay2Doc), a list of circuits of $A$, each one
        expressed as a list of indices

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

A circuit is a minimal dependent set. More precisely, let $f_0,\ldots,f_{n-1}$
be the polynomials defining the hyperplanes of $A$. A circuit of $A$ is a
subset $C\subseteq \{0,\ldots,n-1\}$ minimal among those for which $\{f_i :
i\in C\}$ is linearly dependent.

If $M$ is the matroid of $A$, then a
circuit of $A$ is the same as a circuit of $M$. In fact, circuits(A) is defined
as toList \ circuits matroid A.

+-----------------------------------------------------------------------------+
|i1 : A = typeA 3                                                             |
|                                                                             |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }                  |
|       1    2   1    3   1    4   2    3   2    4   3    4                   |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : circuits A                                                              |
|                                                                             |
|o2 = {{0, 1, 3}, {4, 0, 2}, {1, 2, 3, 4}, {5, 1, 2}, {0, 2, 3, 5}, {0, 1, 4, |
|     ------------------------------------------------------------------------|
|     5}, {4, 5, 3}}                                                          |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : circuits matroid A                                                      |
|                                                                             |
|o3 = {set {0, 1, 3}, set {0, 2, 4}, set {1, 2, 3, 4}, set {1, 2, 5}, set {0, |
|     ------------------------------------------------------------------------|
|     2, 3, 5}, set {0, 1, 4, 5}, set {3, 4, 5}}                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * flats(Arrangement) -- list the flats of
    an arrangement of a given rank
  * circuits(Matroid) (Matroids) -- circuits of matroid

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

  * circuits(CentralArrangement), --
    list the circuits of an arrangement

closure(Arrangement,List) -- closure operation in the intersection lattice
**************************************************************************

Synopsis
========

  * Function: closure (Matroids),
  * Usage:
        closure(A,L) or closure(A,I)
  * Inputs:
      * A, a hyperplane arrangement, hyperplane arrangement
      * L, a list (Macaulay2Doc), a list of indices of hyperplanes,
        or a linear ideal $I$ in the ring of ${\mathcal A}$
  * Outputs:
      * a flat in an hyperplane arrangement, the flat of least
        codimension containing the hyperplanes $L$, or the flat consisting of
        those hyperplanes of $\mathcal A$ whose defining forms are also in $I$

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

The closure of a set of indices $L$ consists of (indices of) all hyperplanes
that contain the intersection of the given ones.

Equivalently, the closure of $L$ consists of all hyperplanes whose defining
linear forms are in the span of the linear forms indexed by $L$.

+----------------------------------------------------------------------------+
|i1 : A = typeA 3                                                            |
|                                                                            |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }                 |
|       1    2   1    3   1    4   2    3   2    4   3    4                  |
|                                                                            |
|o1 : Hyperplane Arrangement                                                 |
+----------------------------------------------------------------------------+
|i2 : F = closure(A,{0,1})                                                   |
|                                                                            |
|o2 = {0, 1, 3}                                                              |
|                                                                            |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }         |
|               1    2   1    3   1    4   2    3   2    4   3    4          |
+----------------------------------------------------------------------------+
|i3 : A_F                                                                    |
|                                                                            |
|o3 = {x  - x , x  - x , x  - x }                                            |
|       1    2   1    3   2    3                                             |
|                                                                            |
|o3 : Hyperplane Arrangement                                                 |
+----------------------------------------------------------------------------+
|i4 : I = ideal((hyperplanes A)_{0,3}) -- one can also specify a linear ideal|
|                                                                            |
|o4 = ideal (x  - x , x  - x )                                               |
|             1    2   2    3                                                |
|                                                                            |
|o4 : Ideal of QQ[x ..x ]                                                    |
|                  1   4                                                     |
+----------------------------------------------------------------------------+
|i5 : assert (F == closure(A,I))                                             |
+----------------------------------------------------------------------------+

The closure of a linear ideal $I$ is the flat consisting of all the hyperplanes
in $\mathcal A$ whose defining forms are also in $I$.

See also
========

  * meet(Flat,Flat) -- compute the meet operation
    in the intersection lattice
  * vee(Flat,Flat) -- compute the vee operation in
    the intersection lattice
  * closure(Matroid,Set) (Matroids) -- closure of a subset of a
    matroid

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

  * "closure(Arrangement,Ideal)"
  * closure(Arrangement,List), --
    closure operation in the intersection lattice

coefficients(Arrangement) -- make a matrix from the coefficients of the defining equations
******************************************************************************************

Synopsis
========

  * Function: coefficients (Macaulay2Doc),
  * Usage:
        coefficients A
  * Inputs:
      * A, a hyperplane arrangement,
  * Optional inputs (Macaulay2Doc),:
      * Monomials (Macaulay2Doc), => a list (Macaulay2Doc),
        default value null, which is ignored
      * Variables (Macaulay2Doc), => a list (Macaulay2Doc),
        default value null, which is ignored
  * Outputs:
      * a matrix (Macaulay2Doc), whose entries are the
        coefficients of the defining equations

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

A hyperplane arrangement is defined by a list of affine-linear equations.  This
method creates a matrix whose rows correspond to variables in the
underlying ring, and whose columns correspond to the
defining equations.  The entries in this matrix are the coefficients of the
defining equations.

If the arrangement is affine (i.e. there are constant coefficients), the last
row of the output matrix is the constant coefficients.

A few reflection arrangements yield the following matrices.

+--------------------------------------+
|i1 : coefficients typeA 3             |
|                                      |
|o1 = | 1  1  1  0  0  0  |            |
|     | -1 0  0  1  1  0  |            |
|     | 0  -1 0  -1 0  1  |            |
|     | 0  0  -1 0  -1 -1 |            |
|                                      |
|              4        6              |
|o1 : Matrix QQ  <--- QQ               |
+--------------------------------------+
|i2 : coefficients typeB 2             |
|                                      |
|o2 = | 1 1  1 0 |                     |
|     | 0 -1 1 1 |                     |
|                                      |
|              2        4              |
|o2 : Matrix QQ  <--- QQ               |
+--------------------------------------+
|i3 : coefficients typeD 4             |
|                                      |
|o3 = | 1  1 1  1 1  1 0  0 0  0 0  0 ||
|     | -1 1 0  0 0  0 1  1 1  1 0  0 ||
|     | 0  0 -1 1 0  0 -1 1 0  0 1  1 ||
|     | 0  0 0  0 -1 1 0  0 -1 1 -1 1 ||
|                                      |
|              4        12             |
|o3 : Matrix QQ  <--- QQ               |
+--------------------------------------+

The coefficient ring need not be the rational numbers.

+-----------------------------------------------------------------------------+
|i4 : R = ZZ/101[x,y,z];                                                      |
+-----------------------------------------------------------------------------+
|i5 : A = arrangement("Pappus", R)                                            |
|                                                                             |
|o5 = {x, y, z, x - y, y - z, x - y - z, 2x + y + z, 2x + y - z, 2x - 5y + z} |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i6 : coefficients A                                                          |
|                                                                             |
|o6 = | 1 0 0 1  0  1  2 2  2  |                                              |
|     | 0 1 0 -1 1  -1 1 1  -5 |                                              |
|     | 0 0 1 0  -1 -1 1 -1 1  |                                              |
|                                                                             |
|              ZZ 3        ZZ 9                                               |
|o6 : Matrix (---)  <--- (---)                                                |
|             101         101                                                 |
+-----------------------------------------------------------------------------+
|i7 : H = arrangement("Hessian")                                              |
|                                                                             |
|o7 = {x , x , x , x  + x  + x , x  + x  + 6419x , x  + x  - 6420x , x  +     |
|       1   2   3   1    2    3   1    2        3   1    2        3   1       |
|                                                                             |
|o7 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|6419x  + x , x  + 6419x  + 6419x , x  + 6419x  - 6420x , x  - 6420x  + x , x |
|     2    3   1        2        3   1        2        3   1        2    3   1|
|-----------------------------------------------------------------------------|
|- 6420x  + 6419x , x  - 6420x  - 6420x }                                     |
|       2        3   1        2        3                                      |
+-----------------------------------------------------------------------------+
|i8 : coefficients H                                                          |
|                                                                             |
|o8 = | 1 0 0 1 1    1     1    1    1     1     1     1     |                |
|     | 0 1 0 1 1    1     6419 6419 6419  -6420 -6420 -6420 |                |
|     | 0 0 1 1 6419 -6420 1    6419 -6420 1     6419  -6420 |                |
|                                                                             |
|               ZZ  3         ZZ  12                                          |
|o8 : Matrix (-----)  <--- (-----)                                            |
|             31627         31627                                             |
+-----------------------------------------------------------------------------+

For non-central hyperplane arrangements, the last row of the coefficient matrix
records the constant terms.

+--------------------------------------------+
|i9 : B = arrangement(x*y*(x+y+1))           |
|                                            |
|o9 = {y, x, x + y + 1}                      |
|                                            |
|o9 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i10 : coefficients B                        |
|                                            |
|o10 = | 0 1 1 |                             |
|      | 1 0 1 |                             |
|      | 0 0 0 |                             |
|      | 0 0 1 |                             |
|                                            |
|               ZZ 4        ZZ 3             |
|o10 : Matrix (---)  <--- (---)              |
|              101         101               |
+--------------------------------------------+
|i11 : C = arrangement(x*y*z*(x+y+1)*(y+z-1))|
|                                            |
|o11 = {z, y, y + z - 1, x, x + y + 1}       |
|                                            |
|o11 : Hyperplane Arrangement                |
+--------------------------------------------+
|i12 : coefficients C                        |
|                                            |
|o12 = | 0 0 0  1 1 |                        |
|      | 0 1 1  0 1 |                        |
|      | 1 0 1  0 0 |                        |
|      | 0 0 -1 0 1 |                        |
|                                            |
|               ZZ 4        ZZ 5             |
|o12 : Matrix (---)  <--- (---)              |
|              101         101               |
+--------------------------------------------+

The trivial arrangement has no equations, so its this method returns the zero
matrix.

+-------------------------------------------------------+
|i13 : R = ZZ[x,y,z];                                   |
+-------------------------------------------------------+
|i14 : trivial = arrangement(map(R^(numgens R),R^0,0),R)|
|                                                       |
|o14 = {}                                               |
|                                                       |
|o14 : Hyperplane Arrangement                           |
+-------------------------------------------------------+
|i15 : coefficients trivial                             |
|                                                       |
|o15 = 0                                                |
|                                                       |
|               3                                       |
|o15 : Matrix ZZ  <--- 0                                |
+-------------------------------------------------------+
|i16 : assert(coefficients trivial == 0)                |
+-------------------------------------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement
  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement

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

  * coefficients(Arrangement) -- make a
    matrix from the coefficients of the defining equations

compress(Arrangement) -- extract nonzero equations
**************************************************

Synopsis
========

  * Function: compress (Macaulay2Doc),
  * Usage:
        compress A
  * Inputs:
      * A, a hyperplane arrangement,
  * Outputs:
      * a hyperplane arrangement, a loopless arrangement

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

An arrangement is loopless if none of its forms are identically 0. This method
returns the arrangement defined by the non-identically-zero forms of A.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                                           |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : A = dual arrangement {x,y,x-y,z} -- the last element of this arrangement|
|                                                                             |
|o2 = {-x , x , x , 0}                                                        |
|        1   1   1                                                            |
|                                                                             |
|o2 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|is 0                                                                         |
+-----------------------------------------------------------------------------+
|i3 : compress A                                                              |
|                                                                             |
|o3 = {-x , x , x }                                                           |
|        1   1   1                                                            |
|                                                                             |
|o3 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+

See also
========

  * trim(Arrangement) -- make a simple hyperplane
    arrangement

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

  * compress(Arrangement) -- extract nonzero
    equations

cone(Arrangement,RingElement) -- creates an associated central hyperplane arrangement
*************************************************************************************

Synopsis
========

  * Function: cone (Macaulay2Doc),
  * Usage:
        cone(A, x)
        cone(A, h)
  * Inputs:
      * A, a hyperplane arrangement,
      * x, a ring element (Macaulay2Doc), that is a variable
        in the ring of $A$, or a Symbol (Macaulay2Doc), that will
        become a variable in the ring of the new hyperplane arrangement
  * Outputs:
      * a central hyperplane arrangement,
        constructed by adding a linear hyperplane and homogenizing the given
        hyperplane equations with respect to it

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

For any hyperplane arrangement $A$, the cone of $A$ is an associated central
hyperplane arrangement constructed by adding a new hyperplane and homogenizing
the hyperplane equations in $A$ with respect to it.  By definition, the cone of
$A$ contains one more hyperplane that $A$.

When the underlying ring of the input arrangement $A$ has a variable not
appearing in the its linear equations, one can construct the cone over $A$
using that variable.

+-------------------------------------------------------+
|i1 : S = QQ[w,x,y,z];                                  |
+-------------------------------------------------------+
|i2 : A = arrangement{x, y, x-y, x-1, y-1}              |
|                                                       |
|o2 = {x, y, x - y, x - 1, y - 1}                       |
|                                                       |
|o2 : Hyperplane Arrangement                            |
+-------------------------------------------------------+
|i3 : assert not isCentral A                            |
+-------------------------------------------------------+
|i4 : cA = cone(A, z)                                   |
|                                                       |
|o4 = {x, y, x - y, x - z, y - z, z}                    |
|                                                       |
|o4 : Hyperplane Arrangement                            |
+-------------------------------------------------------+
|i5 : assert isCentral cA                               |
+-------------------------------------------------------+
|i6 : assert(# hyperplanes cA === 1 + # hyperplanes A)  |
+-------------------------------------------------------+
|i7 : assert(ring cA === ring A)                        |
+-------------------------------------------------------+
|i8 : deCone(cA, z)                                     |
|                                                       |
|o8 = {x, y, x - y, x - 1, y - 1}                       |
|                                                       |
|o8 : Hyperplane Arrangement                            |
+-------------------------------------------------------+
|i9 : cA' = cone(A, w)                                  |
|                                                       |
|o9 = {x, y, x - y, - w + x, - w + y, w}                |
|                                                       |
|o9 : Hyperplane Arrangement                            |
+-------------------------------------------------------+
|i10 : assert isCentral cA'                             |
+-------------------------------------------------------+
|i11 : assert(cA != cA')                                |
+-------------------------------------------------------+
|i12 : assert(# hyperplanes cA' === 1 + # hyperplanes A)|
+-------------------------------------------------------+

This method does not verify that the given RingElement (Macaulay2Doc),
produces a simple hyperplane arrangement.  Hence,
one gets unexpected output when the chosen variable already appears in the
linear equations for $A$.

+--------------------------------------------------------+
|i13 : cone(A, x)                                        |
|                                                        |
|o13 = {x, y, x - y, 0, - x + y, x}                      |
|                                                        |
|o13 : Hyperplane Arrangement                            |
+--------------------------------------------------------+
|i14 : cA'' = trim cone(A, x)                            |
|                                                        |
|o14 = {y, x, x - y}                                     |
|                                                        |
|o14 : Hyperplane Arrangement                            |
+--------------------------------------------------------+
|i15 : assert isCentral cA''                             |
+--------------------------------------------------------+
|i16 : assert(# hyperplanes cA'' =!= 1 + # hyperplanes A)|
+--------------------------------------------------------+

When the second input is a Symbol (Macaulay2Doc), this method
creates a new ring from the underlying ring of $A$ by adjoining the symbol as a
variable and constructs the cone in this new ring.

+-------------------------------------------------------+
|i17 : S = QQ[x,y];                                     |
+-------------------------------------------------------+
|i18 : A = arrangement{x, y, x-y, x-1, y-1}             |
|                                                       |
|o18 = {x, y, x - y, x - 1, y - 1}                      |
|                                                       |
|o18 : Hyperplane Arrangement                           |
+-------------------------------------------------------+
|i19 : assert not isCentral A                           |
+-------------------------------------------------------+
|i20 : cA = cone(A, symbol z)                           |
|                                                       |
|o20 = {x, y, x - y, x - z, y - z, z}                   |
|                                                       |
|o20 : Hyperplane Arrangement                           |
+-------------------------------------------------------+
|i21 : assert isCentral cA                              |
+-------------------------------------------------------+
|i22 : assert(# hyperplanes cA === 1 + # hyperplanes A) |
+-------------------------------------------------------+
|i23 : ring cA                                          |
|                                                       |
|o23 = QQ[x..z]                                         |
|                                                       |
|o23 : PolynomialRing                                   |
+-------------------------------------------------------+
|i24 : assert(ring cA =!= ring A)                       |
+-------------------------------------------------------+
|i25 : deCone(cA, 5)                                    |
|                                                       |
|o25 = {x, y, x - y, x - 1, y - 1}                      |
|                                                       |
|o25 : Hyperplane Arrangement                           |
+-------------------------------------------------------+
|i26 : assert not isCentral A                           |
+-------------------------------------------------------+
|i27 : cA' = cone(A, symbol w)                          |
|                                                       |
|o27 = {x, y, x - y, x - w, y - w, w}                   |
|                                                       |
|o27 : Hyperplane Arrangement                           |
+-------------------------------------------------------+
|i28 : assert isCentral cA'                             |
+-------------------------------------------------------+
|i29 : assert(# hyperplanes cA' === 1 + # hyperplanes A)|
+-------------------------------------------------------+
|i30 : ring cA'                                         |
|                                                       |
|o30 = QQ[x..y, w]                                      |
|                                                       |
|o30 : PolynomialRing                                   |
+-------------------------------------------------------+

See also
========

  * deCone -- produce an
    affine arrangement from a central one
  * isCentral -- test to see if a hyperplane
    arrangement is central
  * trim(Arrangement) -- make a simple hyperplane
    arrangement

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

  * cone(Arrangement,RingElement),
    -- creates an associated central hyperplane arrangement
  * "cone(Arrangement,Symbol)"

deCone(CentralArrangement,RingElement) -- produce an affine arrangement from a central one
******************************************************************************************

Synopsis
========

  * Function: deCone,
  * Usage:
        deCone(A, x)
        deCone(A, i)
  * Inputs:
      * A, a central hyperplane arrangement,
      * x, a ring element (Macaulay2Doc), a hyperplane of
        $A$ or the index of a hyperplane of $A$
  * Outputs:
      * a hyperplane arrangement, the decone of $A$ over
        $x$

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

The decone of a central arrangement, $A$ at a
hyperplane $H=H_i$ or $H=\ker x$ is the affine arrangement obtained from $A$ by
first deleting the hyperplane $H$ then intersecting the remaining hyperplanes
with the (affine) hyperplane $\{x=1\}$. In particular, if $R$ is the
coordinate ring, of $A$, then the coordinate ring of its
decone over $x$ is $R/(x-1)$.

The decone of a central arrangement, at $H$ can also
be constructed by first projectivizing $A$, then removing the image of $H$, and
identifying the complement of $H$ with affine space.

+--------------------------------------------+
|i1 : A = arrangement "X3"                   |
|                                            |
|o1 = {x , x , x , x  + x , x  + x , x  + x }|
|       1   2   3   1    2   1    3   2    3 |
|                                            |
|o1 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i2 : dA = deCone(A,2)                       |
|                                            |
|o2 = {x , x , x  + x , x  + 1, x  + 1}      |
|       1   2   1    2   1       2           |
|                                            |
|o2 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i3 : factor poincare A                      |
|                                            |
|                        2                   |
|o3 = (1 + T)(1 + 5T + 7T )                  |
|                                            |
|o3 : Expression of class Product            |
+--------------------------------------------+
|i4 : poincare dA                            |
|                                            |
|                2                           |
|o4 = 1 + 5T + 7T                            |
|                                            |
|o4 : ZZ[T]                                  |
+--------------------------------------------+

The coordinate ring of $dA$ is $\mathbb{Q}[x_1,x_2,x_3]/(x_3-1)$.

+-----------------+
|i5 : ring dA     |
|                 |
|     QQ[x ..x ]  |
|         1   3   |
|o5 = ----------  |
|       x  - 1    |
|        3        |
|                 |
|o5 : QuotientRing|
+-----------------+

Use prune, to get something whose coordinate ring
is a polynomial ring.

+--------------------------------------+
|i6 : dA' = prune dA                   |
|                                      |
|o6 = {x , x , x  + x , x  + 1, x  + 1}|
|       1   2   1    2   1       2     |
|                                      |
|o6 : Hyperplane Arrangement           |
+--------------------------------------+
|i7 : ring dA'                         |
|                                      |
|o7 = QQ[x ..x ]                       |
|         1   2                        |
|                                      |
|o7 : PolynomialRing                   |
+--------------------------------------+

See also
========

  * cone(Arrangement,RingElement),
    -- creates an associated central hyperplane arrangement

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

  * deCone(CentralArrangement,RingElement)
    -- produce an affine
    arrangement from a central one
  * "deCone(CentralArrangement,ZZ)"

deletion(Arrangement,RingElement) -- deletion of a subset of an arrangement
***************************************************************************

Synopsis
========

  * Function: deletion (Matroids),
  * Usage:
        deletion(A,x)
        deletion(A,S)
        deletion(A,i)
  * Inputs:
      * A, a hyperplane arrangement,
      * x, a ring element (Macaulay2Doc), alternatively, the
        second argument can be the index of a hyperplane, or a set or list of
        indices of hyperplanes
  * Outputs:
      * a hyperplane arrangement, obtained by deleting the
        linear form $x$, or the subset $S$, or the $i$th linear form

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

The deletion is obtained by removing hyperplanes from ${\mathcal A}$.

+--------------------------------------------+
|i1 : A = arrangement "braid"                |
|                                            |
|o1 = {x , x , x , x  - x , x  - x , x  - x }|
|       1   2   3   1    2   1    3   2    3 |
|                                            |
|o1 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i2 : deletion(A,5)                          |
|                                            |
|o2 = {x , x , x , x  - x , x  - x }         |
|       1   2   3   1    2   1    3          |
|                                            |
|o2 : Hyperplane Arrangement                 |
+--------------------------------------------+

You can also remove a hyperplane by specifiying its linear form.

+------------------------------+
|i3 : R = QQ[x,y]              |
|                              |
|o3 = R                        |
|                              |
|o3 : PolynomialRing           |
+------------------------------+
|i4 : A = arrangement {x,y,x-y}|
|                              |
|o4 = {x, y, x - y}            |
|                              |
|o4 : Hyperplane Arrangement   |
+------------------------------+
|i5 : deletion(A, x-y)         |
|                              |
|o5 = {x, y}                   |
|                              |
|o5 : Hyperplane Arrangement   |
+------------------------------+

If multiple linear forms define the same hyperplane $H$, deleting any one of
those forms does the same thing: it finds the first linear form in $\mathcal A$
defining $H$, then deletes that one.

+------------------------------------------+
|i6 : A = arrangement {x, x-y, y, x-y, y-x}|
|                                          |
|o6 = {x, x - y, y, x - y, - x + y}        |
|                                          |
|o6 : Hyperplane Arrangement               |
+------------------------------------------+
|i7 : A1 = deletion(A, x-y)                |
|                                          |
|o7 = {x, y, x - y, - x + y}               |
|                                          |
|o7 : Hyperplane Arrangement               |
+------------------------------------------+
|i8 : A2 = deletion(A, y-x)                |
|                                          |
|o8 = {x, y, x - y, - x + y}               |
|                                          |
|o8 : Hyperplane Arrangement               |
+------------------------------------------+
|i9 : A3 = deletion(A, 2*(x-y))            |
|                                          |
|o9 = {x, y, x - y, - x + y}               |
|                                          |
|o9 : Hyperplane Arrangement               |
+------------------------------------------+
|i10 : assert(A1 == A2)                    |
+------------------------------------------+
|i11 : assert(A2 == A3)                    |
+------------------------------------------+

See also
========

  * deletion(Matroid,List) (Matroids) -- deletion of subset of
    matroid

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

  * "deletion(Arrangement,List)"
  * deletion(Arrangement,RingElement)
    -- deletion of a subset of an
    arrangement
  * "deletion(Arrangement,Set)"
  * "deletion(Arrangement,ZZ)"

der(CentralArrangement,List) -- compute the module of logarithmic derivations
*****************************************************************************

Synopsis
========

  * Function: der,
  * Usage:
        der(A, m)
        der(A)
  * Inputs:
      * A, a central hyperplane arrangement, a
        central arrangement of hyperplanes
      * m, a list (Macaulay2Doc), an optional list of
        multiplicities, one for each hyperplane
  * Optional inputs (Macaulay2Doc),:
      * Strategy => a symbol (Macaulay2Doc), default value null,
        that specifies the algorithm.  If an arrangement has (squarefree)
        defining polynomial $Q$, then the logarithmic derivations are those
        derivations $D$ for which $D(Q)$ is in the ideal $(Q)$. The Popescu
        strategy assumes that the arrangement is simple and implements this
        definition.  By contrast, the default strategy treats all arrangements
        as multiarrangements.
  * Outputs:
      * a matrix (Macaulay2Doc), whose image is the module of
        logarithmic derivations corresponding to the (multi)arrangement
        ${\mathcal A}$; see below.

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

The module of logarithmic derivations of an arrangement defined over a ring $S$
is, by definition, the submodule of $S$-derivations $D$ with the property that
$D(f_i)$ is contained in the ideal generated by $f_i$, for each linear form
$f_i$ in the arrangement.

In this package, we grade derivations so that a constant coefficient derivation
(i.e. a derivation $D$ which takes linear forms to constants) has degree 0. In
the literature, this is often called polynomial degree.

More generally, if the linear form $f_i$ is given a positive integer
multiplicity $m_i$, then the logarithmic derivations are those $D$ with the
property that $D(f_i)$ is in the ideal $(f_i^{m_i})$ for each linear form
$f_i$. See Günter M. Ziegler, Multiarrangements of hyperplanes and their
freeness (see https://doi.org/10.1090/conm/090/1000610 ), in Singularities
(Iowa City, IA, 1986), 345-359, Contemp. Math., 90, Amer. Math. Soc.,
Providence, RI, 1989.

The $j$th column of the output matrix expresses the $j$th generator of the
derivation module in terms of its value on each linear form, in order.

+----------------------------------------+
|i1 : R = QQ[x,y,z];                     |
+----------------------------------------+
|i2 : der arrangement {x,y,z,x-y,x-z,y-z}|
|                                        |
|o2 = {1} | -1 0      0            |     |
|     {1} | -1 -x+y   0            |     |
|     {1} | -1 -x+z   -xy+xz+yz-z2 |     |
|     {1} | -1 y      0            |     |
|     {1} | -1 z      yz-z2        |     |
|     {1} | -1 -x+y+z xz-z2        |     |
|                                        |
|             6       3                  |
|o2 : Matrix R  <--- R                   |
+----------------------------------------+

This method is implemented in such a way that any derivations of degree 0 are
ignored.  Equivalently, the arrangement ${\mathcal A}$ is treated as if it were
essential: that is, the intersection of all the hyperplanes is the origin. So,
the rank of the matrix produced by der equals the rank,
of the arrangement. For instance, although the
$A_3$ arrangement, is not essential, der will
produce a rank 3 matrix.

+--------------------------------------------------+
|i3 : prune image der typeA(3)                     |
|                                                  |
|                 3                                |
|o3 = (QQ[x ..x ])                                 |
|          1   4                                   |
|                                                  |
|o3 : QQ[x ..x ]-module, free, degrees {1..3}      |
|         1   4                                    |
+--------------------------------------------------+
|i4 : prune image der typeB(4)                     |
|                                                  |
|                 4                                |
|o4 = (QQ[x ..x ])                                 |
|          1   4                                   |
|                                                  |
|o4 : QQ[x ..x ]-module, free, degrees {1, 3, 5, 7}|
|         1   4                                    |
+--------------------------------------------------+

A hyperplane arrangement ${\mathcal A}$ is free if the module of derivations is
a free $S$-module.  Not all arrangements are free.

+----------------------------------+
|i5 : R = QQ[x,y,z];               |
+----------------------------------+
|i6 : A = arrangement {x,y,z,x+y+z}|
|                                  |
|o6 = {x, y, z, x + y + z}         |
|                                  |
|o6 : Hyperplane Arrangement       |
+----------------------------------+
|i7 : der A                        |
|                                  |
|o7 = {1} | -1 0  0    0      |    |
|     {1} | -1 z  -z   -x-y-z |    |
|     {1} | -1 -y -x-z 0      |    |
|     {1} | -1 0  -z   -y     |    |
|                                  |
|             4       4            |
|o7 : Matrix R  <--- R             |
+----------------------------------+
|i8 : betti res prune image der A  |
|                                  |
|            0 1                   |
|o8 = total: 4 1                   |
|         1: 1 .                   |
|         2: 3 1                   |
|                                  |
|o8 : BettiTally                   |
+----------------------------------+

The Popescu strategy produces a different presentation of the module of
logarithm derivations. For instance, in the following example, the first three
rows of column 0 means that $x\frac{\partial}{\partial x} +
y\frac{\partial}{\partial y} + z\frac{\partial}{\partial z}$ is a logarithmic
derivation of $\mathcal A$, and the last row of column 0 means that applying
this derivation to $xyz(x+y+z)$ produces $4xyz(x+y+z)$.

+--------------------------------+
|i9 : der(A, Strategy => Popescu)|
|                                |
|o9 = {0} | x 0   0     |        |
|     {0} | y -yz yz    |        |
|     {0} | z yz  xz+z2 |        |
|     {1} | 4 y-z x+3z  |        |
|                                |
|             4       3          |
|o9 : Matrix R  <--- R           |
+--------------------------------+

If a list of multiplicities is not provided, the occurrences of each hyperplane
are counted:

+-------------------------------------------------------------------------+
|i10 : R = QQ[x,y]                                                        |
|                                                                         |
|o10 = R                                                                  |
|                                                                         |
|o10 : PolynomialRing                                                     |
+-------------------------------------------------------------------------+
|i11 : prune image der arrangement {x,y,x-y,y-x,y,2*x}   -- rank 2 => free|
|                                                                         |
|       2                                                                 |
|o11 = R                                                                  |
|                                                                         |
|o11 : R-module, free, degrees {2:3}                                      |
+-------------------------------------------------------------------------+
|i12 : prune image der(arrangement {x,y,x-y}, {2,2,2})  -- same           |
|                                                                         |
|       2                                                                 |
|o12 = R                                                                  |
|                                                                         |
|o12 : R-module, free, degrees {2:3}                                      |
+-------------------------------------------------------------------------+

See also
========

  * makeEssential(CentralArrangement)
    -- make an essential arrangement out
    of an arbitrary one

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

  * "der(CentralArrangement)"
  * der(CentralArrangement,List), --
    compute the module of logarithmic derivations

dual(CentralArrangement,Ring) -- the Gale dual of an arrangement
****************************************************************

Synopsis
========

  * Function: dual (Macaulay2Doc),
  * Usage:
        dual A or dual(A, R)
  * Inputs:
      * A, a central hyperplane arrangement,
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * a central hyperplane arrangement, the Gale
        dual of A, optionally over the polynomial ring R.

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

The dual of an arrangement of rank $r$ with $n$ hyperplanes is an arrangement
of rank $n-r$ with $n$ hyperplanes, given by a linear realization of the dual
matroid to that of ${\mathcal A}$. It is computed from a presentation of the
kernel of the coefficient matrix of ${\mathcal A}$.  If ${\mathcal A}$ is the
arrangement of a planar graph,
then the dual of ${\mathcal A}$ is the arrangement of the dual graph.

+--------------------------------------------------------------------+
|i1 : A = arrangement "X2"                                           |
|                                                                    |
|o1 = {x , x , x , x  - x , x  - x , x  + x , x  + x  - 2x }         |
|       1   2   3   2    3   1    3   1    2   1    2     3          |
|                                                                    |
|o1 : Hyperplane Arrangement                                         |
+--------------------------------------------------------------------+
|i2 : coefficients A                                                 |
|                                                                    |
|o2 = | 1 0 0 0  1  1 1  |                                           |
|     | 0 1 0 1  0  1 1  |                                           |
|     | 0 0 1 -1 -1 0 -2 |                                           |
|                                                                    |
|              3        7                                            |
|o2 : Matrix QQ  <--- QQ                                             |
+--------------------------------------------------------------------+
|i3 : A' = dual A                                                    |
|                                                                    |
|o3 = {- x  - x  - x , - x  - x  - x , x  + x  + 2x , x , x , x , x }|
|         2    3    4     1    3    4   1    2     4   1   2   3   4 |
|                                                                    |
|o3 : Hyperplane Arrangement                                         |
+--------------------------------------------------------------------+
|i4 : coefficients dual A                                            |
|                                                                    |
|o4 = | 0  -1 1 1 0 0 0 |                                            |
|     | -1 0  1 0 1 0 0 |                                            |
|     | -1 -1 0 0 0 1 0 |                                            |
|     | -1 -1 2 0 0 0 1 |                                            |
|                                                                    |
|              4        7                                            |
|o4 : Matrix QQ  <--- QQ                                             |
+--------------------------------------------------------------------+
|i5 : assert (dual matroid A == matroid dual A)                      |
+--------------------------------------------------------------------+

See also
========

  * HyperplaneArrangements -- manipulating hyperplane arrangements
  * coefficients(Arrangement) -- make a
    matrix from the coefficients of the defining equations
  * dual(Matroid) (Matroids) -- dual matroid

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

  * "dual(CentralArrangement)"
  * dual(CentralArrangement,Ring),
    -- the Gale dual of an arrangement

EPY(Arrangement,PolynomialRing) -- compute the Eisenbud-Popescu-Yuzvinsky module of an arrangement
**************************************************************************************************

Synopsis
========

  * Function: EPY,
  * Usage:
        EPY(A) or EPY(A,S) or EPY(I) or EPY(I,S)
  * Inputs:
      * A, a hyperplane arrangement, an arrangement of n
        hyperplanes, or I, an ideal of the exterior algebra, the quotient by
        which has a linear, injective resolution
      * S, a polynomial ring (Macaulay2Doc), an optional
        polynomial ring in $n$ variables
  * Outputs:
      * a module (Macaulay2Doc), the Eisenbud-Popescu-Yuzvinsky
        module (see below) of I, or if an arrangement is given, of its
        Orlik-Solomon ideal.

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

Let $\mathrm{OS}$ denote the Orlik-Solomon algebra,
of the arrangement ${\mathcal
A}$, regarded as a quotient of an exterior algebra $E$.  The module
$\mathrm{EPY}({\mathcal A})$ is, by definition, the $S$-module which is
BGG-dual to the linear, injective resolution of $\mathrm{OS}$ as an $E$-module.

Equivalently, $\mathrm{EPY}({\mathcal A})$ is the single nonzero cohomology
module in the Aomoto complex of ${\mathcal A}$.  For details, see D. Eisenbud,
S. Popescu, S. Yuzvinsky, "Hyperplane arrangement cohomology and monomials in
the exterior algebra", Trans. AMS 355 (2003) no 11, 4365-4383,
arXiv:math/9912212 (see https://arxiv.org/abs/math/9912212 ), as well as Sheaf
Algorithms Using the Exterior Algebra, by Wolfram Decker and David Eisenbud, in
Computations in algebraic geometry with Macaulay 2 (see
https://faculty.math.illinois.edu/Macaulay2/Book/ ), Algorithms and
Computations in Mathematics, Springer-Verlag, Berlin, 2001.

+-------------------------------------------------+
|i1 : R = QQ[x,y];                                |
+-------------------------------------------------+
|i2 : FA = EPY arrangement {x,y,x-y}              |
|                                                 |
|o2 = cokernel | -X_1 X_1+X_2+X_3 X_1     |       |
|              | X_2  0           X_1+X_3 |       |
|                                                 |
|                                                2|
|o2 : QQ[X ..X ]-module, quotient of (QQ[X ..X ]) |
|         1   3                           1   3   |
+-------------------------------------------------+
|i3 : betti res FA                                |
|                                                 |
|            0 1 2                                |
|o3 = total: 2 3 1                                |
|         0: 2 3 1                                |
|                                                 |
|o3 : BettiTally                                  |
+-------------------------------------------------+

A consequence of the theory is that $\mathrm{EPY}({\mathcal A})$ has a linear,
free resolution over the polynomial ring: namely, the Aomoto complex of
${\mathcal A}$. The Betti numbers in the resolution are, up to a suitable
shift, equal to the degrees of the graded pieces of $\mathrm{OS}({\mathcal
A})$.

+-------------------------------------------------+
|i4 : A = arrangement "prism"                     |
|                                                 |
|o4 = {x , x , x , x , x  + x  + x , x  + x  + x }|
|       1   2   3   4   1    2    4   1    3    4 |
|                                                 |
|o4 : Hyperplane Arrangement                      |
+-------------------------------------------------+
|i5 : reduceHilbert hilbertSeries orlikSolomon A  |
|                                                 |
|                 2      3     4                  |
|     1 + 6T + 15T  + 17T  + 7T                   |
|o5 = --------------------------                  |
|                  1                              |
|                                                 |
|o5 : Expression of class Divide                  |
+-------------------------------------------------+
|i6 : betti res EPY A                             |
|                                                 |
|            0  1  2 3 4                          |
|o6 = total: 7 17 15 6 1                          |
|         0: 7 17 15 6 1                          |
|                                                 |
|o6 : BettiTally                                  |
+-------------------------------------------------+

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

  * "EPY(Arrangement)"
  * EPY(Arrangement,PolynomialRing)
    -- compute the
    Eisenbud-Popescu-Yuzvinsky module of an arrangement
  * "EPY(Ideal)"
  * "EPY(Ideal,PolynomialRing)"

euler(CentralArrangement) -- compute the Euler characteristic of the projective complement
******************************************************************************************

Synopsis
========

  * Function: euler (Macaulay2Doc),
  * Usage:
        euler A
  * Inputs:
      * A, a central hyperplane arrangement, or a
        Flat,
  * Outputs:
      * an integer (Macaulay2Doc), equal to the Euler characteristic

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

For any topological space, the Euler characteristic is the alternating sum of
its Betti numbers (a.k.a. the ranks of its homology groups).  For a central
hyperplane arrangement, the associated topological space is the
projectivization of its complement.

The Euler characteristic for the hyperplane arrangements defined by root
systems are described by simple formulas.

+------------------------------------------------------------------+
|i1 : A2 = typeA 2                                                 |
|                                                                  |
|o1 = {x  - x , x  - x , x  - x }                                  |
|       1    2   1    3   2    3                                   |
|                                                                  |
|o1 : Hyperplane Arrangement                                       |
+------------------------------------------------------------------+
|i2 : euler A2                                                     |
|                                                                  |
|o2 = -1                                                           |
+------------------------------------------------------------------+
|i3 : assert all(5, n -> euler typeA (n+1) === (-1)^(n) * n!)      |
+------------------------------------------------------------------+
|i4 : B2 = typeB 2                                                 |
|                                                                  |
|o4 = {x , x  - x , x  + x , x }                                   |
|       1   1    2   1    2   2                                    |
|                                                                  |
|o4 : Hyperplane Arrangement                                       |
+------------------------------------------------------------------+
|i5 : euler B2                                                     |
|                                                                  |
|o5 = -2                                                           |
+------------------------------------------------------------------+
|i6 : assert all(4, n -> euler typeB (n+1) === (-1)^(n) * 2^n * n!)|
+------------------------------------------------------------------+

Given a flat, this method computes the Euler characteristic of the
subarrangement indexed by the flat.

+-----------------------------------------------------------------------------+
|i7 : A4 = typeA 4                                                            |
|                                                                             |
|o7 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x ,|
|       1    2   1    3   1    4   1    5   2    3   2    4   2    5   3    4 |
|                                                                             |
|o7 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x }                                                            |
| 3    5   4    5                                                             |
+-----------------------------------------------------------------------------+
|i8 : F = flat(A4, {0,7})                                                     |
|                                                                             |
|o8 = {0, 7}                                                                  |
|                                                                             |
|o8 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   2    3   2    4   2    5  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x }                                                   |
| 3    4   3    5   4    5                                                    |
+-----------------------------------------------------------------------------+
|i9 : euler F                                                                 |
|                                                                             |
|o9 = 0                                                                       |
+-----------------------------------------------------------------------------+
|i10 : assert(euler A4_F === euler F)                                         |
+-----------------------------------------------------------------------------+
|i11 : euler flat(A4, {2,3,9})                                                |
|                                                                             |
|o11 = -1                                                                     |
+-----------------------------------------------------------------------------+
|i12 : euler flat(A4, {0,1,2,4,5,7})                                          |
|                                                                             |
|o12 = 2                                                                      |
+-----------------------------------------------------------------------------+
|i13 : euler flat(A4, {2,4,6,8})                                              |
|                                                                             |
|o13 = 0                                                                      |
+-----------------------------------------------------------------------------+

The Euler characteristic of the empty arrangement is just the Euler
characteristic of the ambient projective space.  For instance, the Euler
characteristic of the complex projective plane is $3$.

+---------------------------------------------------+
|i14 : assert (euler arrangement({}, ring A2) === 3)|
+---------------------------------------------------+

See also
========

  * typeA -- make the hyperplane arrangement
    defined by a type $A_n$ root system
  * typeB -- make the hyperplane arrangement
    defined by a type $B_n$ root system
  * subArrangement -- create the
    hyperplane arrangement containing a flat
  * flat -- make a flat from a list of
    indices

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

  * euler(CentralArrangement) -- compute
    the Euler characteristic of the projective complement
  * "euler(Flat)"

eulerRestriction(CentralArrangement,List,ZZ) -- form the Euler restriction of a central multiarrangement
********************************************************************************************************

Synopsis
========

  * Function: eulerRestriction,
  * Usage:
        eulerRestriction(A, m, i)
  * Inputs:
      * A, a central hyperplane arrangement,
      * m, a list (Macaulay2Doc),
      * i, an integer (Macaulay2Doc),
  * Outputs:
      * a sequence (Macaulay2Doc), the Euler restriction of
        (A,m)

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

The Euler restriction of a multiarrangement (introduced by Abe, Terao, and
Wakefield in The Euler multiplicity and addition–deletion theorems for
multiarrangements (see https://doi.org/10.1112/jlms/jdm110 ), J. Lond. Math.
Soc. (2) 77 (2008), no. 2, 335348.) generalizes restriction,
to multiarrangements in such a way that
addition-deletion theorems hold.  The underlying simple arrangement of the
Euler restriction is simply the usual restriction; however, the multiplicities
are generally smaller than the naive ones.

If all of the multiplicities are $1$, the same is true of the Euler
restriction:

+----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                                          |
|                                                                            |
|o1 = R                                                                      |
|                                                                            |
|o1 : PolynomialRing                                                         |
+----------------------------------------------------------------------------+
|i2 : A = arrangement {x,y,z,x-y,x-z}                                        |
|                                                                            |
|o2 = {x, y, z, x - y, x - z}                                                |
|                                                                            |
|o2 : Hyperplane Arrangement                                                 |
+----------------------------------------------------------------------------+
|i3 : (A'',m'') = eulerRestriction(A,{1,1,1,1,1},1)                          |
|                                                                            |
|o3 = ({z, x, x - z}, {1, 1, 1})                                             |
|                                                                            |
|o3 : Sequence                                                               |
+----------------------------------------------------------------------------+
|i4 : restriction(A,1)                                                       |
|                                                                            |
|o4 = {x, z, x, x - z}                                                       |
|                                                                            |
|o4 : Hyperplane Arrangement                                                 |
+----------------------------------------------------------------------------+
|i5 : trim oo -- same underlying simple arrangement, different multiplicities|
|                                                                            |
|o5 = {z, x, x - z}                                                          |
|                                                                            |
|o5 : Hyperplane Arrangement                                                 |
+----------------------------------------------------------------------------+

If $({\mathcal A},m)$ is a free multiarrangement and so is $({\mathcal A},m')$,
where $m'$ is obtained from $m$ by lowering a single multiplicitity by one, the
Euler restriction is free as well, and the modules of logarithmic derivations,
form a short exact sequence.
See the paper of Abe, Terao and Wakefield for details.

+------------------------------------------+
|i6 : m = {2,2,2,2,1}; m' = {2,2,2,1,1};   |
+------------------------------------------+
|i8 : (A'',m'') = eulerRestriction(A,m,3)  |
|                                          |
|o8 = ({z, y, y - z}, {2, 3, 1})           |
|                                          |
|o8 : Sequence                             |
+------------------------------------------+
|i9 : prune image der(A,m)                 |
|                                          |
|      3                                   |
|o9 = R                                    |
|                                          |
|o9 : R-module, free, degrees {3:3}        |
+------------------------------------------+
|i10 : prune image der(A,m')               |
|                                          |
|       3                                  |
|o10 = R                                   |
|                                          |
|o10 : R-module, free, degrees {2..3, 3}   |
+------------------------------------------+
|i11 : prune image der(A'',m'')            |
|                                          |
|                2                         |
|o11 = (QQ[y..z])                          |
|                                          |
|o11 : QQ[y..z]-module, free, degrees {2:3}|
+------------------------------------------+

It may be the case that the Euler restriction is free, while the naive
restriction is not:

+------------------------------------------------------------------------+
|i12 : A = arrangement "bracelet";                                       |
+------------------------------------------------------------------------+
|i13 : (B,m) = eulerRestriction(A,{1,1,1,1,1,1,1,1,1},0)                 |
|                                                                        |
|o13 = ({x , x  + x , x , x , x  + x  + x , x  + x }, {1, 1, 1, 1, 1, 1})|
|         2   3    4   3   4   2    3    4   2    4                      |
|                                                                        |
|o13 : Sequence                                                          |
+------------------------------------------------------------------------+
|i14 : C = restriction(A,0)                                              |
|                                                                        |
|o14 = {x , x , x , x  + x , x  + x , x  + x , x  + x , x  + x  + x }    |
|        2   3   4   2    4   3    4   2    4   3    4   2    3    4     |
|                                                                        |
|o14 : Hyperplane Arrangement                                            |
+------------------------------------------------------------------------+
|i15 : assert(isFreeModule prune image der B) -- one is free             |
+------------------------------------------------------------------------+
|i16 : assert(not isFreeModule prune image der C) -- the other is not    |
+------------------------------------------------------------------------+

See also
========

  * restriction(Arrangement,ZZ), --
    construct the restriction a hyperplane arrangement to a subspace

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

  * eulerRestriction(CentralArrangement,List,ZZ)
    -- form the Euler
    restriction of a central multiarrangement

Flat -- intersection of hyperplanes
***********************************

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

A flat is a set of hyperplanes, maximal with respect to the property that they
contain a given subspace. In this package, flats are treated as lists of
indices of hyperplanes in the arrangement.

See also
========

  * flat(Arrangement,List) -- make a flat
    from a list of indices
  * flats(ZZ,Arrangement) -- list the flats
    of an arrangement of a given rank
  * flats(Arrangement) -- list the flats of
    an arrangement of a given rank

Functions and methods returning a flat in an hyperplane arrangement :
=====================================================================

  * "closure(Arrangement,Ideal)" -- see closure(Arrangement,List),
    -- closure operation in the intersection
    lattice
  * closure(Arrangement,List), --
    closure operation in the intersection lattice
  * flat(Arrangement,List) -- make a flat
    from a list of indices
  * "Flat ^ Flat" -- see meet(Flat,Flat), --
    compute the meet operation in the intersection lattice
  * meet(Flat,Flat) -- compute the meet operation
    in the intersection lattice
  * "Flat | Flat" -- see vee(Flat,Flat), -- compute
    the vee operation in the intersection lattice
  * vee(Flat,Flat) -- compute the vee operation in
    the intersection lattice

Methods that use a flat in an hyperplane arrangement :
======================================================

  * arrangement(Flat) -- get the hyperplane
    arrangement to which a flat belongs
  * "euler(Flat)" -- see euler(CentralArrangement),
    -- compute the Euler characteristic of the
    projective complement
  * Flat == Flat -- whether two flats are equal
  * rank(Flat) -- compute the rank of a flat
  * "Arrangement ^ Flat" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "restriction(Arrangement,Flat)" -- see
    restriction(Arrangement,Ideal), --
    construct the restriction a hyperplane arrangement to a subspace
  * "restriction(Flat)" -- see restriction(Arrangement,Ideal),
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * "Arrangement _ Flat" -- see subArrangement(Arrangement,Flat),
    -- create the hyperplane
    arrangement containing a flat
  * subArrangement(Arrangement,Flat)
    -- create the hyperplane
    arrangement containing a flat
  * "subArrangement(Flat)" -- see subArrangement(Arrangement,Flat),
    -- create the hyperplane
    arrangement containing a flat
  * toList(Flat) -- the indices of a flat

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

The object Flat, is a type (Macaulay2Doc), with
ancestor classes HashTable (Macaulay2Doc), < Thing (Macaulay2Doc).

Flat == Flat -- whether two flats are equal
*******************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        F == G
  * Inputs:
      * F, a flat in an hyperplane arrangement,
      * G, a flat in an hyperplane arrangement,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether or not F and G
        are equal

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

Two flats are equal if and only if they belong to the same arrangement,
and have the same hyperplanes.

See also
========

  * Arrangement == Arrangement -- whether
    two hyperplane arrangements are equal

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

  * Flat == Flat -- whether two flats are equal

flat(Arrangement,List) -- make a flat from a list of indices
************************************************************

Synopsis
========

  * Function: flat,
  * Usage:
        flat(A,L)
  * Inputs:
      * A, a hyperplane arrangement, hyperplane arrangement
      * L, a list (Macaulay2Doc), list of indices in flat
  * Optional inputs (Macaulay2Doc),:
      * Validate => a Boolean value (Macaulay2Doc), default
        value true, whether or not to check if $L$ is indeed a flat of $A$
        (default true)
  * Outputs:
      * a flat in an hyperplane arrangement, corresponding flat

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

With the option Validate => true (which is the case by default), flat(A,L)
checks to see whether $L$ is indeed the list of indices of a flat of $A$.

+----------------------------------------+
|i1 : A = typeA 2                        |
|                                        |
|o1 = {x  - x , x  - x , x  - x }        |
|       1    2   1    3   2    3         |
|                                        |
|o1 : Hyperplane Arrangement             |
+----------------------------------------+
|i2 : flat(A, {0,1,2})                   |
|                                        |
|o2 = {0, 1, 2}                          |
|                                        |
|o2 : Flat of {x  - x , x  - x , x  - x }|
|               1    2   1    3   2    3 |
+----------------------------------------+

See also
========

  * flats(ZZ,Arrangement) -- list the flats
    of an arrangement of a given rank
  * flats(Arrangement) -- list the flats of
    an arrangement of a given rank

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

  * flat(Arrangement,List) -- make a flat
    from a list of indices

flats(ZZ,Arrangement) -- list the flats of an arrangement of a given rank
*************************************************************************

Synopsis
========

  * Function: flats (Matroids),
  * Usage:
        flats(n,A)
  * Inputs:
      * n, an integer (Macaulay2Doc), rank
      * A, a hyperplane arrangement, hyperplane arrangement
  * Outputs:
      * a list (Macaulay2Doc), a list of flats, of rank
        $n$

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

If $A$ is a CentralArrangement, the flats are
computed using the flats (Matroids), method from the
Matroids, package. Otherwise, $A$ is computed using the
Orlik--Solomon algebra.

+-------------------------------------------------------------------------+
|i1 : A = typeA(3)                                                        |
|                                                                         |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }              |
|       1    2   1    3   1    4   2    3   2    4   3    4               |
|                                                                         |
|o1 : Hyperplane Arrangement                                              |
+-------------------------------------------------------------------------+
|i2 : flats(2,A)                                                          |
|                                                                         |
|o2 = {{3, 4, 5}, {1, 2, 5}, {0, 5}, {0, 2, 4}, {1, 4}, {2, 3}, {0, 1, 3}}|
|                                                                         |
|o2 : List                                                                |
+-------------------------------------------------------------------------+

If the rank is omitted, the flats, of each rank are listed.

+-----------------------------------------------------------------------------+
|i3 : flats A                                                                 |
|                                                                             |
|o3 = {{{}}, {{5}, {4}, {3}, {2}, {1}, {0}}, {{3, 4, 5}, {1, 2, 5}, {0, 5},   |
|     ------------------------------------------------------------------------|
|     {0, 2, 4}, {1, 4}, {2, 3}, {0, 1, 3}}, {{0, 1, 2, 3, 4, 5}}}            |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * circuits(CentralArrangement), --
    list the circuits of an arrangement
  * flats(Matroid) (Matroids) -- flats of a matroid

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

  * "flats(Arrangement)"
  * flats(ZZ,Arrangement) -- list the flats
    of an arrangement of a given rank
  * "flats(ZZ,CentralArrangement)"

genericArrangement(ZZ,ZZ,Ring) -- realize the uniform matroid using points on the monomial curve
************************************************************************************************

Synopsis
========

  * Function: genericArrangement,
  * Usage:
        genericArrangement(r,n,K)
        genericArrangement(r,n)
  * Inputs:
      * r, an integer (Macaulay2Doc), the rank of the arrangement
      * n, an integer (Macaulay2Doc), the number of hyperplanes
      * K, a ring (Macaulay2Doc), a coefficient ring: $\QQ$ by
        default
  * Outputs:
      * a hyperplane arrangement, the arrangement with
        linear forms normal to $(1,j,j^2,\cdots,j^{r-1})$, for $1\leq j\leq n$.

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

By definition, a generic arrangement is a realization of a uniform matroid
$U_{r,n}$, which is characterized by the property that all subsets of the
ground set of size at most $r$ are independent. Points on the monomial curve
have this property.

+----------------------------------------+
|i1 : poincare genericArrangement(3,5,QQ)|
|                                        |
|                 2     3                |
|o1 = 1 + 5T + 10T  + 6T                 |
|                                        |
|o1 : ZZ[T]                              |
+----------------------------------------+

See also
========

  * randomArrangement,
    -- generate an arrangement at random

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

  * "genericArrangement(ZZ,ZZ)"
  * genericArrangement(ZZ,ZZ,Ring)
    -- realize the uniform matroid
    using points on the monomial curve

graphic(List,List,PolynomialRing) -- make a graphic arrangement
***************************************************************

Synopsis
========

  * Function: graphic,
  * Usage:
        graphic(E, V, R)
        graphic(E, R)
        graphic(E, V)
        graphic E
  * Inputs:
      * E, a list (Macaulay2Doc), the edges of a graph expressed as
        a list of pairs of vertices as specified in $V$
      * V, a list (Macaulay2Doc), the vertices of a graph expressed
        as a list of elements
      * R, a polynomial ring (Macaulay2Doc), an optional
        coordinate ring for the arrangement or a ring (Macaulay2Doc),
        to be interpreted as a coefficient ring
  * Outputs:
      * a hyperplane arrangement, associated to the given
        graph

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

A graph $G$ is specified by a list $V$ of vertices and a list $E$ of pairs of
vertices.  When $V$ is not specified, it is assumed to be the list $1, 2,
\ldots, n$, where $n$ is the largest integer appearing as a vertex of $E$. The
graphic arrangement $A(G)$ of $G$ is the subarrangement of the type $A_{n-1}$ arrangement,
with hyperplanes $x_i-x_j$ for
each edge $\{i,j\}$ of the graph $G$.

+-----------------------------------------------------------------+
|i1 : G = {{1,2},{2,3},{3,4},{4,1}}; -- a four-cycle              |
+-----------------------------------------------------------------+
|i2 : AG = graphic G                                              |
|                                                                 |
|o2 = {- x  + x , - x  + x , - x  + x , x  - x }                  |
|         1    2     2    3     3    4   1    4                   |
|                                                                 |
|o2 : Hyperplane Arrangement                                      |
+-----------------------------------------------------------------+
|i3 : rank AG -- the number of vertices minus number of components|
|                                                                 |
|o3 = 3                                                           |
+-----------------------------------------------------------------+
|i4 : ring AG                                                     |
|                                                                 |
|o4 = QQ[x ..x ]                                                  |
|         1   4                                                   |
|                                                                 |
|o4 : PolynomialRing                                              |
+-----------------------------------------------------------------+

One can also specify the ambient ring.

+-----------------------------------------------------------------------------+
|i5 : AG' = graphic(G,QQ[x,y,z,w]) -- four variables because there are 4      |
|                                                                             |
|o5 = {- x + y, - y + z, - z + w, x - w}                                      |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|vertices                                                                     |
+-----------------------------------------------------------------------------+
|i6 : ring AG'                                                                |
|                                                                             |
|o6 = QQ[x..z, w]                                                             |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+

Occasionally, one might want to give labels to the vertices. These labels can
be anything!

+-------------------------------------------------------+
|i7 : V = {"a", "b", "c", "d"};                         |
+-------------------------------------------------------+
|i8 : E = {{"a","b"}, {"b", "c"}, {"c","d"}, {"d","a"}};|
+-------------------------------------------------------+
|i9 : graphic(E, V)                                     |
|                                                       |
|o9 = {- x  + x , - x  + x , - x  + x , x  - x }        |
|         1    2     2    3     3    4   1    4         |
|                                                       |
|o9 : Hyperplane Arrangement                            |
+-------------------------------------------------------+

The vertices can also be the variables of a polynomial ring.

+---------------------------------------------------------+
|i10 : R = QQ[a,b,c,d];                                   |
+---------------------------------------------------------+
|i11 : arr = graphic({{a,b},{b,c},{c,d},{d,a}}, gens R, R)|
|                                                         |
|o11 = {- a + b, - b + c, - c + d, a - d}                 |
|                                                         |
|o11 : Hyperplane Arrangement                             |
+---------------------------------------------------------+
|i12 : ring arr === R                                     |
|                                                         |
|o12 = true                                               |
+---------------------------------------------------------+

Loops and parallel edges are allowed.

+-----------------------------+
|i13 : graphic({{1,2}, {1,2}})|
|                             |
|o13 = {- x  + x , - x  + x } |
|          1    2     1    2  |
|                             |
|o13 : Hyperplane Arrangement |
+-----------------------------+
|i14 : graphic({{1,1}, {1,2}})|
|                             |
|o14 = {0, - x  + x }         |
|             1    2          |
|                             |
|o14 : Hyperplane Arrangement |
+-----------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement
  * typeA -- make the hyperplane arrangement
    defined by a type $A_n$ root system
  * rank(CentralArrangement) -- compute
    the rank of a central hyperplane arrangement

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

  * "graphic(List)"
  * "graphic(List,List)"
  * graphic(List,List,PolynomialRing)
    -- make a graphic arrangement
  * "graphic(List,List,Ring)"
  * "graphic(List,PolynomialRing)"
  * "graphic(List,Ring)"

hyperplanes(Arrangement) -- the defining linear forms of an arrangement
***********************************************************************

Synopsis
========

  * Function: hyperplanes (Polyhedra),
  * Usage:
        hyperplanes A
        toList A
  * Inputs:
      * A, a hyperplane arrangement,
  * Outputs:
      * a list (Macaulay2Doc), the list of linear forms defining
        $A$.

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

This returns the list of linear forms defining an arrangement. These forms will
be elements of the coordinate ring, of $A$.

+-----------------------------------------------------------+
|i1 : A = typeA 3                                           |
|                                                           |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|       1    2   1    3   1    4   2    3   2    4   3    4 |
|                                                           |
|o1 : Hyperplane Arrangement                                |
+-----------------------------------------------------------+
|i2 : hyperplanes A                                         |
|                                                           |
|o2 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|       1    2   1    3   1    4   2    3   2    4   3    4 |
|                                                           |
|o2 : List                                                  |
+-----------------------------------------------------------+

See also
========

  * matrix(Arrangement) -- make a matrix from
    the defining equations
  * coefficients(Arrangement) -- make a
    matrix from the coefficients of the defining equations

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

  * hyperplanes(Arrangement) -- the
    defining linear forms of an arrangement

isCentral(Arrangement) -- test to see if a hyperplane arrangement is central
****************************************************************************

Synopsis
========

  * Function: isCentral,
  * Usage:
        isCentral A
  * Inputs:
      * A, a hyperplane arrangement,
  * Outputs:
      * a Boolean value (Macaulay2Doc), true if A is central

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

Some methods only apply to arrangements a central hyperplane arrangement,
so it is useful to be able to check.

+------------------------------------+
|i1 : S = QQ[x,y];                   |
+------------------------------------+
|i2 : isCentral arrangement {x,y,x-1}|
|                                    |
|o2 = false                          |
+------------------------------------+

See also
========

  * CentralArrangement -- the class of all central
    hyperplane arrangements

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

  * isCentral(Arrangement) -- test to see if
    a hyperplane arrangement is central

isDecomposable(CentralArrangement,Ring) -- whether a hyperplane arrangement decomposable in the sense of Papadima-Suciu
***********************************************************************************************************************

Synopsis
========

  * Function: isDecomposable,
  * Usage:
        isDecomposable(A, R)
        isDecomposable A
  * Inputs:
      * A, a central hyperplane arrangement,
      * R, a ring (Macaulay2Doc), an optional coefficient ring used
        as the coefficient field for the holonomy Lie algebra.  If unspecified,
        R=QQ
  * Outputs:
      * a Boolean value (Macaulay2Doc), that is true (Macaulay2Doc),
        if the hyperplane arrangement decomposes in the
        sense of Papadima and Suciu over the given coefficient field

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

Following Definition 2.3 in Stefan Papadima and Alexander I. Suciu's paper
"When does the associated graded Lie algebra of an arrangement group
decompose?", Commentarii Mathematici Helvetici (2006) 859-875,
arXiv:math/0309324 (see https://arxiv.org/abs/math/0309324 ), a hyperplane
arrangement is decomposable if the derived subalgebra of its holonomy Lie
algebra is a direct sum of the derived subalgebras of free Lie algebras,
indexed by the rank-2 flats, of the arrangement.

As described in the introduction of Papadima-Suciu, the X3 arrangement is
decomposable.  The hyperplane arrangement defined by a type $A_3$ root system
is not decomposable.  The authors show that a graphic arrangement,
is decomposable over ${\mathbb Q}$
if and only if it is decomposable over any other field.  In general, it is not
known if there exist arrangements for which property of being decomposable
depends on the choice of field.

+--------------------------------------------+
|i1 : X3 = arrangement "X3"                  |
|                                            |
|o1 = {x , x , x , x  + x , x  + x , x  + x }|
|       1   2   3   1    2   1    3   2    3 |
|                                            |
|o1 : Hyperplane Arrangement                 |
+--------------------------------------------+
|i2 : assert isDecomposable X3               |
+--------------------------------------------+
|i3 : assert isDecomposable(X3, ZZ/5)        |
+--------------------------------------------+
|i4 : assert not isDecomposable typeA 3      |
+--------------------------------------------+

See also
========

  * Flat -- intersection of hyperplanes
  * orlikSolomon, --
    compute the defining ideal for the Orlik-Solomon algebra

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

  * "isDecomposable(CentralArrangement)"
  * isDecomposable(CentralArrangement,Ring)
    -- whether a hyperplane
    arrangement decomposable in the sense of Papadima-Suciu

logCanonicalThreshold(CentralArrangement) -- compute the log-canonical threshold of an arrangement
**************************************************************************************************

Synopsis
========

  * Function: logCanonicalThreshold,
  * Usage:
        logCanonicalThreshold(A)
        lct(A)
  * Inputs:
      * A, a central hyperplane arrangement, a
        central hyperplane arrangement
  * Outputs:
      * a rational number (Macaulay2Doc), the log-canonical threshold
        of $A$

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

The log-canonical threshold of $A$ defined by a polynomial $f$ is the least
number $c$ for which the multiplier ideal,
$J(f^c)$ is nontrivial.

Let's consider Example 6.3 of Berkesch and Leykin from arXiv:1002.1475v2:

+------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                          |
|                                                            |
|o1 = R                                                      |
|                                                            |
|o1 : PolynomialRing                                         |
+------------------------------------------------------------+
|i2 : A = arrangement ((x^2 - y^2)*(x^2 - z^2)*(y^2 - z^2)*z)|
|                                                            |
|o2 = {z, y - z, y + z, x - z, x + z, x - y, x + y}          |
|                                                            |
|o2 : Hyperplane Arrangement                                 |
+------------------------------------------------------------+
|i3 : logCanonicalThreshold A                                |
|                                                            |
|     3                                                      |
|o3 = -                                                      |
|     7                                                      |
|                                                            |
|o3 : QQ                                                     |
+------------------------------------------------------------+

Note that $A$ is allowed to be a multiarrangement.

See also
========

  * multiplierIdeal,
    -- compute a multiplier ideal

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

  * logCanonicalThreshold(CentralArrangement)
    -- compute the log-canonical
    threshold of an arrangement

makeEssential(CentralArrangement) -- make an essential arrangement out of an arbitrary one
******************************************************************************************

Synopsis
========

  * Function: makeEssential,
  * Usage:
        makeEssential A
  * Inputs:
      * A, a central hyperplane arrangement,
  * Outputs:
      * a central hyperplane arrangement, a
        combinatorially equivalent essential arrangement

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

A central arrangement, is essential if the
intersection of all of the hyperplanes equals the origin.  If ${\mathcal A}$ is
a hyperplane arrangement in an affine space $V$ and $L$ is the intersection of
all of the hyperplanes, then the image of the hyperplanes of ${\mathcal A}$ in
$V/L$ gives an equivalent essential arrangement.

Since this essentialization is defined over a subring of the underlying ring,
of ${\mathcal A}$, it cannot be implemented
directly.  Instead, the method chooses a splitting of the quotient $V\to V/L$
and returns an arrangement over a polynomial ring on a subset of the original
variables.

If ${\mathcal A}$ is already essential, then the method returns the same
arrangement.

Deleting a hyperplane from an essential arrangement yields an essential
arrangement only if the hyperplane was not a coloop.

+----------------------------------+
|i1 : R = QQ[x, y, z];             |
+----------------------------------+
|i2 : A = arrangement{x, y, x-y, z}|
|                                  |
|o2 = {x, y, x - y, z}             |
|                                  |
|o2 : Hyperplane Arrangement       |
+----------------------------------+
|i3 : makeEssential A              |
|                                  |
|o3 = {x, y, x - y, z}             |
|                                  |
|o3 : Hyperplane Arrangement       |
+----------------------------------+
|i4 : assert(A == makeEssential A) |
+----------------------------------+
|i5 : A' = deletion(A, z)          |
|                                  |
|o5 = {x, y, x - y}                |
|                                  |
|o5 : Hyperplane Arrangement       |
+----------------------------------+
|i6 : ring A'                      |
|                                  |
|o6 = R                            |
|                                  |
|o6 : PolynomialRing               |
+----------------------------------+
|i7 : makeEssential A'             |
|                                  |
|o7 = {x + y, x, y}                |
|                                  |
|o7 : Hyperplane Arrangement       |
+----------------------------------+
|i8 : ring makeEssential A'        |
|                                  |
|o8 = QQ[x..y]                     |
|                                  |
|o8 : PolynomialRing               |
+----------------------------------+

Type-$A$ reflection arrangements are not essential.

+-----------------------------------------------------------+
|i9 : A = typeA 3                                           |
|                                                           |
|o9 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|       1    2   1    3   1    4   2    3   2    4   3    4 |
|                                                           |
|o9 : Hyperplane Arrangement                                |
+-----------------------------------------------------------+
|i10 : ring A                                               |
|                                                           |
|o10 = QQ[x ..x ]                                           |
|          1   4                                            |
|                                                           |
|o10 : PolynomialRing                                       |
+-----------------------------------------------------------+
|i11 : A' = makeEssential A                                 |
|                                                           |
|o11 = {x  - x , x  - x , x , x  - x , x , x }              |
|        1    2   1    3   1   2    3   2   3               |
|                                                           |
|o11 : Hyperplane Arrangement                               |
+-----------------------------------------------------------+
|i12 : ring A'                                              |
|                                                           |
|o12 = QQ[x ..x ]                                           |
|          1   3                                            |
|                                                           |
|o12 : PolynomialRing                                       |
+-----------------------------------------------------------+

Type-$B$ reflection arrangements are essential.

+------------------------------------------------------------------------+
|i13 : B = typeB 3                                                       |
|                                                                        |
|o13 = {x , x  - x , x  + x , x  - x , x  + x , x , x  - x , x  + x , x }|
|        1   1    2   1    2   1    3   1    3   2   2    3   2    3   3 |
|                                                                        |
|o13 : Hyperplane Arrangement                                            |
+------------------------------------------------------------------------+
|i14 : assert(B == makeEssential B)                                      |
+------------------------------------------------------------------------+

See also
========

  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement
  * trim(Arrangement) -- make a simple hyperplane
    arrangement
  * prune(Arrangement) -- makes a new hyperplane
    arrangement in a polynomial ring

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

  * makeEssential(CentralArrangement)
    -- make an essential arrangement out
    of an arbitrary one

matrix(Arrangement) -- make a matrix from the defining equations
****************************************************************

Synopsis
========

  * Function: matrix (Macaulay2Doc),
  * Usage:
        matrix A
  * Inputs:
      * A, a hyperplane arrangement,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value
        null, this optional input is ignored by this function
  * Outputs:
      * a matrix (Macaulay2Doc), having one row, whose entries
        are the defining equations

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

A hyperplane arrangement is defined by a list of affine-linear equations.  This
methods creates a matrix, over the underlying ring,
of the hyperplane arrangement, whose entries are the
defining equations.

A few reflection arrangements yield the following matrices.

+-----------------------------------------------------------------------------+
|i1 : A = typeA 3                                                             |
|                                                                             |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }                  |
|       1    2   1    3   1    4   2    3   2    4   3    4                   |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : R = ring A                                                              |
|                                                                             |
|o2 = R                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : matrix A                                                                |
|                                                                             |
|o3 = | x_1-x_2 x_1-x_3 x_1-x_4 x_2-x_3 x_2-x_4 x_3-x_4 |                     |
|                                                                             |
|             1       6                                                       |
|o3 : Matrix R  <--- R                                                        |
+-----------------------------------------------------------------------------+
|i4 : matrix typeB 2                                                          |
|                                                                             |
|o4 = | x_1 x_1-x_2 x_1+x_2 x_2 |                                             |
|                                                                             |
|                        1                  4                                 |
|o4 : Matrix (QQ[x ..x ])  <--- (QQ[x ..x ])                                  |
|                 1   2              1   2                                    |
+-----------------------------------------------------------------------------+
|i5 : matrix typeD 4                                                          |
|                                                                             |
|o5 = | x_1-x_2 x_1+x_2 x_1-x_3 x_1+x_3 x_1-x_4 x_1+x_4 x_2-x_3 x_2+x_3       |
|     ------------------------------------------------------------------------|
|     x_2-x_4 x_2+x_4 x_3-x_4 x_3+x_4 |                                       |
|                                                                             |
|                        1                  12                                |
|o5 : Matrix (QQ[x ..x ])  <--- (QQ[x ..x ])                                  |
|                 1   4              1   4                                    |
+-----------------------------------------------------------------------------+

The trivial arrangement has no equations.

+--------------------------------+
|i6 : trivial = arrangement({},R)|
|                                |
|o6 = {}                         |
|                                |
|o6 : Hyperplane Arrangement     |
+--------------------------------+
|i7 : matrix trivial             |
|                                |
|o7 = 0                          |
|                                |
|             1                  |
|o7 : Matrix R  <--- 0           |
+--------------------------------+
|i8 : assert(matrix trivial == 0)|
+--------------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement
  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement

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

  * matrix(Arrangement) -- make a matrix from
    the defining equations

matroid(CentralArrangement) -- get the matroid of a central arrangement
***********************************************************************

Synopsis
========

  * Function: matroid (Matroids),
  * Usage:
        matroid arr
  * Inputs:
      * arr, a central hyperplane arrangement,
  * Optional inputs (Macaulay2Doc),:
      * EntryMode (Matroids),
        => ..., default value "bases", null
      * Loops (Matroids), => ..., default value {}, null
      * ParallelEdges (Matroids), => ..., default value {}, null
  * Outputs:
      * a matroid (Matroids), the matroid of arr

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

This computes the a matroid (Matroids), of the given arrangement,
which by definition is the matroid defined by the coefficient matrix,
of the arrangement.

+-------------------------------------------+
|i1 : A = matrix{{1,1,0},{-1,0,1},{0,-1,-1}}|
|                                           |
|o1 = | 1  1  0  |                          |
|     | -1 0  1  |                          |
|     | 0  -1 -1 |                          |
|                                           |
|              3        3                   |
|o1 : Matrix ZZ  <--- ZZ                    |
+-------------------------------------------+
|i2 : arr = arrangement A                   |
|                                           |
|o2 = {x  - x , x  - x , x  - x }           |
|       1    2   1    3   2    3            |
|                                           |
|o2 : Hyperplane Arrangement                |
+-------------------------------------------+
|i3 : matroid arr                           |
|                                           |
|o3 = a "matroid" of rank 2 on 3 elements   |
|                                           |
|o3 : Matroid                               |
+-------------------------------------------+

See also
========

  * matroid(Matrix) (Matroids) -- constructs a matroid

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

  * matroid(CentralArrangement) -- get
    the matroid of a central arrangement

meet(Flat,Flat) -- compute the meet operation in the intersection lattice
*************************************************************************

Synopsis
========

  * Function: meet,
  * Usage:
        meet(F, G)
        F ^ G
  * Inputs:
      * F, a flat in an hyperplane arrangement,
      * G, a flat in an hyperplane arrangement, in the same
        arrangment as $F$
  * Outputs:
      * a flat in an hyperplane arrangement, having the greatest
        codimension among those contained in both $F$ and $G$

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

In the geometric lattice of flats, the meet (also known as the infimum or
greatest lower bound) is the intersection of the flats. Equivalently,
identifying flats with subspaces, this operation is the Minkowski sum of the
subspaces.

The meet operation is commutative, associative, and idempotent.

+-----------------------------------------------------------------------------+
|i1 : A = typeA 6;                                                            |
+-----------------------------------------------------------------------------+
|i2 : F = flat(A, {0, 1, 6, 15, 20})                                          |
|                                                                             |
|o2 = {0, 1, 6, 15, 20}                                                       |
|                                                                             |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i3 : G = flat(A, {0, 1, 2, 6, 7, 11})                                        |
|                                                                             |
|o3 = {0, 1, 2, 6, 7, 11}                                                     |
|                                                                             |
|o3 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i4 : H = flat(A, {0, 1, 2, 3, 6, 7, 8, 11, 12, 15})                          |
|                                                                             |
|o4 = {0, 1, 2, 3, 6, 7, 8, 11, 12, 15}                                       |
|                                                                             |
|o4 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i5 : F ^ G                                                                   |
|                                                                             |
|o5 = {0, 1, 6}                                                               |
|                                                                             |
|o5 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i6 : G ^ H                                                                   |
|                                                                             |
|o6 = {0, 1, 2, 6, 7, 11}                                                     |
|                                                                             |
|o6 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i7 : F ^ H                                                                   |
|                                                                             |
|o7 = {0, 1, 6, 15}                                                           |
|                                                                             |
|o7 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i8 : assert(meet(F, G) === F ^ G)                                            |
+-----------------------------------------------------------------------------+
|i9 : assert(F ^ G === G ^ F)                                                 |
+-----------------------------------------------------------------------------+
|i10 : assert((F ^ G) ^ H === F ^ (G ^ H))                                    |
+-----------------------------------------------------------------------------+
|i11 : assert(G ^ G === G)                                                    |
+-----------------------------------------------------------------------------+

The rank function is also semimodular.

+----------------------------------------------------------+
|i12 : assert(rank F + rank G >= rank(F ^ G) + rank(F | G))|
+----------------------------------------------------------+
|i13 : assert(rank F + rank H >= rank(F ^ H) + rank(F | H))|
+----------------------------------------------------------+
|i14 : assert(rank H + rank G >= rank(H ^ G) + rank(H | G))|
+----------------------------------------------------------+

See also
========

  * rank(Flat) -- compute the rank of a flat
  * vee(Flat,Flat) -- compute the vee operation in
    the intersection lattice

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

  * meet(Flat,Flat) -- compute the meet operation
    in the intersection lattice

multiplierIdeal(QQ,CentralArrangement,List) -- compute a multiplier ideal
*************************************************************************

Synopsis
========

  * Function: multiplierIdeal,
  * Usage:
        multiplierIdeal(s,A,m)
        multiplierIdeal(s,A)
        multIdeal(s,A,m)
        multIdeal(s,A)
  * Inputs:
      * s, a rational number (Macaulay2Doc), a rational number
      * A, a central hyperplane arrangement, a
        central hyperplane arrangement
      * m, a list (Macaulay2Doc), an optional list of positive
        integer multiplicities
  * Outputs:
      * an ideal (Macaulay2Doc), the multiplier ideal of the
        arrangement at the value $s$

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

The multiplier ideals of an given ideal depend on a nonnegative real parameter.
This method computes the multiplier ideals of the defining ideal of a
hyperplane arrangement, optionally with multiplicities $m$. This uses the
explicit formula of M. Mustata [TAMS 358 (2006), no 11, 5015–5023] simplified
by Z. Teitler [PAMS 136 (2008), no 5, 1902–1913].

Let's consider Example 6.3 of Berkesch and Leykin from arXiv:1002.1475v2:

+------------------------------------------------------------+
|i1 : R = QQ[x,y,z]                                          |
|                                                            |
|o1 = R                                                      |
|                                                            |
|o1 : PolynomialRing                                         |
+------------------------------------------------------------+
|i2 : A = arrangement ((x^2 - y^2)*(x^2 - z^2)*(y^2 - z^2)*z)|
|                                                            |
|o2 = {z, y - z, y + z, x - z, x + z, x - y, x + y}          |
|                                                            |
|o2 : Hyperplane Arrangement                                 |
+------------------------------------------------------------+
|i3 : multiplierIdeal(3/7,A)                                 |
|                                                            |
|o3 = ideal (z, y, x)                                        |
|                                                            |
|o3 : Ideal of R                                             |
+------------------------------------------------------------+

Since the multiplier ideal is a step function of its real parameter, one tests
to see at what values it changes:

+----------------------------------------------------------------------+
|i4 : H = new MutableHashTable                                         |
|                                                                      |
|o4 = MutableHashTable{}                                               |
|                                                                      |
|o4 : MutableHashTable                                                 |
+----------------------------------------------------------------------+
|i5 : scan(39,i -> (                                                   |
|                 s := i/21;                                           |
|                 I := multiplierIdeal(s,A);                           |
|                 if not H#?I then H#I = {s} else H#I = H#I|{s}))      |
+----------------------------------------------------------------------+
|i6 : netList sort values H -- values of s giving same multiplier ideal|
|                                                                      |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |  | 1| 2|1 | 4| 5|2|1| 8|                                       |
|o6 = |0 |--|--|- |--|--|-|-|--|                                       |
|     |  |21|21|7 |21|21|7|3|21|                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |3 |10|11|  |  |  | | |  |                                       |
|     |- |--|--|  |  |  | | |  |                                       |
|     |7 |21|21|  |  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |4 |13|  |  |  |  | | |  |                                       |
|     |- |--|  |  |  |  | | |  |                                       |
|     |7 |21|  |  |  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |2 |5 |16|17|  |  | | |  |                                       |
|     |- |- |--|--|  |  | | |  |                                       |
|     |3 |7 |21|21|  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |6 |19|20|  |  |  | | |  |                                       |
|     |- |--|--|  |  |  | | |  |                                       |
|     |7 |21|21|  |  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |  |22|23|8 |25|26|9|4|29|                                       |
|     |1 |--|--|- |--|--|-|-|--|                                       |
|     |  |21|21|7 |21|21|7|3|21|                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |10|31|32|  |  |  | | |  |                                       |
|     |--|--|--|  |  |  | | |  |                                       |
|     | 7|21|21|  |  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |11|34|  |  |  |  | | |  |                                       |
|     |--|--|  |  |  |  | | |  |                                       |
|     | 7|21|  |  |  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
|     |5 |12|37|38|  |  | | |  |                                       |
|     |- |--|--|--|  |  | | |  |                                       |
|     |3 | 7|21|21|  |  | | |  |                                       |
|     +--+--+--+--+--+--+-+-+--+                                       |
+----------------------------------------------------------------------+

See also
========

  * logCanonicalThreshold,
    -- compute the log-canonical threshold of an arrangement

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

  * "multiplierIdeal(QQ,CentralArrangement)"
  * multiplierIdeal(QQ,CentralArrangement,List)
    -- compute a
    multiplier ideal
  * "multiplierIdeal(ZZ,CentralArrangement)"
  * "multiplierIdeal(ZZ,CentralArrangement,List)"

orlikSolomon(Arrangement,PolynomialRing) -- compute the defining ideal for the Orlik-Solomon algebra
****************************************************************************************************

Synopsis
========

  * Function: orlikSolomon,
  * Usage:
        orlikSolomon(A,E)
        orlikSolomon(A,k)
        orlikSolomon(A,e)
        orlikSolomon(A)
  * Inputs:
      * A, a hyperplane arrangement,
      * E, a polynomial ring (Macaulay2Doc), a
        skew-commutative polynomial ring with one variable for each hyperplane
        with indexed variables, optionally, given by the symbol $e$. The user
        can also just specify a cofficient ring $k$.
  * Optional inputs (Macaulay2Doc),:
      * HypAtInfinity => ..., default value 0
      * Projective => ..., default value false
      * Strategy => ..., default value Matroids
  * Outputs:
      * an ideal (Macaulay2Doc), the defining ideal of the
        Orlik-Solomon algebra of A

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

The Orlik-Solomon algebra is the cohomology ring of the complement of the
hyperplanes, either in complex projective or affine space. The optional Boolean
argument Projective specifies which.

A fundamental property is that its Hilbert series is determined by
combinatorics: namely, up to a change of variables, it is the characteristic
polynomial of the matroid of the arrangement.

+-----------------------------------------------------------------------------+
|i1 : A = typeA(3)                                                            |
|                                                                             |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }                  |
|       1    2   1    3   1    4   2    3   2    4   3    4                   |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : I = orlikSolomon(A,e)                                                   |
|                                                                             |
|o2 = ideal (e e  - e e  + e e , e e  - e e  + e e , e e  - e e  + e e , e e  |
|             4 5    4 6    5 6   2 3    2 6    3 6   1 3    1 5    3 5   1 2 |
|     ------------------------------------------------------------------------|
|     - e e  + e e )                                                          |
|        1 4    2 4                                                           |
|                                                                             |
|o2 : Ideal of QQ[e ..e ]                                                     |
|                  1   6                                                      |
+-----------------------------------------------------------------------------+
|i3 : reduceHilbert hilbertSeries I                                           |
|                                                                             |
|                 2     3                                                     |
|     1 + 6T + 11T  + 6T                                                      |
|o3 = -------------------                                                     |
|              1                                                              |
|                                                                             |
|o3 : Expression of class Divide                                              |
+-----------------------------------------------------------------------------+
|i4 : characteristicPolynomial matroid A                                      |
|                                                                             |
|      3     2                                                                |
|o4 = x  - 6x  + 11x - 6                                                      |
|                                                                             |
|o4 : ZZ[x]                                                                   |
+-----------------------------------------------------------------------------+

The cohomology ring of the complement of an arrangement in projective space is
most naturally described as the subalgebra of the Orlik-Solomon algebra
generated in degree $1$ by elements whose coefficients sum to $0$.

This is inconvenient for Macaulay2; on the other hand, one can choose a chart
for projective space that places a hyperplane of the arrangement at infinity.
This expresses the projective Orlik-Solomon algebra as a quotient of a
polynomial ring.

By selecting the Projective option, the user can specify which hyperplane is
placed at infinity.  By default, the first one in order is used.

+-----------------------------------------------------------------------------+
|i5 : I' = orlikSolomon(A,Projective=>true,HypAtInfinity=>2)                  |
|                                                                             |
|o5 = ideal (e e  - e e  + e e , e e  - e e  + e e , e e  - e e  + e e , e e  |
|             4 5    4 6    5 6   2 3    2 6    3 6   1 3    1 5    3 5   1 2 |
|     ------------------------------------------------------------------------|
|     - e e  + e e , e )                                                      |
|        1 4    2 4   3                                                       |
|                                                                             |
|o5 : Ideal of QQ[e ..e ]                                                     |
|                  1   6                                                      |
+-----------------------------------------------------------------------------+
|i6 : reduceHilbert hilbertSeries I'                                          |
|                                                                             |
|                2                                                            |
|     1 + 5T + 6T                                                             |
|o6 = ------------                                                            |
|           1                                                                 |
|                                                                             |
|o6 : Expression of class Divide                                              |
+-----------------------------------------------------------------------------+

The method caches the list of circuits (Matroids), of the
arrangement.  By default, the method uses the Matroids,
package to compute the Orlik-Solomon ideal.  The option "Strategy=>Popescu"
uses code by Sorin Popescu instead.

Caveat
======

The coefficient rings of the Orlik-Solomon algebra and of the arrangement,
respectively, are unrelated.

See also
========

  * poincare(Arrangement) -- compute the
    Poincaré polynomial of an arrangement
  * EPY(Arrangement) -- compute
    the Eisenbud-Popescu-Yuzvinsky module of an arrangement

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

  * "orlikSolomon(Arrangement)"
  * orlikSolomon(Arrangement,PolynomialRing)
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * "orlikSolomon(Arrangement,Ring)"
  * "orlikSolomon(Arrangement,Symbol)"
  * "orlikSolomon(CentralArrangement,PolynomialRing)"

orlikTerao(CentralArrangement,PolynomialRing) -- compute the defining ideal for the Orlik-Terao algebra
*******************************************************************************************************

Synopsis
========

  * Function: orlikTerao,
  * Usage:
        orlikTerao(A,S)
        orlikTerao(A,x)
        orlikTerao(A)
  * Inputs:
      * A, a central hyperplane arrangement, a
        hyperplane arrangement
      * S, a polynomial ring (Macaulay2Doc), a polynomial
        ring with one variable for each hyperplane with indexed variables,
        optionally, given by the symbol $x$.
  * Optional inputs (Macaulay2Doc),:
      * NaiveAlgorithm => a Boolean value (Macaulay2Doc),
        default value false
  * Outputs:
      * an ideal (Macaulay2Doc), the defining ideal of the
        Orlik-Terao algebra of A

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

The Orlik-Terao algebra of an arrangement is the subalgebra of rational
functions $k[1/f_1,1/f_2,\ldots,1/f_n]$, where the $f_i$'s are the defining
forms for the hyperplanes. The method produces an ideal presenting the
Orlik-Terao algebra as a quotient of a polynomial ring in $n$ variables.

+---------------------------------------------+
|i1 : R = QQ[x,y,z];                          |
+---------------------------------------------+
|i2 : orlikTerao arrangement {x,y,z,x+y+z}    |
|                                             |
|o2 = ideal(y y y  - y y y  - y y y  - y y y )|
|            1 2 3    1 2 4    1 3 4    2 3 4 |
|                                             |
|o2 : Ideal of QQ[y ..y ]                     |
|                  1   4                      |
+---------------------------------------------+

The defining ideal above has one generator given by the single relation coming
from the identity $x+y+z-(x+y+z)=0$.  In general, the ideal is homogeneous with
respect to the standard grading, but its degrees of generation are not
straightforward.  The projective variety cut out by this ideal is also called
the reciprocal plane.

+-----------------------------------------------------------------------------+
|i3 : I = orlikTerao arrangement "braid"                                      |
|                                                                             |
|o3 = ideal (y y  - y y  + y y , y y  + y y  - y y , y y  + y y  - y y , y y  |
|             4 5    4 6    5 6   2 3    2 6    3 6   1 3    1 5    3 5   1 2 |
|     ------------------------------------------------------------------------|
|     + y y  - y y )                                                          |
|        1 4    2 4                                                           |
|                                                                             |
|o3 : Ideal of QQ[y ..y ]                                                     |
|                  1   6                                                      |
+-----------------------------------------------------------------------------+
|i4 : betti res I                                                             |
|                                                                             |
|            0 1 2 3                                                          |
|o4 = total: 1 4 5 2                                                          |
|         0: 1 . . .                                                          |
|         1: . 4 2 .                                                          |
|         2: . . 3 2                                                          |
|                                                                             |
|o4 : BettiTally                                                              |
+-----------------------------------------------------------------------------+
|i5 : OT := comodule I;                                                       |
+-----------------------------------------------------------------------------+
|i6 : apply(1+dim OT, i-> 0 == Ext^i(OT, ring OT))                            |
|                                                                             |
|o6 = {true, true, true, false}                                               |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

As the example above hints, the Orlik-Terao algebra is always Cohen-Macaulay:
see N. J. Proudfoot and D. E. Speyer, A broken circuit ring, Beitrage zur
Algebra und Geometrie, 2006, arXiv:math/0410069 (see
https://arxiv.org/abs/math/0410069 ).

Unlike the Orlik-Solomon algebra, the isomorphism type of the Orlik-Terao
algebra is not a matroid invariant: see the example here.,
However, Terao proved that the Hilbert series
of the Orlik-Terao algebra is a matroid invariant: it is given by the
Poincaré polynomial (Macaulay2Doc),: \[ \sum_{i\geq 0}\dim
(S/I)_it^i=\pi({\mathcal A},t/(1-t)). \]

+---------------------------------------+
|i7 : p = poincare arrangement "braid"  |
|                                       |
|                 2     3               |
|o7 = 1 + 6T + 11T  + 6T                |
|                                       |
|o7 : ZZ[T]                             |
+---------------------------------------+
|i8 : F = frac QQ[T]; f = map(F,ring p);|
|                                       |
|o9 : RingMap F <--- ZZ[T]              |
+---------------------------------------+
|i10 : sub(f p, {T=>T/(1-T)})           |
|                                       |
|            2                          |
|        - 2T  - 3T - 1                 |
|o10 = -----------------                |
|       3     2                         |
|      T  - 3T  + 3T - 1                |
|                                       |
|o10 : frac F                           |
+---------------------------------------+
|i11 : reduceHilbert hilbertSeries I    |
|                                       |
|                 2                     |
|      1 + 3T + 2T                      |
|o11 = ------------                     |
|               3                       |
|        (1 - T)                        |
|                                       |
|o11 : Expression of class Divide       |
+---------------------------------------+

See also
========

  * der(CentralArrangement), --
    compute the module of logarithmic derivations

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

  * "orlikTerao(CentralArrangement)"
  * orlikTerao(CentralArrangement,PolynomialRing)
    -- compute the
    defining ideal for the Orlik-Terao algebra
  * "orlikTerao(CentralArrangement,Symbol)"

poincare(Arrangement) -- compute the Poincaré polynomial of an arrangement
***************************************************************************

Synopsis
========

  * Function: poincare (Macaulay2Doc),
  * Usage:
        poincare A
  * Inputs:
      * A, a hyperplane arrangement,
  * Outputs:
      * a ring element (Macaulay2Doc), its Poincaré
        polynomial, an element of the degrees ring.

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

The Poincaré polynomial $\pi({\mathcal A},t)$ of a central arrangement of rank
$r$ equals $t^r\,T(1+t^{-1},0)$, where $T(x,y)$ is the Tutte polynomial.
Alternatively, \[ \pi({\mathcal A},t)=\sum_F\mu(\widehat{0},F)(-t)^{r(F)}, \]
where the sum is over all flats $F$, the function $\mu$ denotes the Möbius
function of the intersection lattice, and $r(F)$ is the rank of the flat $F$.
The characteristic polynomial of an (essential) arrangement is closely related
and defined by \[ \chi({\mathcal A},t)=t^r\pi({\mathcal A},-t^{-1}). \]

+---------------------------------------+
|i1 : A = arrangement "MacLane";        |
+---------------------------------------+
|i2 : poincare A                        |
|                                       |
|                 2      3              |
|o2 = 1 + 8T + 20T  + 13T               |
|                                       |
|o2 : ZZ[T]                             |
+---------------------------------------+
|i3 : characteristicPolynomial matroid A|
|                                       |
|      3     2                          |
|o3 = x  - 8x  + 20x - 13               |
|                                       |
|o3 : ZZ[x]                             |
+---------------------------------------+

If ${\mathcal A}$ is an arrangement defined over the complex numbers, a
classical theorem of Brieskorn-Orlik-Solomon asserts that $\pi({\mathcal A},t)$
is also the Poincaré polynomial of the complement of the union of hyperplanes.
In certain interesting cases, the Poincaré polynomial factors into linear
factors.  This is the case if ${\mathcal A}$ is the set of reflecting
hyperplanes associated with a real or complex reflection group, in which case
the (co)exponents of the reflection group appear as the linear coefficients of
the factors.

+--------------------------------+
|i4 : factor poincare typeA 3    |
|                                |
|o4 = (1 + T)(1 + 2T)(1 + 3T)    |
|                                |
|o4 : Expression of class Product|
+--------------------------------+

More generally (since reflection arrangements are free), if the module of logarithmic derivations,
$D({\mathcal A})$
on $\mathcal A$ is free, Terao's Factorization Theorem states that the
Poincaré polynomial factors as a product $\prod_{i=1}^r(1+m_i t)$, where the
$m_i$'s are the degrees of the generators of the graded free module
$D({\mathcal A})$.

+--------------------------------------------------+
|i5 : A = arrangement "Hessian";                   |
+--------------------------------------------------+
|i6 : factor poincare A                            |
|                                                  |
|o6 = (1 + T)(1 + 4T)(1 + 7T)                      |
|                                                  |
|o6 : Expression of class Product                  |
+--------------------------------------------------+
|i7 : prune image der A                            |
|                                                  |
|        ZZ          3                             |
|o7 = (-----[x ..x ])                              |
|      31627  1   3                                |
|                                                  |
|       ZZ                                         |
|o7 : -----[x ..x ]-module, free, degrees {1, 4, 7}|
|     31627  1   3                                 |
+--------------------------------------------------+

The Poincaré polynomial appears in various enumerative contexts as well.  If
${\mathcal A}$ is an arrangement defined over the real numbers, then
$\pi({\mathcal A},1)$ equals the number of connected components in the
complement of the union of hyperplanes.  Similarly, $d/dt[\pi({\mathcal A},t)]$
evaluated at $t=1$ counts the number of bounded components in the complement of
the decone, of ${\mathcal
A}$.

If ${\mathcal A}$ is a non-central arrangement, the Poincaré polynomial
$\pi({\mathcal A},t)$ equals $\pi(c{\mathcal A},t)/(1+t)$, where $c{\mathcal
A}$ denotes the cone (Macaulay2Doc), of ${\mathcal A}$.

See also
========

  * der(CentralArrangement), --
    compute the module of logarithmic derivations
  * orlikSolomon(Arrangement)
    -- compute the defining
    ideal for the Orlik-Solomon algebra
  * characteristicPolynomial(Matroid) (Matroids)
    -- computes characteristic
    polynomial of a matroid

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

  * poincare(Arrangement) -- compute the
    Poincaré polynomial of an arrangement
  * "poincare(CentralArrangement)"

prune(Arrangement) -- makes a new hyperplane arrangement in a polynomial ring
*****************************************************************************

Synopsis
========

  * Function: prune (Macaulay2Doc),
  * Usage:
        prune A
  * Inputs:
      * A, a hyperplane arrangement,
  * Optional inputs (Macaulay2Doc),:
      * Exclude (Macaulay2Doc), => ...,
        default value {}, this optional input is ignored by this function
  * Outputs:
      * a hyperplane arrangement, an isomorphic to the
        input but defined over a polynomial ring

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

A hyperplane arrangement may sensibly be defined over a quotient of a
polynomial ring (Macaulay2Doc), by a linear ideal. However,
sometimes this is inconvenient.  This method creates an isomorphic hyperplane
arrangement in a polynomial ring.

+-----------------------------------------------------------------+
|i1 : A = typeA 3                                                 |
|                                                                 |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }      |
|       1    2   1    3   1    4   2    3   2    4   3    4       |
|                                                                 |
|o1 : Hyperplane Arrangement                                      |
+-----------------------------------------------------------------+
|i2 : A'' = restriction(A,0) -- restrict A to its first hyperplane|
|                                                                 |
|o2 = {x  - x , x  - x , x  - x , x  - x , x  - x }               |
|       2    3   2    4   2    3   2    4   3    4                |
|                                                                 |
|o2 : Hyperplane Arrangement                                      |
+-----------------------------------------------------------------+
|i3 : ring A''                                                    |
|                                                                 |
|      QQ[x ..x ]                                                 |
|          1   4                                                  |
|o3 = ------------                                                |
|     (x  - x , 0)                                                |
|       1    2                                                    |
|                                                                 |
|o3 : QuotientRing                                                |
+-----------------------------------------------------------------+
|i4 : B = prune A''                                               |
|                                                                 |
|o4 = {x  - x , x  - x , x  - x , x  - x , x  - x }               |
|       2    3   2    4   2    3   2    4   3    4                |
|                                                                 |
|o4 : Hyperplane Arrangement                                      |
+-----------------------------------------------------------------+
|i5 : ring B                                                      |
|                                                                 |
|o5 = QQ[x ..x ]                                                  |
|         2   4                                                   |
|                                                                 |
|o5 : PolynomialRing                                              |
+-----------------------------------------------------------------+

See also
========

  * trim(Arrangement) -- make a simple hyperplane
    arrangement
  * compress(Arrangement) -- extract nonzero
    equations
  * restriction(Arrangement,ZZ), --
    construct the restriction a hyperplane arrangement to a subspace

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

  * prune(Arrangement) -- makes a new hyperplane
    arrangement in a polynomial ring

randomArrangement(ZZ,PolynomialRing,ZZ) -- generate an arrangement at random
****************************************************************************

Synopsis
========

  * Function: randomArrangement,
  * Usage:
        randomArrangement(n,R,N)
  * Inputs:
      * n, an integer (Macaulay2Doc), number of hyperplanes
      * R, a polynomial ring (Macaulay2Doc), a polynomial
        ring over which to define the arrangement, or a number of variables l
        instead
      * N, an integer (Macaulay2Doc), absolute value of upper bound
        on coefficients
  * Optional inputs (Macaulay2Doc),:
      * Validate => a Boolean value (Macaulay2Doc), default
        value false, if true, the method will attempt to return an arrangement
        whose underlying matroid is uniform.
  * Outputs:
      * a hyperplane arrangement, a random rational
        arrangement of $n$ hyperplanes defined over $R$.

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

As $N$ increases, the random arrangement is a generic arrangement (i.e., a
realization of the uniform matroid (Matroids), with
probability tending to 1.  The user can require that the arrangement generated
is actually generic by using the option Validate => true.

+-------------------------------------------------------------+
|i1 : randomArrangement(4,3,5)                                |
|                                                             |
|o1 = {- 4x  + 3x  + x , 3x  + x , - 2x  + 2x , 3x  + x  + x }|
|          1     2    3    1    3      1     3    1    2    3 |
|                                                             |
|o1 : Hyperplane Arrangement                                  |
+-------------------------------------------------------------+

If an arrangement has the poincare polynomial,
of a generic arrangement, then it is itself generic.

+-----------------------------------------------------------------------------+
|i2 : tally apply(12, i -> poincare randomArrangement(6,3,5))                 |
|                                                                             |
|                       2      3                                              |
|o2 = Tally{1 + 6T + 15T  + 10T  => 8}                                        |
|                       2     3                                               |
|           1 + 6T + 14T  + 9T  => 4                                          |
|                                                                             |
|o2 : Tally                                                                   |
+-----------------------------------------------------------------------------+
|i3 : A = randomArrangement(6,3,5,Validate=>true)                             |
|                                                                             |
|o3 = {5x  + 4x  + 3x , - 3x  + x  - 5x , - 5x  - 3x  + 3x , 3x  + 4x  - 2x , |
|        1     2     3      1    2     3      1     2     3    1     2     3  |
|                                                                             |
|o3 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|- 2x  - 3x  + 5x , 5x  + 3x  - 5x }                                          |
|    1     2     3    1     2     3                                           |
+-----------------------------------------------------------------------------+
|i4 : U = uniformMatroid(3,6);                                                |
+-----------------------------------------------------------------------------+
|i5 : assert areIsomorphic(U, matroid A)                                      |
+-----------------------------------------------------------------------------+

Caveat
======

If the user specifies Validate => true and $N$ is too small, the method may not
halt.

See also
========

  * genericArrangement, --
    realize the uniform matroid using points on the monomial curve

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

  * randomArrangement(ZZ,PolynomialRing,ZZ)
    -- generate an arrangement
    at random
  * "randomArrangement(ZZ,ZZ,ZZ)"

rank(CentralArrangement) -- compute the rank of a central hyperplane arrangement
********************************************************************************

Synopsis
========

  * Function: rank (Macaulay2Doc),
  * Usage:
        rank A
  * Inputs:
      * A, a central hyperplane arrangement,
  * Outputs:
      * an integer (Macaulay2Doc), the codimension of the
        intersection of the defining equations

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

The center of a hyperplane arrangement is the intersection of its defining
affine-linear equations.  The rank of a hyperplane arrangement is the
codimension of its center.

We illustrate this method with some basic examples.

+-----------------------------------------------------------------------------+
|i1 : R = QQ[x,y,z];                                                          |
+-----------------------------------------------------------------------------+
|i2 : B = arrangement("braid", R)                                             |
|                                                                             |
|o2 = {x, y, z, x - y, x - z, y - z}                                          |
|                                                                             |
|o2 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i3 : rank B                                                                  |
|                                                                             |
|o3 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i4 : assert(rank B === rank matroid B)                                       |
+-----------------------------------------------------------------------------+
|i5 : rank typeA 4                                                            |
|                                                                             |
|o5 = 4                                                                       |
+-----------------------------------------------------------------------------+
|i6 : M = arrangement("MacLane")                                              |
|                                                                             |
|o6 = {x , x , x , x  - x , x  - x , x  - 6420x , x  - 6420x  - x , x  -      |
|       1   2   3   1    2   1    3   2        3   1        2    3   1        |
|                                                                             |
|o6 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|6420x  + 6419x }                                                             |
|     2        3                                                              |
+-----------------------------------------------------------------------------+
|i7 : rank M                                                                  |
|                                                                             |
|o7 = 3                                                                       |
+-----------------------------------------------------------------------------+

The trivial arrangement has no equations.

+------------------------------------------------------+
|i8 : trivial = arrangement(map(R^(numgens R),R^0,0),R)|
|                                                      |
|o8 = {}                                               |
|                                                      |
|o8 : Hyperplane Arrangement                           |
+------------------------------------------------------+
|i9 : rank trivial                                     |
|                                                      |
|o9 = 0                                                |
+------------------------------------------------------+
|i10 : assert(rank trivial === 0)                      |
+------------------------------------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement
  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement

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

  * rank(CentralArrangement) -- compute
    the rank of a central hyperplane arrangement

rank(Flat) -- compute the rank of a flat
****************************************

Synopsis
========

  * Function: rank (Macaulay2Doc),
  * Usage:
        rank F
  * Inputs:
      * F, a flat in an hyperplane arrangement,
  * Outputs:
      * an integer (Macaulay2Doc), the codimension of the
        intersection of the hyperplanes containing $F$

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

The rank of a flat $F$ is the codimension of the intersection of the
hyperplanes containing $F$ (i.e. whose indices are in $F$).

+-------------------------------------------------------------------+
|i1 : A3 = typeA 3                                                  |
|                                                                   |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }        |
|       1    2   1    3   1    4   2    3   2    4   3    4         |
|                                                                   |
|o1 : Hyperplane Arrangement                                        |
+-------------------------------------------------------------------+
|i2 : F = flat(A3, {3,4,5})                                         |
|                                                                   |
|o2 = {3, 4, 5}                                                     |
|                                                                   |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|               1    2   1    3   1    4   2    3   2    4   3    4 |
+-------------------------------------------------------------------+
|i3 : assert(rank F == 2)                                           |
+-------------------------------------------------------------------+

See also
========

  * rank(CentralArrangement) -- compute
    the rank of a central hyperplane arrangement

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

  * rank(Flat) -- compute the rank of a flat

restriction(Arrangement,Ideal) -- construct the restriction a hyperplane arrangement to a subspace
**************************************************************************************************

Synopsis
========

  * Function: restriction (Matroids),
  * Usage:
        restriction(A, I)
        restriction(A, F)
        A ^ F
        restriction F
  * Inputs:
      * A, a hyperplane arrangement,
      * I, an ideal (Macaulay2Doc), an ideal defining the subspace
        to which we restrict.  One may also specify a single ring element or a
        set of indices.  In the latter case, the subspace is the intersection
        of the corresponding hyperplanes.
  * Outputs:
      * a hyperplane arrangement,

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

The restriction of an arrangement ${\mathcal A}$ to a subspace $X$ is the
(multi)arrangement with hyperplanes $H_i\cap X$, where $H\in {\mathcal A}$ but
$H\not\supseteq X$.  The subspace $X$ may be defined by a ring element or an
ideal.

If an index or list (or set) of hyperplanes $S$ is given, then $X=\bigcap_{i\in
S}H_i$.  In this case, the restriction is a realization of the matroid
contraction $M/S$, where $M$ denotes the matroid of ${\mathcal A}$.

In general, the restriction is denoted ${\mathcal A}^X$. Its ambient space is
$X$.

+-------------------------------------------------------------------------+
|i1 : A = typeA(3)                                                        |
|                                                                         |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }              |
|       1    2   1    3   1    4   2    3   2    4   3    4               |
|                                                                         |
|o1 : Hyperplane Arrangement                                              |
+-------------------------------------------------------------------------+
|i2 : L = flats(2,A)                                                      |
|                                                                         |
|o2 = {{3, 4, 5}, {1, 2, 5}, {0, 5}, {0, 2, 4}, {1, 4}, {2, 3}, {0, 1, 3}}|
|                                                                         |
|o2 : List                                                                |
+-------------------------------------------------------------------------+
|i3 : A' = restriction first L                                            |
|                                                                         |
|o3 = {x  - x , x  - x , x  - x }                                         |
|       1    4   1    4   1    4                                          |
|                                                                         |
|o3 : Hyperplane Arrangement                                              |
+-------------------------------------------------------------------------+
|i4 : x := (ring A)_0 -- the subspace need not be in the arrangement      |
|                                                                         |
|o4 = x                                                                   |
|      1                                                                  |
|                                                                         |
|o4 : QQ[x ..x ]                                                          |
|         1   4                                                           |
+-------------------------------------------------------------------------+
|i5 : restriction(A,x)                                                    |
|                                                                         |
|o5 = {-x , -x , -x , x  - x , x  - x , x  - x }                          |
|        2    3    4   2    3   2    4   3    4                           |
|                                                                         |
|o5 : Hyperplane Arrangement                                              |
+-------------------------------------------------------------------------+

Unfortunately, the term ``restriction'' is used in conflicting senses in
arrangements versus matroids literature.  In the latter terminology,
``restriction'' to $S$ is a synonym for the deletion of the complement of $S$.

See also
========

  * deletion (Matroids) -- deletion of subset of matroid
  * subArrangement -- create the
    hyperplane arrangement containing a flat
  * eulerRestriction
    -- form the Euler restriction of a central multiarrangement

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

  * "restriction(Arrangement,Flat)"
  * restriction(Arrangement,Ideal),
    -- construct the restriction a hyperplane arrangement to a subspace
  * "restriction(Arrangement,List)"
  * "restriction(Arrangement,RingElement)"
  * "restriction(Arrangement,Set)"
  * "restriction(Arrangement,ZZ)"
  * "restriction(Flat)"

ring(Arrangement) -- get the underlying ring of a hyperplane arrangement
************************************************************************

Synopsis
========

  * Function: ring (Macaulay2Doc),
  * Usage:
        ring A
  * Inputs:
      * A, a hyperplane arrangement,
  * Outputs:
      * a ring (Macaulay2Doc), that contains the defining equations
        of the arrangement

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

A hyperplane arrangement is defined by a list of affine-linear equations in a
ring, either a polynomial ring or the quotient of polynomial ring by linear
equations.  This methods returns this ring.

Probably the best-known hyperplane arrangement is the braid arrangement
consisting of all the diagonal hyperplanes.  We illustrate two constructions of
this hyperplane arrangement in $4$-space, using different polynomial rings.

+-----------------------------------------------------------------------------+
|i1 : S = ZZ[w,x,y,z];                                                        |
+-----------------------------------------------------------------------------+
|i2 : A = arrangement(matrix{{1,1,1,0,0,0},{-1,0,0,1,1,0},{0,-1,0,-1,0,1},{0,0|
|                                                                             |
|o2 = {w - x, w - y, w - z, x - y, x - z, y - z}                              |
|                                                                             |
|o2 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|,-1,0,-1,-1}}, S)                                                            |
+-----------------------------------------------------------------------------+
|i3 : ring A                                                                  |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : assert(ring A === S)                                                    |
+-----------------------------------------------------------------------------+
|i5 : S' = ZZ/101[w,x,y,z];                                                   |
+-----------------------------------------------------------------------------+
|i6 : A' = typeA(3, S')                                                       |
|                                                                             |
|o6 = {w - x, w - y, w - z, x - y, x - z, y - z}                              |
|                                                                             |
|o6 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i7 : ring A'                                                                 |
|                                                                             |
|o7 = S'                                                                      |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i8 : assert(ring A' === S')                                                  |
+-----------------------------------------------------------------------------+
|i9 : assert(A' =!= A)                                                        |
+-----------------------------------------------------------------------------+

Projecting onto an appropriate linear subspace, we obtain an essential
arrangement, meaning that the rank of the arrangement is equal to the dimension
of its ambient vector space. (See also makeEssential.)

+----------------------------------------------------------------------------+
|i10 : R = S'/(w+x+y+z)                                                      |
|                                                                            |
|o10 = R                                                                     |
|                                                                            |
|o10 : QuotientRing                                                          |
+----------------------------------------------------------------------------+
|i11 : A'' = sub(A, R) -- this changes the coordinate ring of the arrangement|
|                                                                            |
|o11 = {- 2x - y - z, - x - 2y - z, - x - y - 2z, x - y, x - z, y - z}       |
|                                                                            |
|o11 : Hyperplane Arrangement                                                |
+----------------------------------------------------------------------------+
|i12 : ring A''                                                              |
|                                                                            |
|o12 = R                                                                     |
|                                                                            |
|o12 : QuotientRing                                                          |
+----------------------------------------------------------------------------+
|i13 : assert(rank A'' == dim ring A'')                                      |
+----------------------------------------------------------------------------+

The trivial arrangement has no equations, so it is necessary to specify a
coordinate ring.

+----------------------------------+
|i14 : trivial = arrangement({}, S)|
|                                  |
|o14 = {}                          |
|                                  |
|o14 : Hyperplane Arrangement      |
+----------------------------------+
|i15 : assert(ring trivial === S)  |
+----------------------------------+
|i16 : trivial' = arrangement({},R)|
|                                  |
|o16 = {}                          |
|                                  |
|o16 : Hyperplane Arrangement      |
+----------------------------------+
|i17 : assert(ring trivial' === R) |
+----------------------------------+

See also
========

  * arrangement(List) -- make a hyperplane
    arrangement

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

  * ring(Arrangement) -- get the underlying ring
    of a hyperplane arrangement

subArrangement(Arrangement,Flat) -- create the hyperplane arrangement containing a flat
***************************************************************************************

Synopsis
========

  * Function: subArrangement,
  * Usage:
        subArrangement(A, F)
        subArrangement F
        A _ F
  * Inputs:
      * A, a hyperplane arrangement,
      * F, a flat in an hyperplane arrangement, of the hyperplane
        arrangement $A$
  * Outputs:
      * a hyperplane arrangement, consisting of those
        hyperplanes in $A$ that contain the linear subspace indexed by the flat
        $F$

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

For any hyperplane arrangement $A$ and any flat $F$ in $A$, this methods
creates a new hyperplane arrangement formed by the hyperplanes in $A$ that
contain the linear subspace associated to the flat $A$.

We illustrate this method with the Coxeter arrangement of type A.

+----------------------------------------------------------+
|i1 : S = QQ[w, x, y, z];                                  |
+----------------------------------------------------------+
|i2 : A3 = typeA(3, S)                                     |
|                                                          |
|o2 = {w - x, w - y, w - z, x - y, x - z, y - z}           |
|                                                          |
|o2 : Hyperplane Arrangement                               |
+----------------------------------------------------------+
|i3 : F1 = flat(A3, {3,4,5})                               |
|                                                          |
|o3 = {3, 4, 5}                                            |
|                                                          |
|o3 : Flat of {w - x, w - y, w - z, x - y, x - z, y - z}   |
+----------------------------------------------------------+
|i4 : A3' = subArrangement(A3, F1)                         |
|                                                          |
|o4 = {x - y, x - z, y - z}                                |
|                                                          |
|o4 : Hyperplane Arrangement                               |
+----------------------------------------------------------+
|i5 : assert(ring A3 === ring A3')                         |
+----------------------------------------------------------+
|i6 : subArrangement flat(A3, {0, 5})                      |
|                                                          |
|o6 = {w - x, y - z}                                       |
|                                                          |
|o6 : Hyperplane Arrangement                               |
+----------------------------------------------------------+
|i7 : F2 = flat(A3, {0, 1, 3})                             |
|                                                          |
|o7 = {0, 1, 3}                                            |
|                                                          |
|o7 : Flat of {w - x, w - y, w - z, x - y, x - z, y - z}   |
+----------------------------------------------------------+
|i8 : assert(typeA(2, S) == A3_F2)                         |
+----------------------------------------------------------+
|i9 : assert(A3 === subArrangement flat(A3, {0,1,2,3,4,5}))|
+----------------------------------------------------------+

An extension of the bracelet arrangement,
has several subarrangements isomorphic to $A_3$.

+-----------------------------------------------------------------------------+
|i10 : B = arrangement("bracelet", S);                                        |
+-----------------------------------------------------------------------------+
|i11 : B' = arrangement({w+x+y+z} | hyperplanes B)                            |
|                                                                             |
|o11 = {w + x + y + z, w, x, y, w + z, x + z, y + z, w + x + z, w + y + z, x +|
|                                                                             |
|o11 : Hyperplane Arrangement                                                 |
|-----------------------------------------------------------------------------|
|y + z}                                                                       |
+-----------------------------------------------------------------------------+
|i12 : subArrangement flat(B', {0,1,2,6,8,9})                                 |
|                                                                             |
|o12 = {w + x + y + z, w, x, y + z, w + y + z, x + y + z}                     |
|                                                                             |
|o12 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+
|i13 : subArrangement flat(B', {0,1,3,5,7,9})                                 |
|                                                                             |
|o13 = {w + x + y + z, w, y, x + z, w + x + z, x + y + z}                     |
|                                                                             |
|o13 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+
|i14 : subArrangement flat(B', {0,2,3,4,7,8})                                 |
|                                                                             |
|o14 = {w + x + y + z, x, y, w + z, w + x + z, w + y + z}                     |
|                                                                             |
|o14 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+

See also
========

  * restriction(Arrangement,Ideal),
    -- construct the restriction a hyperplane arrangement to a subspace
  * deletion(Arrangement,RingElement)
    -- deletion of a subset of an
    arrangement

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

  * subArrangement(Arrangement,Flat)
    -- create the hyperplane
    arrangement containing a flat
  * "subArrangement(Flat)"

substitute(Arrangement,RingMap) -- change the ring of an arrangement
********************************************************************

Synopsis
========

  * Function: substitute (Macaulay2Doc),
  * Usage:
        substitute(arr, f)
        sub(arr, f)
        arr ** f
  * Inputs:
      * arr, a hyperplane arrangement,
      * f, a ring map (Macaulay2Doc), with source ring arr, or a
        ring (Macaulay2Doc), for which map(f, ring arr) makes sense
  * Outputs:
      * a hyperplane arrangement, the arrangement defined
        by applying f (if f is a ring map (Macaulay2Doc)) or
        map(f, ring arr) (if f is a ring (Macaulay2Doc)) to each
        defining linear form

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

+----------------------------------+
|i1 : R = QQ[x,y]                  |
|                                  |
|o1 = R                            |
|                                  |
|o1 : PolynomialRing               |
+----------------------------------+
|i2 : arr = arrangement{x,y,x-y}   |
|                                  |
|o2 = {x, y, x - y}                |
|                                  |
|o2 : Hyperplane Arrangement       |
+----------------------------------+
|i3 : f = map(QQ[a,b], R, {a, a+b})|
|                                  |
|o3 = map (QQ[a..b], R, {a, a + b})|
|                                  |
|o3 : RingMap QQ[a..b] <--- R      |
+----------------------------------+
|i4 : sub(arr, f)                  |
|                                  |
|o4 = {a, a + b, -b}               |
|                                  |
|o4 : Hyperplane Arrangement       |
+----------------------------------+

Alternatively, you can use **.

+-----------------------------+
|i5 : arr ** f === sub(arr, f)|
|                             |
|o5 = true                    |
+-----------------------------+

Given a ring (Macaulay2Doc), S, sub(arr, S) is the same as sub(arr,
map(S, ring arr)).

+----------------------------+
|i6 : S = QQ[x,y,z]          |
|                            |
|o6 = S                      |
|                            |
|o6 : PolynomialRing         |
+----------------------------+
|i7 : arr' = sub(arr, S)     |
|                            |
|o7 = {x, y, x - y}          |
|                            |
|o7 : Hyperplane Arrangement |
+----------------------------+
|i8 : ring arr' === S        |
|                            |
|o8 = true                   |
+----------------------------+

Note that the underlying matroid of the arrangement may change as a result of
changing the ring.  For example, the Fano matroid is realizable only in
characteristic 2:

+-----------------------------------------------------------------------------+
|i9 : R = ZZ[x,y,z]                                                           |
|                                                                             |
|o9 = R                                                                       |
|                                                                             |
|o9 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i10 : A = arrangement("nonFano",R)                                           |
|                                                                             |
|o10 = {x, y, z, y - z, x - z, x - y, x + y - z}                              |
|                                                                             |
|o10 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+
|i11 : f = map(ZZ/2[x,y,z],R);                                                |
|                                                                             |
|              ZZ                                                             |
|o11 : RingMap --[x..z] <--- R                                                |
|               2                                                             |
+-----------------------------------------------------------------------------+
|i12 : B = A**f                                                               |
|                                                                             |
|o12 = {x, y, z, y + z, x + z, x + y, x + y + z}                              |
|                                                                             |
|o12 : Hyperplane Arrangement                                                 |
+-----------------------------------------------------------------------------+
|i13 : flats(2,A)                                                             |
|                                                                             |
|o13 = {{5, 6}, {1, 4, 6}, {0, 3, 6}, {2, 6}, {3, 4, 5}, {2, 5}, {0, 1, 5},   |
|      -----------------------------------------------------------------------|
|      {0, 2, 4}, {1, 2, 3}}                                                  |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+
|i14 : flats(2,B)                                                             |
|                                                                             |
|o14 = {{2, 5, 6}, {1, 4, 6}, {0, 3, 6}, {3, 4, 5}, {0, 1, 5}, {0, 2, 4}, {1, |
|      -----------------------------------------------------------------------|
|      2, 3}}                                                                 |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * map(Ring,Ring) (Macaulay2Doc) -- make a ring
    map, using the names of the variables
  * Arrangement ** Ring -- change the
    coefficient ring of an arrangement

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

  * "substitute(Arrangement,Ring)"
  * substitute(Arrangement,RingMap)
    -- change the ring of an arrangement

toList(Flat) -- the indices of a flat
*************************************

Synopsis
========

  * Function: toList (Macaulay2Doc),
  * Usage:
        toList F
  * Inputs:
      * F, a flat in an hyperplane arrangement,
  * Outputs:
      * a list (Macaulay2Doc), the indices of the hyperplanes of a
        $F$

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

As stated in Flat, flats are treated in this package as lists of
indices of hyperplanes in the arrangement. This method returns that list.

+-------------------------------------------------------------------+
|i1 : A3 = typeA 3                                                  |
|                                                                   |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }        |
|       1    2   1    3   1    4   2    3   2    4   3    4         |
|                                                                   |
|o1 : Hyperplane Arrangement                                        |
+-------------------------------------------------------------------+
|i2 : F = flat(A3, {3,4,5})                                         |
|                                                                   |
|o2 = {3, 4, 5}                                                     |
|                                                                   |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }|
|               1    2   1    3   1    4   2    3   2    4   3    4 |
+-------------------------------------------------------------------+
|i3 : assert(toList F === {3,4,5})                                  |
+-------------------------------------------------------------------+

Often one wants the corresponding linear forms. This can be accomplished using
subscripts:

+--------------------------------+
|i4 : (hyperplanes A3)_(toList F)|
|                                |
|o4 = {x  - x , x  - x , x  - x }|
|       2    3   2    4   3    4 |
|                                |
|o4 : List                       |
+--------------------------------+

See also
========

  * toList(Arrangement) -- the defining
    linear forms of an arrangement

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

  * toList(Flat) -- the indices of a flat

trim(Arrangement) -- make a simple hyperplane arrangement
*********************************************************

Synopsis
========

  * Function: trim (Macaulay2Doc),
  * Usage:
        trim A
  * Inputs:
      * A, a hyperplane arrangement,
  * Optional inputs (Macaulay2Doc),:
      * Strategy (Macaulay2Doc), => ..., default value null,
        null
  * Outputs:
      * a hyperplane arrangement, a simple arrangement

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

A hyperplane arrangement is simple if none of its linear forms is identically
$0$ and no hyperplane is cut out out by more than one form. This method returns
a simple arrangement by reducing the multiplicities of the hyperplanes and
eliminating the zero equation (if necessary).

+----------------------------------------------------------+
|i1 : R = QQ[x, y];                                        |
+----------------------------------------------------------+
|i2 : A = arrangement{x,x,0_R,y,y,y,x+y,x+y,x+y,x+y,x+y}   |
|                                                          |
|o2 = {x, x, 0, y, y, y, x + y, x + y, x + y, x + y, x + y}|
|                                                          |
|o2 : Hyperplane Arrangement                               |
+----------------------------------------------------------+
|i3 : A' = trim A                                          |
|                                                          |
|o3 = {y, x, x + y}                                        |
|                                                          |
|o3 : Hyperplane Arrangement                               |
+----------------------------------------------------------+
|i4 : assert(ring A' === R)                                |
+----------------------------------------------------------+
|i5 : assert(trim A' == A')                                |
+----------------------------------------------------------+
|i6 : assert(trim A' == A')                                |
+----------------------------------------------------------+

Some natural operations produce non-simple hyperplane arrangements.

+---------------------------------------+
|i7 : A'' = restriction(A, y)           |
|                                       |
|o7 = {x, x, x, x, x, x, x}             |
|                                       |
|o7 : Hyperplane Arrangement            |
+---------------------------------------+
|i8 : trim A''                          |
|                                       |
|o8 = {x}                               |
|                                       |
|o8 : Hyperplane Arrangement            |
+---------------------------------------+
|i9 : A''' = dual arrangement{x, y, x-y}|
|                                       |
|o9 = {-x , x , x }                     |
|        1   1   1                      |
|                                       |
|o9 : Hyperplane Arrangement            |
+---------------------------------------+
|i10 : trim A'''                        |
|                                       |
|o10 = {x }                             |
|        1                              |
|                                       |
|o10 : Hyperplane Arrangement           |
+---------------------------------------+

See also
========

  * compress(Arrangement) -- extract nonzero
    equations
  * prune(Arrangement) -- makes a new hyperplane
    arrangement in a polynomial ring
  * restriction(Arrangement,RingElement)
    -- construct the restriction a
    hyperplane arrangement to a subspace
  * dual(CentralArrangement) -- the
    Gale dual of an arrangement

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

  * trim(Arrangement) -- make a simple hyperplane
    arrangement

typeA(ZZ,Ring) -- make the hyperplane arrangement defined by a type $A_n$ root system
*************************************************************************************

Synopsis
========

  * Function: typeA,
  * Usage:
        typeA(n, k)
        typeA(n, R)
        typeA n
  * Inputs:
      * n, an integer (Macaulay2Doc), that is positive
      * k, a ring (Macaulay2Doc), that determines the coefficient
        ring of the hyperplane arrangement or a polynomial ring (Macaulay2Doc),
        $R$ that determines the ambient ring,
  * Outputs:
      * a hyperplane arrangement,

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

Given a coefficient ring $k$, the Coxeter arrangement of type $A_n$ is the
hyperplane arrangement in $k^{n+1}$ defined by $x_i - x_j$ for all $1 \leq i <
j \leq n+1$.

+-----------------------------------------------------------------------------+
|i1 : A0 = typeA(3, ZZ)                                                       |
|                                                                             |
|o1 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x }                  |
|       1    2   1    3   1    4   2    3   2    4   3    4                   |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : ring A0                                                                 |
|                                                                             |
|o2 = ZZ[x ..x ]                                                              |
|         1   4                                                               |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : A1 = typeA(4, QQ)                                                       |
|                                                                             |
|o3 = {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x ,|
|       1    2   1    3   1    4   1    5   2    3   2    4   2    5   3    4 |
|                                                                             |
|o3 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x }                                                            |
| 3    5   4    5                                                             |
+-----------------------------------------------------------------------------+
|i4 : ring A1                                                                 |
|                                                                             |
|o4 = QQ[x ..x ]                                                              |
|         1   5                                                               |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : A3 = typeA(2, ZZ/2)                                                     |
|                                                                             |
|o5 = {x  + x , x  + x , x  + x }                                             |
|       1    2   1    3   2    3                                              |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i6 : ring A3                                                                 |
|                                                                             |
|     ZZ                                                                      |
|o6 = --[x ..x ]                                                              |
|      2  1   3                                                               |
|                                                                             |
|o6 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+

When the second input is a polynomial ring $R$, this ring determines the
ambient ring of the Coxeter arrangement.  The polynomial ring must have at
least $n+1$ variables.

+-----------------------------------------------+
|i7 : A4 = typeA(3, ZZ[a,b,c,d])                |
|                                               |
|o7 = {a - b, a - c, a - d, b - c, b - d, c - d}|
|                                               |
|o7 : Hyperplane Arrangement                    |
+-----------------------------------------------+
|i8 : ring A4                                   |
|                                               |
|o8 = ZZ[a..d]                                  |
|                                               |
|o8 : PolynomialRing                            |
+-----------------------------------------------+
|i9 : A5 = typeA(2, ZZ[t][x,y,z])               |
|                                               |
|o9 = {x - y, x - z, y - z}                     |
|                                               |
|o9 : Hyperplane Arrangement                    |
+-----------------------------------------------+
|i10 : ring A5                                  |
|                                               |
|o10 = ZZ[t][x..z]                              |
|                                               |
|o10 : PolynomialRing                           |
+-----------------------------------------------+

Omitting the ring (or second argument) is equivalent to setting $k :=
\mathbb{Q}$.

+---------------------------------+
|i11 : A6 = typeA 2               |
|                                 |
|o11 = {x  - x , x  - x , x  - x }|
|        1    2   1    3   2    3 |
|                                 |
|o11 : Hyperplane Arrangement     |
+---------------------------------+
|i12 : ring A6                    |
|                                 |
|o12 = QQ[x ..x ]                 |
|          1   3                  |
|                                 |
|o12 : PolynomialRing             |
+---------------------------------+

See also
========

  * arrangement(List,Ring) -- make a
    hyperplane arrangement
  * typeB(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $B_n$ root system
  * typeD(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $D_n$ root system

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

  * "typeA(ZZ)"
  * "typeA(ZZ,PolynomialRing)"
  * typeA(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $A_n$ root system

typeB(ZZ,Ring) -- make the hyperplane arrangement defined by a type $B_n$ root system
*************************************************************************************

Synopsis
========

  * Function: typeB,
  * Usage:
        typeB(n, k)
        typeB(n, R)
        typeB n
  * Inputs:
      * n, an integer (Macaulay2Doc), that is positive
      * k, a ring (Macaulay2Doc), that determines the coefficient
        ring of the hyperplane arrangement or a polynomial ring (Macaulay2Doc),
        $R$ that determines the ambient ring,
  * Outputs:
      * a hyperplane arrangement,

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

Given a coefficient ring $k$, the Coxeter arrangement of type $B_n$ is the
hyperplane arrangement in $k^{n}$ defined by $x_i$ for all $1 \leq i \leq n$
and $x_i \pm x_j$ for all $1 \leq i < j \leq n$.

+-----------------------------------------------------------------------------+
|i1 : A0 = typeB(3, ZZ)                                                       |
|                                                                             |
|o1 = {x , x  - x , x  + x , x  - x , x  + x , x , x  - x , x  + x , x }      |
|       1   1    2   1    2   1    3   1    3   2   2    3   2    3   3       |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : ring A0                                                                 |
|                                                                             |
|o2 = ZZ[x ..x ]                                                              |
|         1   3                                                               |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : A1 = typeB(4, QQ)                                                       |
|                                                                             |
|o3 = {x , x  - x , x  + x , x  - x , x  + x , x  - x , x  + x , x , x  - x , |
|       1   1    2   1    2   1    3   1    3   1    4   1    4   2   2    3  |
|                                                                             |
|o3 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|x  + x , x  - x , x  + x , x , x  - x , x  + x , x }                         |
| 2    3   2    4   2    4   3   3    4   3    4   4                          |
+-----------------------------------------------------------------------------+
|i4 : ring A1                                                                 |
|                                                                             |
|o4 = QQ[x ..x ]                                                              |
|         1   4                                                               |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : A3 = typeB(2, ZZ/2)                                                     |
|                                                                             |
|o5 = {x , x  + x , x  + x , x }                                              |
|       1   1    2   1    2   2                                               |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i6 : trim A3                                                                 |
|                                                                             |
|o6 = {x , x , x  + x }                                                       |
|       2   1   1    2                                                        |
|                                                                             |
|o6 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i7 : ring A3                                                                 |
|                                                                             |
|     ZZ                                                                      |
|o7 = --[x ..x ]                                                              |
|      2  1   2                                                               |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+

When the second input is a polynomial ring $R$, this ring determines the
ambient ring of the Coxeter arrangement.  The polynomial ring must have at
least $n$ variables.

+--------------------------------------------------------+
|i8 : A4 = typeB(3, ZZ[a,b,c,d])                         |
|                                                        |
|o8 = {a, a - b, a + b, a - c, a + c, b, b - c, b + c, c}|
|                                                        |
|o8 : Hyperplane Arrangement                             |
+--------------------------------------------------------+
|i9 : ring A4                                            |
|                                                        |
|o9 = ZZ[a..d]                                           |
|                                                        |
|o9 : PolynomialRing                                     |
+--------------------------------------------------------+
|i10 : A5 = typeB(2, ZZ[t][x,y,z])                       |
|                                                        |
|o10 = {x, x - y, x + y, y}                              |
|                                                        |
|o10 : Hyperplane Arrangement                            |
+--------------------------------------------------------+
|i11 : ring A5                                           |
|                                                        |
|o11 = ZZ[t][x..z]                                       |
|                                                        |
|o11 : PolynomialRing                                    |
+--------------------------------------------------------+

Omitting the ring (or second argument) is equivalent to setting $k :=
\mathbb{Q}$.

+------------------------------------------------------------------------+
|i12 : A6 = typeB 3                                                      |
|                                                                        |
|o12 = {x , x  - x , x  + x , x  - x , x  + x , x , x  - x , x  + x , x }|
|        1   1    2   1    2   1    3   1    3   2   2    3   2    3   3 |
|                                                                        |
|o12 : Hyperplane Arrangement                                            |
+------------------------------------------------------------------------+
|i13 : ring A6                                                           |
|                                                                        |
|o13 = QQ[x ..x ]                                                        |
|          1   3                                                         |
|                                                                        |
|o13 : PolynomialRing                                                    |
+------------------------------------------------------------------------+
|i14 : A7 = typeB 1                                                      |
|                                                                        |
|o14 = {x }                                                              |
|        1                                                               |
|                                                                        |
|o14 : Hyperplane Arrangement                                            |
+------------------------------------------------------------------------+
|i15 : ring A7                                                           |
|                                                                        |
|o15 = QQ[x ]                                                            |
|          1                                                             |
|                                                                        |
|o15 : PolynomialRing                                                    |
+------------------------------------------------------------------------+

See also
========

  * arrangement(List,Ring) -- make a
    hyperplane arrangement
  * typeA(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $A_n$ root system
  * typeD(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $D_n$ root system

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

  * "typeB(ZZ)"
  * "typeB(ZZ,PolynomialRing)"
  * typeB(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $B_n$ root system

typeD(ZZ,Ring) -- make the hyperplane arrangement defined by a type $D_n$ root system
*************************************************************************************

Synopsis
========

  * Function: typeD,
  * Usage:
        typeD(n, k)
        typeD(n, R)
        typeD n
  * Inputs:
      * n, an integer (Macaulay2Doc), that is greater than $1$
      * k, a ring (Macaulay2Doc), that determines the coefficient
        ring of the hyperplane arrangement or a polynomial ring (Macaulay2Doc),
        $R$ that determines the ambient ring,
  * Outputs:
      * a hyperplane arrangement,

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

Given a coefficient ring $k$, the Coxeter arrangement of type $D_n$ is the
hyperplane arrangement in $k^{n}$ defined by $x_i \pm x_j$ for all $1 \leq i <
j \leq n$.

+-----------------------------------------------------------------------------+
|i1 : A0 = typeD(3, ZZ)                                                       |
|                                                                             |
|o1 = {x  - x , x  + x , x  - x , x  + x , x  - x , x  + x }                  |
|       1    2   1    2   1    3   1    3   2    3   2    3                   |
|                                                                             |
|o1 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i2 : ring A0                                                                 |
|                                                                             |
|o2 = ZZ[x ..x ]                                                              |
|         1   3                                                               |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : A1 = typeD(4, QQ)                                                       |
|                                                                             |
|o3 = {x  - x , x  + x , x  - x , x  + x , x  - x , x  + x , x  - x , x  + x ,|
|       1    2   1    2   1    3   1    3   1    4   1    4   2    3   2    3 |
|                                                                             |
|o3 : Hyperplane Arrangement                                                  |
|-----------------------------------------------------------------------------|
|x  - x , x  + x , x  - x , x  + x }                                          |
| 2    4   2    4   3    4   3    4                                           |
+-----------------------------------------------------------------------------+
|i4 : ring A1                                                                 |
|                                                                             |
|o4 = QQ[x ..x ]                                                              |
|         1   4                                                               |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : A3 = typeD(2, ZZ/2)                                                     |
|                                                                             |
|o5 = {x  + x , x  + x }                                                      |
|       1    2   1    2                                                       |
|                                                                             |
|o5 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i6 : trim A3                                                                 |
|                                                                             |
|o6 = {x  + x }                                                               |
|       1    2                                                                |
|                                                                             |
|o6 : Hyperplane Arrangement                                                  |
+-----------------------------------------------------------------------------+
|i7 : ring A3                                                                 |
|                                                                             |
|     ZZ                                                                      |
|o7 = --[x ..x ]                                                              |
|      2  1   2                                                               |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+

When the second input is a polynomial ring $R$, this ring determines the
ambient ring of the Coxeter arrangement.  The polynomial ring must have at
least $n$ variables.

+-----------------------------------------------+
|i8 : A4 = typeD(3, ZZ[a,b,c,d])                |
|                                               |
|o8 = {a - b, a + b, a - c, a + c, b - c, b + c}|
|                                               |
|o8 : Hyperplane Arrangement                    |
+-----------------------------------------------+
|i9 : ring A4                                   |
|                                               |
|o9 = ZZ[a..d]                                  |
|                                               |
|o9 : PolynomialRing                            |
+-----------------------------------------------+
|i10 : A5 = typeD(2, ZZ[t][x,y,z])              |
|                                               |
|o10 = {x - y, x + y}                           |
|                                               |
|o10 : Hyperplane Arrangement                   |
+-----------------------------------------------+
|i11 : ring A5                                  |
|                                               |
|o11 = ZZ[t][x..z]                              |
|                                               |
|o11 : PolynomialRing                           |
+-----------------------------------------------+

Omitting the ring (or second argument) is equivalent to setting $k :=
\mathbb{Q}$.

+------------------------------------------------------------+
|i12 : A6 = typeD 3                                          |
|                                                            |
|o12 = {x  - x , x  + x , x  - x , x  + x , x  - x , x  + x }|
|        1    2   1    2   1    3   1    3   2    3   2    3 |
|                                                            |
|o12 : Hyperplane Arrangement                                |
+------------------------------------------------------------+
|i13 : ring A6                                               |
|                                                            |
|o13 = QQ[x ..x ]                                            |
|          1   3                                             |
|                                                            |
|o13 : PolynomialRing                                        |
+------------------------------------------------------------+

See also
========

  * arrangement(List,Ring) -- make a
    hyperplane arrangement
  * typeA(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $A_n$ root system
  * typeB(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $B_n$ root system

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

  * "typeD(ZZ)"
  * "typeD(ZZ,PolynomialRing)"
  * typeD(ZZ,Ring) -- make the hyperplane
    arrangement defined by a type $D_n$ root system

vee(Flat,Flat) -- compute the vee operation in the intersection lattice
***********************************************************************

Synopsis
========

  * Function: vee,
  * Usage:
        vee(F, G)
        F | G
  * Inputs:
      * F, a flat in an hyperplane arrangement,
      * G, a flat in an hyperplane arrangement, in the same
        arrangment as $F$
  * Outputs:
      * a flat in an hyperplane arrangement, having the least
        codimension among those contained in both $F$ and $G$

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

In the geometric lattice of flats, the vee (also known as the supremum or least
upper bound) is the join operation. Equivalently, identifyings flats with
subspaces, this operation is the closure of the union.

The vee operation is commutative, associative, and idempotent.

+-----------------------------------------------------------------------------+
|i1 : A = typeA 6;                                                            |
+-----------------------------------------------------------------------------+
|i2 : F = flat(A, {0, 1, 6, 15, 20})                                          |
|                                                                             |
|o2 = {0, 1, 6, 15, 20}                                                       |
|                                                                             |
|o2 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i3 : G = flat(A, {0, 1, 2, 6, 7, 11})                                        |
|                                                                             |
|o3 = {0, 1, 2, 6, 7, 11}                                                     |
|                                                                             |
|o3 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i4 : H = flat(A, {0, 1, 2, 3, 6, 7, 8, 11, 12, 15})                          |
|                                                                             |
|o4 = {0, 1, 2, 3, 6, 7, 8, 11, 12, 15}                                       |
|                                                                             |
|o4 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i5 : F | G                                                                   |
|                                                                             |
|o5 = {0, 1, 2, 3, 6, 7, 8, 11, 12, 15, 20}                                   |
|                                                                             |
|o5 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i6 : G | H                                                                   |
|                                                                             |
|o6 = {0, 1, 2, 3, 6, 7, 8, 11, 12, 15}                                       |
|                                                                             |
|o6 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i7 : F | H                                                                   |
|                                                                             |
|o7 = {0, 1, 2, 3, 6, 7, 8, 11, 12, 15, 20}                                   |
|                                                                             |
|o7 : Flat of {x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , |
|               1    2   1    3   1    4   1    5   1    6   1    7   2    3  |
|-----------------------------------------------------------------------------|
|x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - x , x  - |
| 2    4   2    5   2    6   2    7   3    4   3    5   3    6   3    7   4   |
|-----------------------------------------------------------------------------|
|x , x  - x , x  - x , x  - x , x  - x , x  - x }                             |
| 5   4    6   4    7   5    6   5    7   6    7                              |
+-----------------------------------------------------------------------------+
|i8 : assert(vee(F, G) === F | G)                                             |
+-----------------------------------------------------------------------------+
|i9 : assert(F | G === G | F)                                                 |
+-----------------------------------------------------------------------------+
|i10 : assert((F | G) | H === F | (G | H))                                    |
+-----------------------------------------------------------------------------+
|i11 : assert(G | G === G)                                                    |
+-----------------------------------------------------------------------------+

The rank function is also semimodular.

+----------------------------------------------------------+
|i12 : assert(rank F + rank G >= rank(F ^ G) + rank(F | G))|
+----------------------------------------------------------+
|i13 : assert(rank F + rank H >= rank(F ^ H) + rank(F | H))|
+----------------------------------------------------------+
|i14 : assert(rank H + rank G >= rank(H ^ G) + rank(H | G))|
+----------------------------------------------------------+

See also
========

  * rank(Flat) -- compute the rank of a flat
  * vee(Flat,Flat) -- compute the vee operation in
    the intersection lattice

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

  * vee(Flat,Flat) -- compute the vee operation in
    the intersection lattice