Opened 7 months ago
Closed 7 months ago
#30267 closed defect (fixed)
Coercion via restriction of chart functions
Reported by: | gh-mjungmath | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.2 |
Component: | manifolds | Keywords: | |
Cc: | egourgoulhon, tscrim | 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: |
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 7 months ago by
- Status changed from new to needs_review
comment:2 Changed 7 months ago by
- Branch set to u/gh-mjungmath/coercion_via_restriction_of_chart_functions
comment:3 Changed 7 months ago by
- Commit set to 4bcd2eeb367909eef66de8f0390f4fa7abea22c9
comment:4 Changed 7 months ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
LGTM.
comment:5 Changed 7 months ago by
Thanks.
comment:6 follow-up: ↓ 8 Changed 7 months ago by
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 7 months ago by
- Commit changed from 4bcd2eeb367909eef66de8f0390f4fa7abea22c9 to d494bbd912c42ca2386664c597b15de117dd52a9
- Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
d494bbd | Trac #30267: docstring typo fixed
|
comment:8 in reply to: ↑ 6 Changed 7 months ago by
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 7 months ago by
- Reviewers changed from Travis Scrimshaw to Travis Scrimshaw, Eric Gourgoulhon
- Status changed from needs_review to positive_review
comment:10 Changed 7 months ago by
- Branch changed from u/gh-mjungmath/coercion_via_restriction_of_chart_functions to d494bbd912c42ca2386664c597b15de117dd52a9
- Resolution set to fixed
- Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Trac #30267: coercion via restriction added