On Jun 6, 2008, at 10:00 AM, John Cremona wrote:
> 2008/6/6 Nick Alexander <[EMAIL PROTECTED]>:
>>
>>> This thread got slightly off topic to the original question though:
>>> where should sqrt(2) belong? Z[sqrt(2)], SR, or somewhere else?
>>
>> I always want my data to start as close to the initi
2008/6/6 Nick Alexander <[EMAIL PROTECTED]>:
>
>> This thread got slightly off topic to the original question though:
>> where should sqrt(2) belong? Z[sqrt(2)], SR, or somewhere else?
>
> I always want my data to start as close to the initial object as
> possible. In this case, Z[sqrt(2)] \into
On Thu, Jun 5, 2008 at 6:39 PM, Carl Witty wrote:
>
> OK, I'm convinced that unifying parents and types is elegant and
> works very well in Aldor, and that it's possible in Python. However,
> I don't think it's a good idea for Sage, because of pragmatic
> limitations due to Python/Cython. These
> This thread got slightly off topic to the original question though:
> where should sqrt(2) belong? Z[sqrt(2)], SR, or somewhere else?
I always want my data to start as close to the initial object as
possible. In this case, Z[sqrt(2)] \into SR and not vice versa -- so
sqrt(2) should be in Z
On Jun 5, 2008, at 3:39 PM, Carl Witty wrote:
> On Jun 5, 12:37 pm, "Bill Page" <[EMAIL PROTECTED]> wrote:
>> The point I am making is that Python already has everything you need
>> to implement the concept of the "parent" of an element as a type,
>> i.e.
>> directly as an instance of the class
On 6/5/08, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Thu, Jun 5, 2008 at 1:18 PM, William Stein wrote:
> > OK, I have to come clean and admit that already actually knew
> > all about metaclasses, but considered using them this way so
> > unnatural and ugly that I would not recommend it.
> >
On Jun 5, 12:37 pm, "Bill Page" <[EMAIL PROTECTED]> wrote:
> The point I am making is that Python already has everything you need
> to implement the concept of the "parent" of an element as a type, i.e.
> directly as an instance of the class that creates it. This could
> result in considerable sim
On Thu, Jun 5, 2008 at 5:19 PM, Robert Bradshaw wrote:
>
> Your Integer object also stands for the ring of Integers. So can
> you do stuff like
>
> sage: ZZ.is_commutative()
> True
> sage: ZZ.krull_dimension()
> 1
> sage: ZZ.is_finite()
> False
>
(1) -> Integer has Finite
(1) false
On Jun 5, 2008, at 1:36 PM, Bill Page wrote:
> On Thu, Jun 5, 2008 at 4:16 AM, Robert Bradshaw wrote:
>>
>> On Jun 4, 2008, at 7:35 PM, Bill Page wrote:
>> ...
>> Types are all about the implementations of things, they
>> synonymous with the "classes" of Object Oriented programming,
>> and are in
On Thu, Jun 5, 2008 at 4:16 AM, Robert Bradshaw wrote:
>
> On Jun 4, 2008, at 7:35 PM, Bill Page wrote:
> ...
> Types are all about the implementations of things, they
> synonymous with the "classes" of Object Oriented programming,
> and are insufficient (and the wrong vehicle) to carry deeper
> m
On Jun 5, 2008, at 12:37 PM, Bill Page wrote:
> On Thu, Jun 5, 2008 at 1:18 PM, William Stein wrote:
>> ...
>> On Thu, Jun 5, 2008 at 12:23 PM, Gonzalo Tornaria wrote:
>> ...
>>> sage: def classinteger(m):
>>> ... class A:
>>> ... def __init__(self, n):
>>> ... self.__n = n % m
>>> sage: def classinteger(m):
>>> ... class A:
>>> ... def __init__(self, n):
>>> ... self.__n = n % m
>>> ... def __repr__(self):
>>> ... return "%d mod %d" % (self.__n, m)
>>> ... A.__name__ = "classintegers mod %d" % m
>>> ... return A
>>> sage: classin
On Thu, Jun 5, 2008 at 1:18 PM, William Stein wrote:
> ...
> On Thu, Jun 5, 2008 at 12:23 PM, Gonzalo Tornaria wrote:
> ...
>> sage: def classinteger(m):
>> ... class A:
>> ... def __init__(self, n):
>> ... self.__n = n % m
>> ... def __repr__(self):
>> ... return
On Thu, Jun 5, 2008 at 9:23 AM, Gonzalo Tornaria
<[EMAIL PROTECTED]> wrote:
>
>> > Python classes can also take parameters.
>>
>>
>> I didn't know that. I thought the only way to create a Python class
>> is for the Python interpreter to execute Python code that looks like this:
>>
>> class Foo
On Thu, Jun 5, 2008 at 12:23 PM, Gonzalo Tornaria wrote:
> On Thu, Jun 5, 2008 at 1:47 AM, William Stein wrote:
>> ... How are you going to make, at
>> runtime, new classes for each of Z/nZ say, for 1 <= n < 10^5,
>> i.e., something like this in Sage:
>>
>> v = [Integers(n) for n in range(1,10^
On Thu, Jun 5, 2008 at 1:47 AM, William Stein wrote:
>
> On Wed, Jun 4, 2008 at 10:16 PM, Bill Page wrote:
>> ...
>> Python classes can also take parameters.
>
> I didn't know that. I thought the only way to create a Python class
> is for the Python interpreter to execute Python code that looks l
> > Python classes can also take parameters.
>
>
> I didn't know that. I thought the only way to create a Python class
> is for the Python interpreter to execute Python code that looks like this:
>
> class Foo(...):
> ...
>
> That makes a new class called Foo. How are you going to make,
On Jun 4, 2008, at 7:35 PM, Bill Page wrote:
> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>>
>> On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
>> ...
>>>
>>> These seem consistent to me, albeit rather complex. However I am
>>> not sure I understand the following:
>>>
>>> sage: parent(In
On Wed, Jun 4, 2008 at 10:16 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 4, 2008 at 11:06 PM, William Stein wrote:
>>
>> On Wed, Jun 4, 2008 at 7:35 PM, Bill Page wrote:
>>>
>>> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
David's explanation of this is right on. W
On Wed, Jun 4, 2008 at 11:06 PM, William Stein wrote:
>
> On Wed, Jun 4, 2008 at 7:35 PM, Bill Page wrote:
>>
>> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>>>
>>> David's explanation of this is right on. We need parent() to work
>>> in some sensible way on non-Elements (e.g. Python in
On Wed, Jun 4, 2008 at 7:35 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>>
>> On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
>> ...
>>>
>>> These seem consistent to me, albeit rather complex. However I am
>>> not sure I understand the following
On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>
> On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
> ...
>>
>> These seem consistent to me, albeit rather complex. However I am
>> not sure I understand the following:
>>
>> sage: parent(IntegerRing())
>>
>> sage: parent(RealField())
>>
>>
>>
On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
> Robert,
>
> Thanks for the elaboration. I hope that this follow-up is not too far
> off topic and I don't want to distract you (or any of the Sage
> developers) from your main tasks. I wrote this mostly as notes and
> questions to myself - but if yo
On Jun 4, 2008, at 1:32 AM, John Cremona wrote:
> 2008/6/4 Robert Bradshaw <[EMAIL PROTECTED]>:
>
>> But right now we've already got enough on our plate trying to get the
>> changes we have pushed through. (Any help on this front would be
>> greatly appreciated.)
>
> Robert,
>
> Can you be more s
On Jun 4, 2008, at 7:07 AM, Bill Page wrote:
> Ok (and thanks also for the clarification, David). There are of course
> two different uses of "object" here: 1) object of some category, 2)
> Python object. All Python objects have a 'type', i.e. belong to some
> Python class.
>
> So in Sage 3.0.2
Robert,
Thanks for the elaboration. I hope that this follow-up is not too far
off topic and I don't want to distract you (or any of the Sage
developers) from your main tasks. I wrote this mostly as notes and
questions to myself - but if you or anyone else have some time or the
inclination to cor
2008/6/4 Robert Bradshaw <[EMAIL PROTECTED]>:
> But right now we've already got enough on our plate trying to get the
> changes we have pushed through. (Any help on this front would be
> greatly appreciated.)
Robert,
Can you be more specific about how others can help with this?
John
> >
>
--
On Jun 3, 2008, at 7:11 PM, David Harvey wrote:
> On Jun 3, 2008, at 10:04 PM, Robert Bradshaw wrote:
>
>>> How does it related to the
>>> concept of "parent" - which seems equally ill-defined to me?
>>
>> A Parent is an Object in the category of Sets,
>
> huh? Don't you mean to say something mor
On Jun 3, 2008, at 10:04 PM, Robert Bradshaw wrote:
>> How does it related to the
>> concept of "parent" - which seems equally ill-defined to me?
>
> A Parent is an Object in the category of Sets,
huh? Don't you mean to say something more like "a parent is an object
of a concrete category", i
On Jun 3, 2008, at 4:50 PM, Bill Page wrote:
>
> On Tue, Jun 3, 2008 at 5:48 PM, William Stein wrote:
>>
>> On Tue, Jun 3, 2008 at 2:45 PM, Bill Page wrote:
>>>
>>> On Tue, Jun 3, 2008 at 4:48 PM, Robert Bradshaw wrote:
On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
...
> I c
On Tue, Jun 3, 2008 at 7:21 PM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
> On Jun 3, 2008, at 4:36 PM, Gary Furnish wrote:
>>>
>>> That depends on what they are being used for, but categories lend
>>> themselves very naturally to multiple inheritance because of what
>>> they are mathematically
On Jun 3, 2008, at 4:36 PM, Gary Furnish wrote:
>>
>> That depends on what they are being used for, but categories lend
>> themselves very naturally to multiple inheritance because of what
>> they are mathematically. I understand wanting, .e.g., arithmetic to
>> be super fast, but I don't see the
On Jun 4, 12:39 am, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
Hi,
> > If coercion was implemented with 100% pure Cython code (with an eye
> > for speed where it is needed),
>
> The critical path for doing arithmetic between elements is 100% pure
> Cython code. The path for discovering coe
On Tue, Jun 3, 2008 at 5:48 PM, William Stein wrote:
>
> On Tue, Jun 3, 2008 at 2:45 PM, Bill Page wrote:
>>
>> On Tue, Jun 3, 2008 at 4:48 PM, Robert Bradshaw wrote:
>>>
>>> On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
>>> ...
I consider homsets to be a gigantic flaw in coercion that
>>>
On Tue, Jun 3, 2008 at 4:39 PM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
> On Jun 3, 2008, at 3:08 PM, Gary Furnish wrote:
>
>>
>> On Tue, Jun 3, 2008 at 2:48 PM, Robert Bradshaw
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> When a new morphism is created it needs a parent, which is a Homset
>>> that
>> One may be able to eek out a bit more performance by doing this, but
>> it's not as if performance is awful in the current model.
>>
> For the things you do. There is no code that pushes the coercion
> system anywhere near as much as symbolics in Sage does.
Please explain why the symbolics co
On Jun 3, 2008, at 3:08 PM, Gary Furnish wrote:
>
> On Tue, Jun 3, 2008 at 2:48 PM, Robert Bradshaw
> <[EMAIL PROTECTED]> wrote:
>>
>> When a new morphism is created it needs a parent, which is a Homset
>> that may be looked up/created at that time. This is probably what you
>> are talking about.
On Tue, Jun 3, 2008 at 2:48 PM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
> On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
>
>> On Tue, Jun 3, 2008 at 12:11 PM, Robert Bradshaw
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> On Jun 3, 2008, at 11:06 AM, Gary Furnish wrote:
>>>
I think we had a dis
On Tue, Jun 3, 2008 at 2:45 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Tue, Jun 3, 2008 at 4:48 PM, Robert Bradshaw wrote:
>>
>> On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
>> ...
>>> I consider homsets to be a gigantic flaw in coercion that
>>> absolutely have to be fixed for me to cons
On Tue, Jun 3, 2008 at 4:48 PM, Robert Bradshaw wrote:
>
> On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
> ...
>> I consider homsets to be a gigantic flaw in coercion that
>> absolutely have to be fixed for me to consider using more
>> of the coercion system in symbolics.
>
> Ironically, other
On Jun 3, 2008, at 11:17 AM, Gary Furnish wrote:
> On Tue, Jun 3, 2008 at 12:11 PM, Robert Bradshaw
> <[EMAIL PROTECTED]> wrote:
>>
>> On Jun 3, 2008, at 11:06 AM, Gary Furnish wrote:
>>
>>> I think we had a discussion on irc about how homsets still got used
>>> for determining the result of some
On Tue, Jun 3, 2008 at 12:11 PM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
> On Jun 3, 2008, at 11:06 AM, Gary Furnish wrote:
>
>> I think we had a discussion on irc about how homsets still got used
>> for determining the result of something in parent1 op something in
>> parent2 (maybe it was w
On Jun 3, 2008, at 11:06 AM, Gary Furnish wrote:
> I think we had a discussion on irc about how homsets still got used
> for determining the result of something in parent1 op something in
> parent2 (maybe it was with someone else?)
I sure hope not. If so, that needs to change (but I'm pretty sur
I think we had a discussion on irc about how homsets still got used
for determining the result of something in parent1 op something in
parent2 (maybe it was with someone else?) I'm also -1 for hard-coding
knowledge and logic about ZZ,QQ, etc into the coercion model. I am +1
for hardcoding it int
On Jun 3, 2008, at 7:13 AM, Gary Furnish wrote:
>>> As long as there are classes in pure python that use MI on the
>>> critical path that symbolics has to use, the argument that coercion
>>> was written to be fast makes no sense to me.
>>
>> Not sure what you mean by "MI" here, could you explain.
On Tue, Jun 3, 2008 at 7:13 AM, Gary Furnish <[EMAIL PROTECTED]> wrote:
> The average calculus student coming from maple is not going to
> understand why he can't perform a sum of the sqrt of some primes. If
> we are to be a viable alternative for non-research mathematicians we
> can't run off an
On Tue, Jun 3, 2008 at 2:34 AM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
> On Jun 3, 2008, at 12:09 AM, Gary Furnish wrote:
>
>>
>> On Mon, Jun 2, 2008 at 11:41 PM, Robert Bradshaw
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> On Jun 2, 2008, at 12:55 PM, William Stein wrote:
>>>
On Mon, Jun 2, 2
>Maple does
>
> > 1/(1+I);
> 1/2 - 1/2 I
Axiom does
1/(1+%i)
1
--
1 + %i
which is of type Fraction Complex Integer, that is a fraction
whose numerator and denominator are of type Complex(Integer).
You can ask Axiom to place the result i
On Jun 3, 2008, at 1:37 AM, John Cremona wrote:
> MI = Multiple Inheritance?
That's the only thing I can think of, but there isn't any of that in
the coercion model...
- Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups
MI = Multiple Inheritance?
2008/6/3 Robert Bradshaw <[EMAIL PROTECTED]>:
>
> On Jun 3, 2008, at 12:09 AM, Gary Furnish wrote:
>
>>
>> On Mon, Jun 2, 2008 at 11:41 PM, Robert Bradshaw
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> On Jun 2, 2008, at 12:55 PM, William Stein wrote:
>>>
On Mon, Jun 2, 20
On Jun 3, 2008, at 12:09 AM, Gary Furnish wrote:
>
> On Mon, Jun 2, 2008 at 11:41 PM, Robert Bradshaw
> <[EMAIL PROTECTED]> wrote:
>>
>> On Jun 2, 2008, at 12:55 PM, William Stein wrote:
>>
>>> On Mon, Jun 2, 2008 at 12:53 PM, Gary Furnish
>>> <[EMAIL PROTECTED]> wrote:
-1. First, every
51 matches
Mail list logo