proposition: Lemma NoDup_rev {A} (ls : list A) : NoDup (rev ls) <-> NoDup ls.
proof: Proof. induction ls as [|?? IHls]; simpl. { split; intro; constructor. } { split; intro H. { constructor. { rewrite in_rev. rapply @NoDup_app_in; [ eassumption | left; reflexivity ]. } { apply NoDup_app in H; apply IHls, H. } } { rewrite NoDup_app_in_iff, IHls. inversion H; clear H; subst. repeat split; simpl; trivial. { repeat constructor; simpl; intro; trivial. } { intros; destruct_head or; destruct_head False; subst. rewrite <- in_rev in *. eauto with nocore. } } } Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Lists.List Coq.Lists.SetoidList Coq.Bool.Bool Fiat.Common Fiat.Common.List.Operations Fiat.Common.Equality Fiat.Common.List.FlattenList Fiat.Common.LogicFacts