Hi!

I'm playing around with Sage for manipulating some inequalities of distances. For example, I may have some points in an unknown metric space, so I know the triangular inequality holds, but little else. In some cases, I may also have additional inequalities (such as one distance being smaller than another).

What I'm wondering is what's possible to solve, here. For example, I'm interested in finding lower bounds on distances. A trivial example is the inverted triangular inequality, xz >= xy - yz, which can be derived from the triangular inequality in a single step. Slightly less obvious is the hyperplane inequality, for four points x, y, u and v, where y is assumed to be closer to v and we want to lower-bound xy:

sage: var('uv ux uy vx vy xy')
(uv, ux, uy, vx, vy, xy)
sage: eq1 = vx <= vy + xy # Triangularity
sage: eq2 = uy <= ux + xy # Triangularity
sage: eq3 = vy <= uy      # Assumption
sage: eq1 - xy
vx - xy <= vy
sage: (eq1 - xy).substitute(vy==eq2.rhs()) # By eq3...
vx - xy <= ux + xy
sage: _ + xy - ux
-ux + vx <= 2*xy
sage: _ / 2
-1/2*ux + 1/2*vx <= xy

This is, of course, pretty manual. (Sage doesn't even have to know about eq3, as I just use it myself, when forcibly inserting eq2.rhs()... :)

My question is, how much of this sort of thing can I automate (i.e., to help me discover new inequalities, for example)? And which tools (such as adding assumptions, using solve() or .simplify()...) should I use? Is it at all possible?-)

- M

--
Magnus Lie Hetland
http://hetland.org


--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to