# Documentation

Mathlib.Data.List.Palindrome

# Palindromes #

This module defines palindromes, lists which are equal to their reverse.

The main result is the Palindrome inductive type, and its associated Palindrome.rec induction principle. Also provided are conversions to and from other equivalent definitions.

## Tags #

palindrome, reverse, induction

inductive List.Palindrome {α : Type u_1} :
List αProp

Palindrome l asserts that l is a palindrome. This is defined inductively:

• The empty list is a palindrome;
• A list with one element is a palindrome;
• Adding the same element to both ends of a palindrome results in a bigger palindrome.
Instances For
theorem List.Palindrome.reverse_eq {α : Type u_1} {l : List α} (p : ) :
theorem List.Palindrome.of_reverse_eq {α : Type u_1} {l : List α} :
theorem List.Palindrome.iff_reverse_eq {α : Type u_1} {l : List α} :
theorem List.Palindrome.append_reverse {α : Type u_1} (l : List α) :
theorem List.Palindrome.map {α : Type u_1} {β : Type u_2} {l : List α} (f : αβ) (p : ) :
instance List.Palindrome.instDecidablePalindrome {α : Type u_1} [inst : ] (l : List α) :
Equations