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

add a free_variables() method? #20179

Closed
sagetrac-wonder mannequin opened this issue Mar 8, 2016 · 15 comments
Closed

add a free_variables() method? #20179

sagetrac-wonder mannequin opened this issue Mar 8, 2016 · 15 comments

Comments

@sagetrac-wonder
Copy link
Mannequin

sagetrac-wonder mannequin commented Mar 8, 2016

It can be useful to query the free variables in an expression. SR's variables() and arguments() return all variables in an expression, whether free or bound. For example:

sage: var('y')
y
sage: function('f')
f
sage: e = limit( f(x,y), x=0 )
sage: e
limit(f(x, y), x, 0)
sage: e.variables()
(x, y)

I would like to have a free_variables() method that returns only y in this case. Is there a recommended way to get this information from an expression?

Depends on #22844
Depends on #23134

CC: @EmmanuelCharpentier

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 5b93a06

Reviewer: Travis Scrimshaw

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

@sagetrac-wonder sagetrac-wonder mannequin added this to the sage-7.1 milestone Mar 8, 2016
@rwst
Copy link
Contributor

rwst commented Mar 28, 2016

comment:1

These are practically all variables, minus the one(s) the limit is over?

@sagetrac-wonder
Copy link
Mannequin Author

sagetrac-wonder mannequin commented Mar 28, 2016

comment:2

The free variables in an expression are all its variables excluding any that are bound, for example, in limits, sums, products, or integrals.

See for example https://en.wikipedia.org/wiki/Free_variables_and_bound_variables for a definition.

@rwst
Copy link
Contributor

rwst commented Feb 23, 2017

comment:3

Implemented in pynac git master. Will be in the upcoming Pynac-0.7.6.

@rwst
Copy link
Contributor

rwst commented Apr 20, 2017

Branch: u/rws/add_a_free_variables___method_

@rwst
Copy link
Contributor

rwst commented Apr 20, 2017

comment:5

This is not ready for review because it doesn't work as expected but at least the interface is there now.


New commits:

3c848da22838: pkg version/checksum
d89e6d022838: remove unnecessary patch
4a3011922838: interface change
7d3fd6022838: doctest adaptation to ticket 10070
5b93a0620179: interface to Pynac's ex::free_symbols()

@rwst
Copy link
Contributor

rwst commented Apr 20, 2017

Commit: 5b93a06

@rwst
Copy link
Contributor

rwst commented Apr 20, 2017

Author: Ralf Stephan

@rwst rwst modified the milestones: sage-7.1, sage-8.0 Apr 20, 2017
@rwst
Copy link
Contributor

rwst commented Apr 20, 2017

Dependencies: #22844

@rwst
Copy link
Contributor

rwst commented May 25, 2017

Changed dependencies from #22844 to #22844, pynac-0.7.8

@rwst
Copy link
Contributor

rwst commented May 25, 2017

comment:8

The problems seem resolved, now that there is a symbolic limit, and code in Pynac master that recognizes it and its bound symbols.

@rwst
Copy link
Contributor

rwst commented Jun 3, 2017

Changed dependencies from #22844, pynac-0.7.8 to #22844, #23134

@tscrim
Copy link
Collaborator

tscrim commented Jun 3, 2017

comment:10

Is this ready for review? If so, then you can set it to positive review on my behalf.

@tscrim
Copy link
Collaborator

tscrim commented Jun 3, 2017

Reviewer: Travis Scrimshaw

@rwst
Copy link
Contributor

rwst commented Jun 4, 2017

comment:11

Yes, I usually wait until the merge of the Pynac upgrade because not all reviewers want to go through the hassle of manual Pynac install. Thanks.

@vbraun
Copy link
Member

vbraun commented Jun 22, 2017

Changed branch from u/rws/add_a_free_variables___method_ to 5b93a06

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