Solving Equations of Code

1. Aug 19, 2011

bfr

I was just wondering about solving equations like: f(g(x)) = h(j(x)) where each function would be written in some minimal ideal systematic Turing-complete (all I know about "Turing-complete" is what I learned from briefly looking over a Wikipedia article) language. So, not that the "code" I'm about to write is necessarily in whatever the ideal language would be, but you might have something like:

f(x)=
Code (Text):

output = empty list
for i=0 to infinity
output.append g(i)
end

h(x)=
Code (Text):

output = empty list
for i=0 to infinity
if(j(i) == 0)
output.append(i)
end
end

So in the above example, we might want to "solve" in some sense for all possibilities for g(x) and j(x) (both functions from the natural numbers to the natural numbers), or maybe just one of g(x) and j(x) if the other is given. We would want f(x) produce the same value for the "output" list/array/tuple as h(x) after an infinite amount of time (so the notion of "equality" is kind of complicated and in writing an equation, one would probably have some systematic way to indicate what exactly is being solved for - and having a statement like "return output" at the end of f(x) and g(x) seemed weird since both run for an infinite amount of time).

What area of math would this be in? Would anybody be able to point me towards where I can learn more about this type of stuff? I'm really interested in the fundamentals of math+computer science and systematically breaking problems down into atomic pieces. Thanks.