Transfinite arithmetic in Ruby