Hi,
It is interesting your development of surfaces from a pure mathematical definition
The normal use of replication guides is when you have “something” (a built method, a custom function) that take arguments. And you are feeding the arguments with lists. So the replication guides allow you to define how the lists will be combined. You can find a good explanation and sample here:
http://dynamobim.org/cbns-for-dummies/
Using them directly in mathematical expressions, when feeding the integers vars with lists is a bit unusual for me, but interesting. I don’t have experience on this, but I have the feeling that maybe currently there are some limitations. And you can not use the replication guides as freely as with arguments. It seems that you need a clear and somehow “symmetrical” replication guides in both sides of every mathematical operator

But if you make a custom function it will take perfectly every combination you want. This is the “normal” use of the replication guides

If it is working in the function, probably it is possible that it works directly without having to define the custom function. So please, post this as an issue in the developers github site
Maybe we will get some insights about what is going on. And maybe some improvements too.