Hint Rewrite mapo_app : list.
Section TrivialLift.
Variable Gamma' : finType.
Variable Gamma : finType.
Variable f : Gamma' -> Gamma.
Variable g : Gamma -> option Gamma'.
Hypothesis inv : forall x, g (f x) = Some x.
Hypothesis tight : forall x y, g x = Some y -> f y = x.
Definition up (G : cfg Gamma') : cfg Gamma :=
(f (startsym G), map (fun '(x,A) => (f x, map f A) ) (rules G)).

(* Specifications: *)
Lemma mapo_map x :
mapo g  (map f x) = x.
Lemma up_rew1 G x y :
rew_cfg G x y -> rew_cfg (up G) (map f x) (map f y).
Lemma up_rew2 G x y :
rew_cfg (up G) x y -> rew_cfg G (mapo g x) (mapo g y).
Lemma up_char1 G x y :
rewt G x y -> rewt (up G) (map f x) (map f y).
Lemma up_char2 G x y :
rewt (up G) x y -> rewt G (mapo g x) (mapo g y).
Lemma up_ter1 G x :
terminal G x -> terminal (up G) (map f x).
Lemma up_ter2 G y :
terminal (up G) y -> terminal G (mapo g y).
Lemma up_char G x :
rewt G [(startsym G)] x <-> rewt (up G) [(startsym (up G))] (map f x).