Tobin's q, flexible accelerator and error correction mechanisms: a duality theorem in a general framework