  We construct certain Hilbert spaces associated with a class of non-linear
dynamical systems X. These are systems which arise from a generalized
self-similarity, and an iterated substitution. We show that when a weight
function W on X is given, then we may construct associated Hilbert spaces H(W)
of L^2-martingales which have wavelet bases.
