Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifold.options.omit_function_arguments ineffective for arguments not in alphabetic order #33957

Closed
egourgoulhon opened this issue Jun 5, 2022 · 11 comments

Comments

@egourgoulhon
Copy link
Member

In Sage 9.7.beta1, we have

sage: S.<theta, phi> = manifolds.Sphere(2, coordinates='spherical')
sage: F = S.scalar_field(function('f')(theta, phi) + function('g')(theta))
sage: F.display()
S^2 → ℝ
on A: (theta, phi) ↦ f(theta, phi) + g(theta)

So far, so good, but

sage: S.options.omit_function_arguments = True
sage: F.display()
S^2 → ℝ
on A: (theta, phi) ↦ f(theta, phi) + g

The r.h.s. should be f + g.

This bug is actually triggered by the following feature/bug of symbolic expressions:

sage: function('f')(theta, phi).arguments()
(phi, theta)

i.e. arguments() returns the arguments sorted according to the alphabetical order, as reported in https://groups.google.com/g/sage-devel/c/Gt6GWZU-cI4/. See also #32227.

Component: manifolds

Keywords: omit_function_arguments

Author: Utkarsh Sharma

Branch/Commit: 6dc5953

Reviewer: Eric Gourgoulhon

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

@egourgoulhon egourgoulhon added this to the sage-9.7 milestone Jun 5, 2022
@utkarsh314
Copy link

Commit: 6a6309a

@utkarsh314
Copy link

New commits:

6a6309afixed Manifold.options.omit_function_arguments bug

@utkarsh314
Copy link

@utkarsh314
Copy link

Author: Utkarsh Sharma

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2022

Changed commit from 6a6309a to 830bc8b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

830bc8bfix whitespace

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2022

Changed commit from 830bc8b to 6dc5953

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

6dc5953fix regex

@egourgoulhon
Copy link
Member Author

comment:5

Thanks for the fix! LGTM.

@egourgoulhon
Copy link
Member Author

Reviewer: Eric Gourgoulhon

@vbraun
Copy link
Member

vbraun commented Jun 28, 2022

Changed branch from u/gh-utkarsh314/omit_function_arguments to 6dc5953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants