proposition: Theorem map2_commut: forall (A B: Type) (f g: option A -> option A -> option B), (forall (i j: option A), f i j = g j i) -> forall (m1 m2: t A), _map2 f m1 m2 = _map2 g m2 m1.
proof: Proof. intros A B f g Eq1. assert (Eq2: forall (i j: option A), g i j = f j i). { intros; auto. } induction m1; intros; destruct m2; simpl; try rewrite Eq1; repeat rewrite (xmap2_lr f g); repeat rewrite (xmap2_lr g f); auto. rewrite IHm1_1. rewrite IHm1_2. auto. Qed.
imports: Bool OrderedType ZArith OrderedType OrderedTypeEx FMapInterface