[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Curiosities with Axiom mathematical structures
From: |
Martin Rubey |
Subject: |
Re: [Axiom-developer] Curiosities with Axiom mathematical structures |
Date: |
09 Mar 2006 15:46:14 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Ralf Hemmecke <address@hidden> writes:
> > Do you mean that passing operations to the categories would be a feasible
> > approach? I.e., being allowed to say something like
> > Monoid(m:(%,%)->%): Category == with
> > square: % -> %
> > add
> > square a == m(a,a)
>
> Martin, stop writing in SPAD. I thought you also agreed that new things have
> to
> be written in Aldor. And there you would to write the default implementation
> with "default" and not with "add". Otherwise there would be an anonymous
> domain
> "add {square ...}" inside a with clause.
Well, I'm not yet fluent in Aldor. I'm waiting for your talk at the Workshop...
> > Of course, one would have to rethink this several times, the suggested
> > notation
> > here is clearly not yet perfect. One might object that this notation
> > violates
> > the possibility of creating anonymous categories, but I suspect that this
> > wouldn't make sense anyway.
>
> Yes, one has to rethink that quite a lot. The problem with your suggestion is
> the following
>
> 1) You cannot simply ask
>
> Integer has Monoid
>
> because you have to give a parameter.
I wouldn't want to ask "Integer has Monoid", since this doesn't make any sense
to me. I'd like to ask "Integer has Monoid(Integer, *)" or
"Integer has Monoid(*)"
> 2) If you say something like
>
> MyMonoid(T: Type, m: (T, T) -> T): Category == with {
> square: T-> T;
> default {square(t: T): T == m(t, t)}
> }
>
> then it is perfect Aldor.
> Then, however, you ask
>
> Integer has MyMonoid(Integer, *)
>
> and it will return true only if you have said
>
> extend Integer: MyMonoid(Integer, *) == add;
>
> somewhere.
> (But probably you had something else in mind.)
So, in fact in Aldor we can solve the "problem"?
Monoid(T: Type, m: (T, T) -> T): Category == with {
square: T-> T;
default {square(t: T): T == m(t, t)}
}
Word: BasicType == add {
add {*(a: %, b: %):% == concat(a,b) }
extend Word: Monoid(Word, *) == add;
??? If this is the case, I know what I want!!!
> Although I don't really like that an AbelianMonoid is not a Monoid, and
> although I think that renaming during inheritance would be nearer to
> mathematics... after all the discussion here, I somehow think that the design
> in Axiom is not really bad. The reason is that I have not seen a clear case
> where renaming would be over-advantageous.
yes
> I'd like to say
>
> Integer has Monoid
>
> instead of
>
> Integer has Monoid(*, 1);
> Integer has Monoid(+, 0);
NOOO!
> Simply think of a category Foo with hundreds of exported function, would you
> like to write
>
> Dom has Foo(f1, f2, ..., f100)
no, but wait a moment: It is obvious to me that I don't want to have all
exported functions as parameters. Only certain "defining" functions, like:
Integer has Monoid(*, 1);
Integer has Ring(+, *, 1);
Can you think of an example where more than, say 5, parameters would be
desirable?
Martin
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, (continued)
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, William Sit, 2006/03/02
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Gabriel Dos Reis, 2006/03/02
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Martin Rubey, 2006/03/04
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Gabriel Dos Reis, 2006/03/03
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, William Sit, 2006/03/04
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Ralf Hemmecke, 2006/03/07
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, William Sit, 2006/03/07
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Martin Rubey, 2006/03/08
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Ralf Hemmecke, 2006/03/09
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures,
Martin Rubey <=
- [Axiom-developer] BINGO, Curiosities with Axiom mathematical structures, Martin Rubey, 2006/03/09
- Re: [Axiom-developer] BINGO,Curiosities with Axiom mathematical structures, William Sit, 2006/03/09
- Re: [Axiom-developer] BINGO, Curiosities with Axiom mathematical structures, Ralf Hemmecke, 2006/03/10
- Re: [Axiom-developer] BINGO,Curiosities with Axiom mathematical structures, William Sit, 2006/03/10
- Re: [Axiom-developer] BINGO, Curiosities with Axiom mathematical structures, Gabriel Dos Reis, 2006/03/13
- RE: [Axiom-developer] BINGO, Curiosities with Axiom mathematical structures, Bill Page, 2006/03/09
- Re: [Axiom-developer] BINGO,Curiosities with Axiom mathematical structures, William Sit, 2006/03/10
- Re: [Axiom-developer] BINGO, Curiosities with Axiom mathematical structures, Gabriel Dos Reis, 2006/03/13
- [Axiom-developer] Re: BINGO, Curiosities with Axiom mathematical structures, Martin Rubey, 2006/03/10
- Re: [Axiom-developer] Curiosities with Axiom mathematical structures, Ralf Hemmecke, 2006/03/09