Opened 2 years ago

Closed 2 years ago

#30267 closed defect (fixed)

Coercion via restriction of chart functions

Reported by: Michael Jung Owned by:
Priority: major Milestone: sage-9.2
Component: manifolds Keywords:
Cc: Eric Gourgoulhon, Travis Scrimshaw Merged in:
Authors: Michael Jung Reviewers: Travis Scrimshaw, Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: d494bbd (Commits, GitHub, GitLab) Commit: d494bbd912c42ca2386664c597b15de117dd52a9
Dependencies: Stopgaps:

Status badges

Description

At this stage, scalar fields (and tensor fields) support coercions via restrictions:

sage: M = Manifold(2, 'M')
sage: c.<x,y> = M.chart()
sage: D = M.open_subset('D')
sage: A = M.scalar_field_algebra(); A_D = D.scalar_field_algebra()
sage: A_D.has_coerce_map_from(A)
True

But the chart function ring does not support that coercion, even for derived charts:

sage: c_D = c.restrict(D, x^2+y^2<1)
sage: R = c.function_ring(); R_D = c_D.function_ring()
sage: R_D.has_coerce_map_from(R)
False

Consequently, this should be treated the same way as scalar fields since chart functions are the very foundation of scalar fields.

I suggest we add that coercion in case one chart (here c_D) is the restriction of the other (here c).

Change History (10)

comment:1 Changed 2 years ago by Michael Jung

Authors: Michael Jung
Status: newneeds_review

comment:2 Changed 2 years ago by Michael Jung

Branch: u/gh-mjungmath/coercion_via_restriction_of_chart_functions

comment:3 Changed 2 years ago by git

Commit: 4bcd2eeb367909eef66de8f0390f4fa7abea22c9

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

4bcd2eeTrac #30267: coercion via restriction added

comment:4 Changed 2 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

LGTM.

comment:5 Changed 2 years ago by Michael Jung

Thanks.

comment:6 Changed 2 years ago by Eric Gourgoulhon

Thanks for this ticket. May I suggest to correct a typo:

-    The ring of all chart function w.r.t. to a chart::
+    The ring of all chart functions w.r.t. to a chart::

comment:7 Changed 2 years ago by git

Commit: 4bcd2eeb367909eef66de8f0390f4fa7abea22c9d494bbd912c42ca2386664c597b15de117dd52a9
Status: positive_reviewneeds_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

d494bbdTrac #30267: docstring typo fixed

comment:8 in reply to:  6 Changed 2 years ago by Michael Jung

Replying to egourgoulhon:

Thanks for this ticket. May I suggest to correct a typo:

-    The ring of all chart function w.r.t. to a chart::
+    The ring of all chart functions w.r.t. to a chart::

Done. Thank you.

comment:9 Changed 2 years ago by Travis Scrimshaw

Reviewers: Travis ScrimshawTravis Scrimshaw, Eric Gourgoulhon
Status: needs_reviewpositive_review

comment:10 Changed 2 years ago by Volker Braun

Branch: u/gh-mjungmath/coercion_via_restriction_of_chart_functionsd494bbd912c42ca2386664c597b15de117dd52a9
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.