-
-
Notifications
You must be signed in to change notification settings - Fork 701
Closed
Milestone
Description
In Sage 9.1, we have
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: f = X.function(x^2*y)
sage: f.diff(x)
2*x*y
sage: diff(f, x)
...
NotImplementedError:
Similarly, if one tries to apply diff to get the exterior derivative of a differentiable form, one gets an error:
sage: a = M.one_form(-y, x)
sage: a.display()
-y dx + x dy
sage: diff(a)
...
TypeError: unable to convert 1-form on the 2-dimensional differentiable manifold M to a symbolic expression
With the code implemented in this ticket, we get
sage: diff(f, x)
2*x*y
sage: type(diff(f,x))
<class 'sage.manifolds.chart_func.ChartFunctionRing_with_category.element_class'>
and
sage: diff(a)
2-form on the 2-dimensional differentiable manifold M
sage: diff(a).display()
2 dx/\dy
sage: diff(a) is a.exterior_derivative()
True
To achieve this, the modification of the code reduces to
- rename
ChartFunction.difftoChartFunction.derivative, makingdiffan alias for the methodderivative - add the alias
derivativefor the methodDiffForm.exterior_derivative - add the alias
derivativefor the methodDiffScalarField.differential
CC: @tscrim
Component: geometry
Author: Eric Gourgoulhon
Branch/Commit: f5b9831
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/29953