proposition: Lemma equivlist_length {A R} {_ : @Equivalence A R} (dec : forall x y, {R x y} + {~R x y}) (ls ls' : list A) (Hls : NoDupA R ls) (Hls' : NoDupA R ls') (H2 : equivlistA R ls ls') : List.length ls = List.length ls'.
proof: Proof. revert dependent ls'. induction Hls as [|x xs Hin Hls IHxs]; intros. { destruct ls' as [|y]. { reflexivity. } { specialize (H2 y); InA_t. } } { pose proof (H2 x) as Heq. specialize (IHxs (removeA dec x ls')). simpl; rewrite IHxs; clear IHxs; [ | apply removeA_NoDupA; assumption | apply removeA_equivlistA; assumption ]. rewrite removeA_length_In by InA_t; reflexivity. } 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