define a operation 'insert' and prove lemmas about it