On Wed, May 14, 2008 at 8:54 AM, Pedro Patricio <[EMAIL PROTECTED]> wrote:
>
>  nope, booleans means 1+1=1.
>  take + as OR and * as AND in the propositional calculus.

I was afraid you were going to say that:-)

Does this help any?

sage: B = BooleanPolynomialRing(1,'x')
sage: x = B.gen()
sage: x*x
x
sage: x*1
x
sage: x*B(0)
0
sage: x+B(0)
x
sage: A = M([[x,0],[0,x]])
sage: A

[x 0]
[0 x]
sage: A*A

[x 0]
[0 x]

If not, I don't know what do to. Perhaps you should ask Michael Brickenstein,
who worked on the PolyBoRi interface.
http://opensourcemath.org/sage/doc/html/ref/node300.html#l2h-7751

In fact, you are actually asking on the wrong list. This list is for
using SAGE in teaching and it seems your question is how do you
construct the Boolean ring as a ring of coefficients for a matrix.
Therefore, I'm ccing the sage-support list on this. Maybe someone
there can help you better.

>
>  the key thing is to compute the reachability matrix of a digraph. an
>  awkward way to do it would be by computing the power series A+A^2+\dots
>  +A^n, where n is the #vertices and A adjacency matrix, and replace
>  every nonzero element by 1.
>  but i would like to take A over the booleans right from the begining.
>
>  thanks
>  pedro
>
>
>  On 14 Maio, 13:20, [EMAIL PROTECTED] wrote:
>  > David Joyner wrote:
>
>
> > > On Wed, May 14, 2008 at 6:29 AM, Pedro Patricio <[EMAIL PROTECTED]> wrote:
>  >
>  > >>  hi all... i am sure you can easily help me with this one.
>  >
>  > >>  how can i define a matrix over the booleans? i know this is trivially
>  > >>  done over ZZ and so forth.
>  >
>  > > If by booleans you mean GF(2), then just replace ZZ by GF(2) in the
>  > > construction you know over ZZ. Is that what you meant?
>  >
>  > Also, if you already have a matrix, you can convert it to a matrix over
>  > GF(2) by doing:
>  >
>  > m.change_ring(GF(2))
>  >
>  > Jason
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to