Palindrome checking proof