Abstract out the `LookupContext` logic in prover as a couple of generic functions that can be reused
Sometimes, e.g., in unit tests we need to set up the lookup context / environment. There's quite a bit of code required to do this. We should abstract out the LookupContext logic in prover as a couple of generic functions that can be reused elsewhere. Anais suggested this interface could use a builder pattern.
Note that I don't think the LookupContext struct is necessarily the best approach we can take. It's cleaner than the previous approach for sure, but I think it might make sense to find a different even cleaner approach.
Instead of having a single large function for the prover (create), we could have a number of functions being called from within create. With this approach it might be natural to get rid of that LookupContext. I'm not sure though :o)
I think you're probably right, but in any case separating this logic into a function is a good first step that we can break down into more functions later.