Proof using.
intros a b c l1 l2 l3 l4 l5 l6 H H0 H1;
change
(prod2list (l1 ++ (a :: nil) ++ l2 ++ (a :: nil) ++ l3)
(l4 ++ (b :: nil) ++ l5 ++ (c :: nil) ++ l6) =
prod2list (l1 ++ (a :: nil) ++ l2 ++ (a :: nil) ++ l3)
(l4 ++ (c :: nil) ++ l5 ++ (b :: nil) ++ l6))
in |- *.
repeat rewrite prod2list_app; auto with arith.
ring.
Qed.

(* Specifications: *)
(* Putting the smallest tree with the smallest integer lower the product *)
Theorem prod2list_reorder :
forall a b b1 l1 l2 l3 l4 l5,
length l1 = length l3 ->
length l2 = length l4 ->
(forall b, In b l1 -> b <= a) ->
(forall b, In b l2 -> b <= a) ->
permutation (l3 ++ b :: l4) (b1 :: l5) ->
ordered (sum_order f) (b1 :: l5) ->
exists l6 : _,
(exists l7 : _,
length l1 = length l6 /\
length l2 = length l7 /\
permutation (b1 :: l5) (l6 ++ b1 :: l7) /\
prod2list (l1 ++ a :: l2) (l6 ++ b1 :: l7) <=
prod2list (l1 ++ a :: l2) (l3 ++ b :: l4)).