How can you cut a string

if I have an input p that is in (0,1)^k and x that is in (0,1)^n, is it legal to write
x[n-1:< p >] and use it in a logical circuit?

you can not use inputs of the circuit in a “hard wired” way. when you write x[n-1:< p >] you mean connecting several wires connected to certain bits of circuit while the number of wires you want to connect is dependent on the input of the circle. think about building such circuit, that is not possible.