Changes between Initial Version and Version 1 of Ticket #27659


Ignore:
Timestamp:
Apr 14, 2019, 9:13:40 AM (4 years ago)
Author:
Michael Jung
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27659

    • Property Status changed from new to needs_review
    • Property Milestone changed from sage-8.8 to sage-duplicate/invalid/wontfix
  • Ticket #27659 – Description

    initial v1  
    1 While checking whether a scalar field is in a diff form module of non-zero degree (it is not), one get a AttributeError:
    2 
    3 {{{
    4 sage: M = Manifold(2, 'M')
    5 sage: X.<x,y> = M.chart()
    6 sage: f = M.scalar_field(x, name='f')
    7 sage: f in M.diff_form_module(1)
    8 ---------------------------------------------------------------------------
    9 AttributeError                            Traceback (most recent call last)
    10 <ipython-input-38-9654b754d2bc> in <module>()
    11       2 X = M.chart(names=('x', 'y',)); (x, y,) = X._first_ngens(2)
    12       3 f = M.scalar_field(x, name='f')
    13 ----> 4 f in M.diff_form_module(Integer(1))
    14 
    15 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.__contains__ (build/cythonized/sage/structure/parent.c:9885)()
    16    1090             return True
    17    1091         try:
    18 -> 1092             x2 = self(x)
    19    1093             EQ = (x2 == x)
    20    1094             if EQ is True:
    21 
    22 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9219)()
    23     898         if mor is not None:
    24     899             if no_extra_args:
    25 --> 900                 return mor._call_(x)
    26     901             else:
    27     902                 return mor._call_with_args(x, args, kwds)
    28 
    29 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4551)()
    30     160                 print(type(C), C)
    31     161                 print(type(C._element_constructor), C._element_constructor)
    32 --> 162             raise
    33     163
    34     164     cpdef Element _call_with_args(self, x, args=(), kwds={}):
    35 
    36 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4443)()
    37     155         cdef Parent C = self._codomain
    38     156         try:
    39 --> 157             return C._element_constructor(x)
    40     158         except Exception:
    41     159             if print_warnings:
    42 
    43 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/differentiable/diff_form_module.pyc in _element_constructor_(self, comp, frame, name, latex_name)
    44     818         resu = self.element_class(self._fmodule, self._degree, name=name,
    45     819                                   latex_name=latex_name)
    46 --> 820         if comp != []:
    47     821             resu.set_comp(frame)[:] = comp
    48     822         return resu
    49 
    50 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/scalarfield.pyc in __ne__(self, other)
    51    1285
    52    1286         """
    53 -> 1287         return not (self == other)
    54    1288
    55    1289     ####### End of required methods for an algebra element (beside arithmetic) #######
    56 
    57 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/scalarfield.pyc in __eq__(self, other)
    58    1244                 return False
    59    1245             try:
    60 -> 1246                 other = self.parent()(other)  # conversion to a scalar field
    61    1247             except TypeError:
    62    1248                 return False
    63 
    64 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9219)()
    65     898         if mor is not None:
    66     899             if no_extra_args:
    67 --> 900                 return mor._call_(x)
    68     901             else:
    69     902                 return mor._call_with_args(x, args, kwds)
    70 
    71 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4551)()
    72     160                 print(type(C), C)
    73     161                 print(type(C._element_constructor), C._element_constructor)
    74 --> 162             raise
    75     163
    76     164     cpdef Element _call_with_args(self, x, args=(), kwds={}):
    77 
    78 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4443)()
    79     155         cdef Parent C = self._codomain
    80     156         try:
    81 --> 157             return C._element_constructor(x)
    82     158         except Exception:
    83     159             if print_warnings:
    84 
    85 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/scalarfield_algebra.pyc in _element_constructor_(self, coord_expression, chart, name, latex_name)
    86     470                                       coord_expression=coord_expression,
    87     471                                       name=name, latex_name=latex_name,
    88 --> 472                                       chart=chart)
    89     473         return resu
    90     474
    91 
    92 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/differentiable/scalarfield.pyc in __init__(self, parent, coord_expression, chart, name, latex_name)
    93     630         """
    94     631         ScalarField.__init__(self, parent, coord_expression=coord_expression,
    95 --> 632                              chart=chart, name=name, latex_name=latex_name)
    96     633         self._tensor_type = (0,0)
    97     634
    98 
    99 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/scalarfield.pyc in __init__(self, parent, coord_expression, chart, name, latex_name)
    100    1101                         self._express[ch] = ch.function(coord_expression)
    101    1102                 else:
    102 -> 1103                     self._express[chart] = chart.function(coord_expression)
    103    1104         self._init_derived()   # initialization of derived quantities
    104    1105
    105 
    106 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/chart.pyc in function(self, expression, calc_method, expansion_symbol, order)
    107    1087         return parent.element_class(parent, expression, calc_method=calc_method,
    108    1088                                     expansion_symbol=expansion_symbol,
    109 -> 1089                                     order=order)
    110    1090
    111    1091     def zero_function(self):
    112 
    113 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/chart_func.pyc in __init__(self, parent, expression, calc_method, expansion_symbol, order)
    114     360                 calc_method = self._calc_method._current
    115     361             self._express[calc_method] = self._calc_method._tranf[calc_method](
    116 --> 362                                                                     expression)
    117     363         # Derived quantities:
    118     364         self._der = None  # list of partial derivatives (to be set by diff()
    119 
    120 /home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/manifolds/calculus_method.pyc in _Sympy_to_SR(expression)
    121     106         # If SR cannot transform a sympy expression this is because it is a
    122     107         # sympy abstract function
    123 --> 108         a = expression._sage_()
    124     109         # As all sage objects have a ._sage_ operator, they have to be
    125     110         # catched
    126 
    127 AttributeError: 'list' object has no attribute '_sage_'
    128 }}}
    129 
    130 instead of a simple "False".
     1This ticket is a duplicate of https://trac.sagemath.org/ticket/27658.