A learning mechanism to enhance the time efficiency of proving theorems