On Mon, Oct 24, 2011 at 6:49 PM, Gabriel Dos Reis wrote:
> ...
> Another example:  Consider the function leftLcm from
> NonCommutativeOperatorDivision(P,F)  where
>      P: MonogenicLinearOperator(F)
>      F: Field
>
> the function definition is:
>
>        leftLcm(a,b) ==
>            a = 0 =>b
>            b = 0 =>a
>            b0 := b
>            u  := monomial(1,0)$P
>            v  := 0
>            while leadingCoefficient b ~= 0 repeat
>                qr     := leftDivide(a,b)
>                (a, b) := (b, qr.remainder)
>                (u, v) := (u*qr.quotient+v, u)
>            b0*u
>
>
> The problem is the definition of the local variable v:
>
>            v  := 0
>

I like this example, although now I believe also your first example.

> There are four candidates in scope:
>
>     0: P
>     0: F
>     0: NonNegativeInteger
>     0: Integer
>
> (the right answer is 0@P).
>

So it is a coincidence that the compiler happens to choose 0@P or that
the representation of all of these candidates is the same so that it
does not matter?

Regards,
Bill Page

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to