End ReductionHesselink.
Section Palindrome.
Variable Gamma' : finType.
Inductive Gamma := emb (x : Gamma') | StartG.
Global Instance eq_dec_gamma : eq_dec Gamma.
Definition emb_string := map emb.
Definition palin_G : cfg Gamma :=
(StartG, (StartG, []) ::
flat_map (fun g => [ (StartG, [emb g]);  (StartG, [emb g; StartG; emb g]) ]) (elem Gamma')).

(* Specifications: *)
Lemma G_left x :
rewt palin_G [StartG] x -> rev x = x /\ count x StartG <= 1.
Lemma listI : forall (A : Type) (P : list A -> Prop), P [] -> (forall x, P [x]) -> (forall (x : A) (y : A) (l : list A), P l -> P (x :: l ++ [y])) -> forall l : list A, P l.
Lemma rev_palin x :
x = rev x -> count x StartG <= 1 -> rewt palin_G [StartG] x.
Lemma emb_Start x :
~ StartG el emb_string x.
Lemma G_char (x : list Gamma') :
x = rev x <-> L palin_G (emb_string x).