Ask Your Question

function vs expression

asked 2021-08-29 14:55:38 +0100

eyal gravatar image

Hi there,

Is there a difference between, e.g.,





In the literature the first is considered to be an expression while the other is a function, but checking their types gives

<class 'sage.symbolic.expression.Expression'>

in both cases.

edit retag flag offensive close merge delete


Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2021-08-29 19:33:49 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-29 15:53:33 +0100

tmonteil gravatar image

You should check their parent:

sage: g.parent()
Symbolic Ring

sage: f.parent()
Callable function ring with argument x

sage: f(x).parent()
Symbolic Ring
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-08-29 14:55:38 +0100

Seen: 157 times

Last updated: Aug 29 '21