Suppose I have to vector of variables
NB=vector(var('x', n=3, latex_name='x'))
B=vector(var('y', n=4, latex_name='ϵ'))
I would like to construct a function say BNB(vec1, vec2, pr, pc)
such that when applied to B
and for legitiamte values --- i.e. : here, NB
should be less than 3 and B
should be less than 4 ---, permute the correspondant x and $\epsilon from a vector to an other. That is :
BNB(B, NB, 1,2)
gives
B=[ϵ0,x2,ϵ3,ϵ4] and NB=[x0,x1,ϵ1,x3]
By advance thanks for the help.