Accept TeoriaInterval in to parameter of teoria.interval

This changeset modifies the teoria.interval function so that it will accept an
instance of TeoriaInterval.