proposition: Lemma disjoint_comm {A eq_A} ls1 ls2 : disjoint (A := A) eq_A ls1 ls2 = disjoint (fun x y => eq_A y x) ls2 ls1.
proof: Proof. unfold disjoint. revert ls2. induction ls1; simpl; trivial. { induction ls2; eauto. } { intro ls2. rewrite IHls1; clear IHls1. revert a ls1. induction ls2; simpl; trivial. { intros. rewrite <- IHls2; simpl. rewrite !Bool.negb_orb. rewrite !Bool.andb_assoc. repeat (f_equal; []). rewrite !(Bool.andb_comm _ (negb (eq_A _ _))). rewrite <- !Bool.andb_assoc. repeat (f_equal; []). apply Bool.andb_comm. } } Qed.
imports: Coq.Lists.List Fiat.Common.BoolFacts Fiat.Common.Equality