free_term (Sorted_term t s r) = Sorted_term t' s' r
     where t' = free_term t
           s' = mkFreeName s
free_term (Sorted_term t s r) = Sorted_term t' s' r
     where t' = free_term t
           s' = mkFreeName s
free_term (Sorted_term t s r) = Sorted_term t' s' r
     where t' = free_term t
           s' = mkFreeName s