#14789: Implement hyperplane arrangements
---------------------------------+-----------------------------
       Reporter:  kcrisman       |        Owner:  sage-combinat
           Type:  enhancement    |       Status:  needs_info
       Priority:  major          |    Milestone:  sage-5.13
      Component:  combinatorics  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-----------------------------

Comment (by nbruin):

 Replying to [comment:34 vbraun]:
 > {{{
 > sage: arrangement = (x + 2*y + 3*z - 4) and (y - 7) and (x + z)
 > sage: arrangement == x + 2*y + 3*z - 4 and y - 7 and x + z     #
 brackets are optional
 > True
 > }}}
 > If nobody objects then I'll work on that since I kind of need hyperplane
 arrangements now...

 Don't use "and". It explicitly has shortcutting behaviour specified on it:
 {{{
 sage: 1 and 2
 2
 sage: a = 1; b = 2
 sage: b if a else a #it's specified to do this
 2
 }}}
 so departing from this behaviour would be very surprising.

 The operator possibly available would be the "bitwise" `&`, but I doubt
 you want to repurpose it for union.? Being smart with overloading
 operators often comes back to bite you (see `%` for string formatting in
 python).

 Also, since these are hyperplanes given by equations describing them,
 `and` could easily be interpreted as ''intersection''. That's the most
 direct interpretation coming from the boolean meaning of the operator in
 sage.

 Multiplication would come closer if you think about the arrangement as a
 union of hyperplanes. Do you keep multiplicities?

 If you think of the hyperplane arrangement as a collection of hyperplanes,
 then they should probably be modelled as a set of hyperplanes, and python
 does not overload any binary operation to take unions of sets.

--
Ticket URL: <http://trac.sagemath.org/ticket/14789#comment:37>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to