Ring solver for Idris