Skip to content

Wrong parent when using diff_form of degree zero #29570

@mjungmath

Description

@mjungmath
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: M.diff_form(0).parent()
Free module X(M) of vector fields on the 2-dimensional differentiable manifold M

This output is obviously wrong. The parent should represent the algebra of scalar fields instead. However, the element is correct:

sage: M.diff_form(0)
Scalar field on the 2-dimensional differentiable manifold M

While seeking the origin, I have encountered an issue even worse:

from sage.tensor.modules.finite_rank_free_module import FiniteRankFreeModule

sage: M = FiniteRankFreeModule(QQ, 3)
sage: M.alternating_form(0)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
...
AttributeError: 'RationalField_with_category' object has no attribute 'element_class'

This should be fixed with this ticket.

CC: @egourgoulhon @tscrim

Component: geometry

Keywords: differential_forms

Author: Michael Jung

Branch/Commit: ba3b4b9

Reviewer: Eric Gourgoulhon, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/29570

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions