Changes between Initial Version and Version 5 of Ticket #10053


Ignore:
Timestamp:
10/05/10 15:24:19 (11 years ago)
Author:
niles
Comment:

With this patch and the one at #10041, sage passes all (-long) doctests (linux, Red Hat Enterprise).

At #10041, jason commented that comparison of tuples of symbolic variables is not well-defined, and suggested using strings instead. That has been done in coordinate_patch.py and differential_forms.py, but not in differential_form_element.py -- there, comparison uses __dict__. So is the following expected to work on all systems?

sage: F = DifferentialForms(); F
Algebra of differential forms in the variables x, y, z
sage: var('x,y,z')
(x, y, z)
sage: f = DifferentialForm(F, 2)
sage: f[1,2] = x; f
x*dy/\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 == g
False
sage: g == g
True

Note:

sage: g.__dict__
{'_components': {(1, 2): 2*x, (0, 2): y}, '_degree': 2}
sage: f.__dict__
{'_components': {(1, 2): x}, '_degree': 2}
sage: type(g.__dict__['_components'][(0,2)])
<type 'sage.symbolic.expression.Expression'>

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10053

    • Property Status changed from new to needs_info
    • Property Reviewers changed from to Niles Johnson
  • Ticket #10053 – Description

    initial v5  
    22
    33This is related to #10041.
     4
     5== Apply ==
     6
     7 * patch from #10041
     8 * [attachment:trac_10053_equality_testing_forms.patch]