[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex do
From: |
Martin Rubey |
Subject: |
[Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains. |
Date: |
17 May 2006 10:24:13 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
"Christian Aistleitner" <address@hidden> writes:
> Hello Martin,
>
> On Tue, 16 May 2006 10:13:17 +0200, Martin Rubey
> <address@hidden> wrote:
>
> > Where does it say that Dom(x) and Dom(y) should be the same, even if x
> > and y
> > are equal in some sense?
I should have been more precise: with "equal in some sense" I meant "not
exactly equal". In german it is easier: I meant "nicht dasselbe sondern nur das
gleiche".
> I guess nowhere. But typically, you'd expect it.
if x and y are "dasselbe" yes, otherwise no.
>
> Consider
> a: List Integer := [ 1 ];
> b: List Integer := [ 2 ];
> you want to be able to call append!( a, b ), won't you?
yes, since (eq Integer Integer)
> But actually, you invoke the function List two times. Each time with the same
> argument (namely Integer). If calling a function two times with the same
> argument yields the same (not the equivalent, but really the same) result, we
> call it "functional" in the discussion. Otherwise, we call it non
> functional. Just as with (functional) relations.
OK, I see now. It could be -- in the non functional setting -- that
a: NonFunctionalDomainConstructor Integer := something
b: NonFunctionalDomainConstructor Integer := otherthing
and NonFunctionalDomainConstructor exports an operation f(%, %), but I still
*shouldn't* be able to call f(a, b), since a and b come from different
instantiations of NonFunctionalDomainConstructor Integer?
(Not currently, since it seems that Aldor instantiates a Domain only another
time, if the argument has changed.)
> > I would imagine that Dom(x) and Dom(y) are the same, (i.e., instantiated
> > only once) if x and y are the same, i.e., if (eq x y) as opposed to (equal
> > x y), but I'd be interested to find something about this in the
> > documentation.
>
> That's the main point ... what kind of "equals" does Aldor apply?
> I do not know. Just look at the Dom example I gave.
which one? By the way: please include output of your aldor programs. It's
always a hassle for me to reproduce it.
> > I'd leave it unspecified.
>
> Leaving compiler behaviour unspecified is a bad thing.
No, not necessarily. Maybe I should have said "undefined". In Lisp this is the
case for many things. It's basically saying: "in principle it is an error, but
don't expect that I throw an error message".
> No user would be allowed to rely on calling List( Integer ) two times would
> give an identical result.
I agree that I wouldn't leave *this* unspecified, but I could imagine saying:
* domains are "compatible" (i.e., you may use append in the example you gave
above), if their arguments were identical. In this case, the domain is
instantiated only once.
* if their arguments were not identical, the behaviour is unspecified
thanks for getting me into the boat again,
Martin
- [Axiom-developer] Re: [Axiom-math] Are Fraction and Complex domains., Ralf Hemmecke, 2006/05/11
- [Axiom-developer] Re: [Axiom-math] Are Fraction and Complex domains., Gabriel Dos Reis, 2006/05/11
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/12
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Ralf Hemmecke, 2006/05/12
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/14
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Gabriel Dos Reis, 2006/05/14
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Ralf Hemmecke, 2006/05/14
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Gabriel Dos Reis, 2006/05/15
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Martin Rubey, 2006/05/16
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/17
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains.,
Martin Rubey <=
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/17
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Stephen Watt, 2006/05/17
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/18
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/15
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Gabriel Dos Reis, 2006/05/15
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Ralf Hemmecke, 2006/05/15
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/16
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Ralf Hemmecke, 2006/05/16
- [Axiom-developer] functional type system using pointer comparisons to check equality [was: Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains.], Christian Aistleitner, 2006/05/16
- [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains., Christian Aistleitner, 2006/05/16