That’s something for which a custom operator would be the ideal solution as it can be very easily and cleanly done in a very small amount of C/C++ code…
I’m not in front of my Teletype now but something like this should work though :
Note : in this example I compare the first X variables of pattern 1 with the first X variables of pattern 4, adjust as desired.
A 1; X 4
L 0 X: A AND A EQ PN 1 I PN 4 I
So we start with A being true (1) and for each index A only stays true if the patterns values are equal for that index. So at the end A is either 1 if the (sub)patterns are identical or 0 otherwise.
I’m not sure the whole second line fits or not, it’s 31 characters so probably ok.
It’s not optimal at all and keeps comparing even after one value differs but I guess that’s ok for Teletype scripts 
Edit : you can shave one character by using && instead of AND :
A 1; X 4
L 0 X: A && A == PN 1 I PN 4 I