Skip to content

add a free_variables() method? #20179

Closed
Closed
@sagetrac-wonder

Description

@sagetrac-wonder

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions