axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] Type equivalence of domains in Axiom and Aldor


From: Ralf Hemmecke
Subject: Re: [Axiom-math] Type equivalence of domains in Axiom and Aldor
Date: Sat, 27 Oct 2007 22:53:42 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070728)

  Def: Two domains P and Q are equivalent if and only if both domains satisfy
  exactly the same set of categories: (P has x) = (Q has x) for all Category
  expressions x *and* neither P nor Q has any explicit exports that are not
  provided by some named category.

Let's see...

Cat: Category == with {
  coerce: Integer -> %;
  coerce: % -> Integer;
  bar: (%, %) ->  %;
}
P: Cat == add {
  Rep == Integer; import from Rep
  coerce(x: Integer): % == per x;
  coerce(x: %): Integer == rep x;
  bar(x: %, y: %): % == per(rep x + rep y);
}
----------------------------------^

Q: Cat == add {
  Rep == Integer; import from Rep
  coerce(x: Integer): % == per x;
  coerce(x: %): Integer == rep x;
  bar(x: %, y: %): % == per(rep x - rep y);
}
----------------------------------^

You are saying that P and Q are equivalent.

Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]