bug correction in proving principles of function