#10053: Equality testing instead of comparisons in differential forms code
-----------------------------------+----------------------------------------
Reporter: jvkersch | Owner: burcin
Type: defect | Status: positive_review
Priority: major | Milestone:
Component: symbolics | Keywords: forms, comparison, equality
Author: Joris Vankerschaver | Upstream: N/A
Reviewer: Niles Johnson | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Changes (by niles):
* status: needs_review => positive_review
Comment:
Ok, I'm ready to give this a positive review: the patch(es) pass all long
doctests, documentation builds well. Moreover, comparison of symbolic
expressions is work in progress, so comparing as strings seems to be the
best current solution. jpflori suggested using `cmp` to compare symbolic
expressions, but this is what lead to inconsistent behavior for comparison
of tuples of symbolic expressions (see #10041).
Note that forms are appropriately simplified before comparison:
{{{
sage: F = DifferentialForms(); F
Algebra of differential forms in the variables x, y, z
sage: var('x,y,z')
(x, y, z)
sage: sage: g = DifferentialForm(F, 2)
sage: sage: g[0, 2] = y
sage: sage: g[1, 2] = 2*x; g
2*x*dy/\dz + y*dx/\dz
sage: g = DifferentialForm(F, 2)
sage: g[0, 2] = y
sage: g[1, 2] = 2*x; g
2*x*dy/\dz + y*dx/\dz
sage: f = DifferentialForm(F, 2)
sage: f[0, 2] = sqrt(4)*y/2
sage: f[1, 2] = -1 - x^2 + (x+1)^2; f
((x + 1)^2 - x^2 - 1)*dy/\dz + y*dx/\dz
sage: f == g
True
}}}
I will also now mark #10041 as positive review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10053#comment:11>
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 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-trac?hl=en.