Gauss.thy ported from Old_Number_Theory (unfinished)