On Tue, Jul 17, 2012 at 4:26 AM, virensule <[email protected]> wrote:
> How do I evaluate and compose Boolean functions in Boolean polynomial ring?
>
> For example I have
>
> R=BooleanPolynomialRing(3,x)
> x=R.gens()
> f=BooleanFunction(x[0]*x[1]+x[1]*x[2]+x[1]+1)
>
> Now how do I find the function g=f(evaluated when x[0]=1)?
>
> Also if g is another function defined similarly, how do I compute f(g())
> composition?



sage: from sage.crypto.boolean_function import *
sage: R = BooleanPolynomialRing(3, "x")
sage: x = R.gens()
sage: f = BooleanFunction(x[0]*x[1]+x[1]*x[2]+x[1]+1)
sage: f.[tab]

gives the methods implemented for the instances of
BooleanFunction. Subfunctions of Boolean functions are not
implemented, at least not yet as far as I know.

I'm not sure what you mean by composition of
functions

f:GF(2)^n -> GF(2) and g:GF(2)^n -> GF(2).

Maybe you can do what you want using lambda functions?


>
> Can someone help please?
>
> Thanks in advance.
> Virendra
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to