diff options
Diffstat (limited to 'theories/Sorting/Heap.v')
-rw-r--r-- | theories/Sorting/Heap.v | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/theories/Sorting/Heap.v b/theories/Sorting/Heap.v index 1cff280a..6313dbf6 100644 --- a/theories/Sorting/Heap.v +++ b/theories/Sorting/Heap.v @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2014 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2015 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) @@ -152,23 +152,23 @@ Section defs. revert l2 H0. fix 1. intros. destruct l2 as [|a0 l0]. apply merge_exist with (a :: l); simpl; auto with datatypes. - elim (leA_dec a a0); intros. + induction (leA_dec a a0) as [Hle|Hle]. (* 1 (leA a a0) *) apply Sorted_inv in H. destruct H. - destruct (merge l H (a0 :: l0) H0). + destruct (merge l H (a0 :: l0) H0) as [l1 H2 H3 H4]. apply merge_exist with (a :: l1). clear merge merge0. auto using cons_sort, cons_leA with datatypes. - simpl. rewrite m. now rewrite munion_ass. + simpl. rewrite H3. now rewrite munion_ass. intros. apply cons_leA. apply (@HdRel_inv _ leA) with l; trivial with datatypes. (* 2 (leA a0 a) *) apply Sorted_inv in H0. destruct H0. - destruct (merge0 l0 H0). clear merge merge0. + destruct (merge0 l0 H0) as [l1 H2 H3 H4]. clear merge merge0. apply merge_exist with (a0 :: l1); auto using cons_sort, cons_leA with datatypes. - simpl; rewrite m. simpl. setoid_rewrite munion_ass at 1. rewrite munion_comm. + simpl; rewrite H3. simpl. setoid_rewrite munion_ass at 1. rewrite munion_comm. repeat rewrite munion_ass. setoid_rewrite munion_comm at 3. reflexivity. intros. apply cons_leA. apply (@HdRel_inv _ leA) with l0; trivial with datatypes. |