Skip to content

Make desolve deduce the variable if you don't state it #8616

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

Open
sagetrac-yuri-k mannequin opened this issue Mar 27, 2010 · 13 comments
Open

Make desolve deduce the variable if you don't state it #8616

sagetrac-yuri-k mannequin opened this issue Mar 27, 2010 · 13 comments

Comments

@sagetrac-yuri-k
Copy link
Mannequin

sagetrac-yuri-k mannequin commented Mar 27, 2010

Provides autodetect dependent and independent variables in desolve(), desolve_laplace()

Additionally as module which helps to solve first problem provides unified interface for standard python types and sage specific types.
Treats everything as symbolic expression which allows to check its type, take
operator and operands and extract subexpressions by given types.

http://groups.google.com/group/sage-devel/browse_thread/thread/f2ba2198dc5b79ed

http://groups.google.com/group/sage-devel/browse_thread/thread/e04cbc547095f2ac

CC: @robert-marik @novoselt

Component: symbolics

Keywords: symbolic, type, subexpression

Author: Yuri Karadzhov

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

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Mar 27, 2010

symbolic sage module

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Mar 27, 2010

Attachment: trac_8616_symbolic_sage.patch.gz

symbolic sage module

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Mar 27, 2010

comment:2

Attachment: trac_8616_symbolic_sage.2.patch.gz

@sagetrac-yuri-k

This comment has been minimized.

@sagetrac-yuri-k sagetrac-yuri-k mannequin added this to the sage-4.4 milestone Mar 27, 2010
@robert-marik
Copy link
Mannequin

robert-marik mannequin commented Mar 28, 2010

Changed upstream from Reported upstream. Developers acknowledge bug. to none

@robert-marik
Copy link
Mannequin

robert-marik mannequin commented Mar 28, 2010

comment:5

Hm I have the following error after installing the patch

ImportError: No module named mtype
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

And there is no mtype.* file in sage/symmbolic in my Sage 4.3.4

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Mar 28, 2010

Attachment: trac_8616_symbolic_sage_correct.patch.gz

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Mar 29, 2010

Attachment: trac_8616_symbolic_sage_correct2.patch.gz

more precise autodetect of independent variable

@sagetrac-yuri-k

This comment has been minimized.

@sagetrac-yuri-k

This comment has been minimized.

@aghitza aghitza changed the title Symbolic type checking and expression parcing module Symbolic type checking and expression parsing module Apr 3, 2010
@robertwb
Copy link
Contributor

comment:10

Thank you for working on desolve, that module is in need of a lot of help. I'm really not seeing what mtype has to do with it though (and what does "mtype" mean? wtype, stype, ... are equally obscure). Also _ for a wildcard is very non-standard notation, perhaps "*.integer" would be better.

In any case, my main issue with this patch is that a huge list of isinstance statements is not the way to implement this--it's brittle and requires the module to know about everything in Sage. If we need an mtype (operator, ...), it should be done OO style, with tests just for a few of the builtin types (and even then it could be cleaner, using their names.

@sagetrac-yuri-k
Copy link
Mannequin Author

sagetrac-yuri-k mannequin commented Apr 10, 2010

comment:11

Replying to @robertwb:

Thank you for working on desolve, that module is in need of a lot of help. I'm really not seeing what mtype has to do with it though (and what does "mtype" mean? wtype, stype, ... are equally obscure). Also _ for a wildcard is very non-standard notation, perhaps "*.integer" would be better.

_ wildcard is used in scala. * is used for multiply operator. desolve module is really bad it is beter to completly rewrite it, but sage doesn't have enough functions to start doing it. mtype is the firs step. It helps to deal with symbolical expression.

In any case, my main issue with this patch is that a huge list of isinstance statements is not the way to implement this--it's brittle and requires the module to know about everything in Sage. If we need an mtype (operator, ...), it should be done OO style, with tests just for a few of the builtin types (and even then it could be cleaner, using their names.

I absolutely agree with you. It is much better to have class hierarchy or at least some common interface which can help to define type. And wraps or mixins should be used for Python types. But I did mtype class to concentrate attention on existing problem - sage is almost useless for complex symbolical computations (it is my opinion as well as opinion of my colleagues) It is hard for people who are new to python. You shouldn't use mtype, but it is good to do smth about this problem in sage.

I made sketch to solve some simple de problems I write some common functions in mtype, which can be easily rewritten to extract only diff operators. So just use it if you want to.

I finished with sage for this year, now I need to do smth real. I'm sorry I can't afford to spend some more time to finish this improvements.

@kcrisman
Copy link
Member

comment:12

Changing title to more accurately reflect what it's about.

@kcrisman kcrisman changed the title Symbolic type checking and expression parsing module Make desolve deduce the variable if you don't state it Jun 14, 2011
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin removed this from the sage-6.3 milestone Aug 10, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin added this to the sage-6.4 milestone Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
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

5 participants