Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | Gaby, after some experiments, I could not find an example where "A add B", A > | and B sharing representation, exports an operation from A instead of from B, > | when the signature is present in both. > > That is basically what my oiriginal example was about --
Sorry, I don't understand. In the example below, the representations differ - IndexedDirectProductAbelianGroup(R,S) is (I'd say) different from List Pair(S,R). I wonder whether this strange behaviour also occurs when the representations are the same. What do you mean with > you just needed to flip the component to match exact layout. I'm reproducing > it below ??? Are you saying that List Pair(S, R) is the same as IndexedDirectProductAbelianGroup(R,S)? Martin > )sys cat left.spad > )abbrev domain LFREEMOD LeftFreeModule > LeftFreeModule(R: Ring, S: OrderedSet): > Join(LeftModule R, IndexedDirectProductCategory(R,S)) with > linearCombination: List Pair(S,R) -> % > == IndexedDirectProductAbelianGroup(R,S) add > Rep == List Pair(S,R) > linearCombination x == > per [u for u in x | second u ~= 0$R ] > if R has EntireRing then > (r: R) * (x: %) == > r = 0$R => 0$% > r = 1$R => x > messagePrint("from LeftFreeModule")$OutputForm > per [pair(first u, r * second u) for u in rep x] > else > (r: R) * (x: %) == > r = 0$R => 0$% > r = 1$R => x > messagePrint("from LeftFreeModule")$OutputForm > per [pair(first u,c) for u in rep x | (c := r *second u) ~= 0$R] > coerce(x: %): OutputForm == > x' := rep x > null x' => 0$R :: OutputForm > res : List OutputForm := nil > for u in reverse x' repeat > second u = 1$R => res := cons(first(u)::OutputForm, res) > res := cons(second(u)::OutputForm * first(u)::OutputForm, res) > reduce("+",res) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel