# Can I define a symbolic equation where the variables are concatenating?

Hi, Can I define a symbolic equation with variable concatenating?

For example:

let $x \in \mathbb{F}_2$

How can I define the following equation:

$11111x1111 = 2*x + 2$

where the x is a digit in the left number.

(The obvious way is by taking the binary exression of that number i.e $\Sigma_{i=0}^{i=n}2^ib_i$)

edit retag close merge delete

If x is in GF(2), it is not a "digit". The equality should work in integers? (The $2x+2$ is maybe either $2$, well $10$, but then... or $6$ ... The number on the left side is bigger.)

( 2017-06-19 21:24:54 +0200 )edit

Sort by ยป oldest newest most voted

Defining the equation is easy :

x = var('x',domain='integer') res =solve([x^2 ==1,2^9+2^8+2^7+2^6+2^5+x+2^3+2^2+2^1+2^0 == 2*x+2],x) print "res = ",res # no solution

but like Dan Fuela pointed out, your equation has no solution when x in F2 + you should accept the fact that you mix up many things "the concatening operator" (no meaning in maths), F2 is for you exactly the same than the set of the two integers {0,1} and so on.

more