Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-10 Thread Matthieu Dien
Hello Ted,

Is this solver works only for systems of linear equations ?
If it is the case, why do you need an AI ? Is a standard Gauss algorithm
not sufficient ?

Cheers

Matthieu


2016-10-09 20:40 GMT+02:00 David Joyner :

> On Sun, Oct 9, 2016 at 2:20 PM, Ted Kosan  wrote:
> > David wrote:
> >
> >> I think a graphical version of this would be useful as a sage-based
> >> online high school math tutorial program, such as the khan academy
> >> algebra modules.
> >
> > Are either of the following examples close to what you have in mind?:
> >
> > http://data.ssucet.org/temp/solve_steps_example.png
> >
>
> This doesn't seem to have anything.
>
> > https://www.youtube.com/watch?v=cy6bwNBkAK0
> >
>
> Not quite. I'm just talking about an automated system to help a create
> student hint (like webassign has). A student goes through a khan
> academy assignment, gets stuck, and they click a "help" button (which
> would then call your program to create a series of graphics) to see
> how a similar problem is solved step-by-step.
>
> > Ted
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to sage-devel+unsubscr...@googlegroups.com.
> > To post to this group, send email to sage-devel@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sage-devel.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Implementation of formal multivariate power series

2013-06-08 Thread matthieu . dien
Hello,

If i understood the Sage's developer guide, this is the place to propose 
new features.
So, my name is Matthieu Dien, I am student in first year of master. During 
this year, with Marguerite Zamansky, we develop an implementation of formal 
multivariate power series (based on LazyPowerSeries) in order to provide a 
future implementation of 
Gfunhttp://perso.ens-lyon.fr/bruno.salvy/?page_id=48features (in a 
multivariate way) for Sage.
Currently, there is only basic operator on formal multivariate power series 
: addition, subtraction, multiplication, derivation, composition of series 
and the sequence operator.
I precise that the implementation is really naive. 
The next step should be the computing of the recurrence equation of a 
series' term.
So, I join you the class (and some examples). You can test and make comment 
about it.
If some people are interested by this and want to talk about it, I will be 
here at Sage days.

Regards

Matthieu Dien


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Formal Multivariate Power Series

This files provides an implementation of Formal Multivariate Power
Series. The implementation is based on the LazyPowerSeriesRing and
LazyPowerSeries class. The internal data structure uses the stream class where
each case is a list of term of the same total degree. The terms are represented
by a 2-tuple with a coefficient from the base ring and a list of integer of
the same length that the number of variable, which is the monomonial
associated to the coefficient in the serie.
The mecanism is the same that for the Lazy Power Series.


This code is based on the work of Ralf Hemmecke and Martin Rubey's, developed
by Marguerite Zamansky and Matthieu Dien.

#*
#   Copyright (C) 2013 Matthieu Dien matthieu.d...@gmail.com, 
#
#  Distributed under the terms of the GNU General Public License (GPL)
#
#This code is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#General Public License for more details.
#
#  The full text of the GPL is available at:
#
#  http://www.gnu.org/licenses/
#*


from series import LazyPowerSeriesRing, LazyPowerSeries, uninitialized

from stream import Stream, Stream_class
from series_order import  bounded_decrement, increment, inf, unk
from sage.rings.all import Integer, prod
from functools import partial
from sage.misc.misc import repr_lincomb, is_iterator

from sage.algebras.algebra import Algebra
from sage.algebras.algebra_element import AlgebraElement
import sage.structure.parent_base
from sage.categories.all import Rings


class FormalMultivariatePowerSeriesRing(LazyPowerSeriesRing):

def __init__(self, R, element_class = None, names = None):
#Make sure R is a ring with unit element
if not R in Rings():
raise TypeError, Argument R must be a ring.
try:
z = R(Integer(1))
except StandardError:
raise ValueError, R must have a unit element

#Take care of the names
if names is None:
names = ['z']

self._ngens = len(names)
self._element_class = element_class if element_class is not None else FormalMultivariatePowerSeries
self._order = None
self._names = names
self._gens = [None]*self._ngens

#TODO : LazyPowerSeriesRing herits from Algebra that use old style parent class
sage.structure.parent_base.ParentWithBase.__init__(self, R)

def ngens(self):

EXAMPLES::

sage: R.u,v,w,z = FormalMultivariatePowerSeriesRing(QQ)
sage: R.ngens()
4

return self._ngens

def gen(self,i=0):

EXAMPLES::

sage: R.u,v,w,z = FormalMultivariatePowerSeriesRing(QQ)
sage: R.gen(2)
w

TESTS::

sage: R.u,v,w,z = FormalMultivariatePowerSeriesRing(QQ)
sage: R.gen(4)
Traceback (most recent call last):
...
ValueError: Generator not defined


if i  0 or i = self._ngens:
raise ValueError(Generator not defined)
if self._gens[i] == None :
self._gens[i] = self.term(1,[int(j==i) for j in range(self