# How to output the entries of two lists as equal without evaluation? [closed]

Question

So, for example, I have the code here:

initialXArr = {Subscript[x, 0][0], Subscript[x, 1][0],
Subscript[x, 2][0], Subscript[x, 3][0], Subscript[x, 4][0]}

xarr = {15, 16, 17, 18, 19}


So I have two arrays now equal to the stuff above. I want code that is able to combine the two lists into one and just output the following list:

{Subscript[x, 0][0] == 15, Subscript[x, 1][0]==16,
Subscript[x, 2][0] == 17, Subscript[x, 3][0] == 18,
Subscript[x, 4][0] == 19}


I do not want to evaluate anything, I just need the output to the the above.

What I've Tried

Just setting the arrays equal. I just get False back.

{Subscript[x, 0][0], Subscript[x, 1][0],
Subscript[x, 2][0], Subscript[x, 3][0], Subscript[x, 4][0]} == {Subscript[x, 0][0] == 15, Subscript[x, 1][0]==16,
Subscript[x, 2][0] == 17, Subscript[x, 3][0] == 18,
Subscript[x, 4][0] == 19}


This is the only thing I've tried as of now. Honestly, I don't know where to begin trying solutions. This seems like an unusual thing to be trying to get Mathematica to do.

Notes

• If possible, I would like this code to be extendable to any two lists with matching numbers of entries.

I really appreciate any help I can have on this issue. Thank you very much!

## closed as off-topic by Jens, MarcoB, m_goldberg, user9660, ubpdqnMay 12 '16 at 10:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Jens, MarcoB, m_goldberg, Community, ubpdqn
If this question can be reworded to fit the rules in the help center, please edit the question.

• @ciao, I just added things I've tried. – jackskis May 8 '16 at 4:50
• Also, @ciao-- I see plenty of straight up questions get answered here with little to no background. I think the way I've phrased this question is within the bounds of how to ask a question detailed in the How do I ask a good question? section... – jackskis May 8 '16 at 5:08
• "If possible, I would like this code to be extendable to any two lists with matching numbers of entries. " - but your example does not, how should that be interpreted? For equal-length lists, Thread[initialXArr == xarr] should do the trick. Word of warning - avoid subscripting for other than display, in general... – ciao May 8 '16 at 5:19
• Your arrays are not of equal length. One is 4 long and the other is 5 long. Also, what is the logic for skipping Subscript[x, 1][0] in the combination. Or is this a typo. – Edmund May 8 '16 at 13:02
• The reason you got False is probably because the elements of inintalXArr had been assigned values previously, perhaps by inadvertently using = instead of ==. – Jens May 8 '16 at 16:21

MapThread[Equal, {initialXArr, xarr}]