Dear Martin,

We have a category A with an operation op: % -> %. However, there are natural
subdomains of domains of A, which are no longer closed under op.

if I understood you correctly, you did not mean "closed under op" but "op is a partial function" -- which is a completely different thing.

Example 1, Matroids

A "matroid" is a mathematical structure with one very, very important
operation, namely "dualizing" ...

If a matroid is required to have a "dualizing function", then a graphical matroid cannot be a matroid. Simply because it does not provide the total function "dualize"

However, a graphical matroid can "contain" a matroid.

So the abstract setting is "graphical matroid" and the specialized one is "matroid". Not the other way round.

Example 2, Differential Equations

Again the same problem as above.

Of course you can introduce a category

OpSubstructureType: Category == with {
  opable?: % -> Boolean;
  +++if   opable? a, then op( a ) dualizes.
  +++if ~ opable? a, then the behaviour of op is undefined
  op: % -> %; -- op( a ) with ~ opable?( a ) crashes the program
  opIfCan: % -> Partial %
}

and use it in all places, but think about what is the more abstract setting and what the specialized one.
For me, a property of a generalization has to hold in its spezialization.
And a property of a specialization does not have to a generalization.

So I'd suggest

+++\begin{addescription}{provides a category for graphical matroids}
+++Some element of a \adthistype may be dualizable.
+++\end{addescription}
GraphicalMatroidType: Category == with {

  dualizeable?: % -> Boolean;

  +++\begin{addescription}{computes the dual element}
  +++if   dualizeable? a, then op( a ) dualizes.
  +++if ~ dualizeable? a, then the behaviour of op is undefined
  +++\end{addescription}
  dualize: % -> %;

  dualizeIfCan: % -> Partial %
}

and

+++\begin{addescription}{provides a category for matroids}
+++Every element of a \adthistype has to be dualizable.
+++\end{addescription}
MatroidType: Category == with {
  GraphicalMatroidType;
  default {
    dualizeable?( a: % ): Boolean == {
      true
    };
    dualizeIfCan( a: % ): Partial % == {
      [ ([EMAIL PROTECTED]) ]
    };
  }
}


Kind regards,
Christian


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to