1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
19 (*#**********************************************************************)
21 (* v * The Coq Proof Assistant / The Coq Development Team *)
23 (* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
25 (* \VV/ *************************************************************)
27 (* // * This file is distributed under the terms of the *)
29 (* * GNU Lesser General Public License Version 2.1 *)
31 (*#**********************************************************************)
33 (*i $Id: Heap.v,v 1.3 2003/11/29 17:28:44 herbelin Exp $ i*)
35 (*#* A development of Treesort on Heap trees *)
37 (* G. Huet 1-9-95 uses Multiset *)
39 include "Lists/List.ma".
41 include "Sets/Multiset.ma".
43 include "Sorting/Permutation.ma".
45 include "Relations/Relations.ma".
47 include "Sorting/Sorting.ma".
54 cic:/Coq/Sorting/Heap/defs/A.var
58 cic:/Coq/Sorting/Heap/defs/leA.var
62 cic:/Coq/Sorting/Heap/defs/eqA.var
65 inline procedural "cic:/Coq/Sorting/Heap/defs/gtA.con" "defs__" as definition.
68 cic:/Coq/Sorting/Heap/defs/leA_dec.var
72 cic:/Coq/Sorting/Heap/defs/eqA_dec.var
76 cic:/Coq/Sorting/Heap/defs/leA_refl.var
80 cic:/Coq/Sorting/Heap/defs/leA_trans.var
84 cic:/Coq/Sorting/Heap/defs/leA_antisym.var
88 Hint Resolve leA_refl.
92 Hint Immediate eqA_dec leA_dec leA_antisym.
95 inline procedural "cic:/Coq/Sorting/Heap/defs/emptyBag.con" "defs__" as definition.
97 inline procedural "cic:/Coq/Sorting/Heap/defs/singletonBag.con" "defs__" as definition.
99 inline procedural "cic:/Coq/Sorting/Heap/Tree.ind".
101 (*#* [a] is lower than a Tree [T] if [T] is a Leaf
102 or [T] is a Node holding [b>a] *)
104 inline procedural "cic:/Coq/Sorting/Heap/leA_Tree.con" as definition.
106 inline procedural "cic:/Coq/Sorting/Heap/leA_Tree_Leaf.con" as lemma.
108 inline procedural "cic:/Coq/Sorting/Heap/leA_Tree_Node.con" as lemma.
111 Hint Resolve leA_Tree_Leaf leA_Tree_Node.
114 (*#* The heap property *)
116 inline procedural "cic:/Coq/Sorting/Heap/is_heap.ind".
119 Hint Constructors is_heap.
122 inline procedural "cic:/Coq/Sorting/Heap/invert_heap.con" as lemma.
124 (* This lemma ought to be generated automatically by the Inversion tools *)
126 inline procedural "cic:/Coq/Sorting/Heap/is_heap_rec.con" as lemma.
128 inline procedural "cic:/Coq/Sorting/Heap/low_trans.con" as lemma.
130 (*#* contents of a tree as a multiset *)
132 (*#* Nota Bene : In what follows the definition of SingletonBag
133 in not used. Actually, we could just take as postulate:
134 [Parameter SingletonBag : A->multiset]. *)
136 inline procedural "cic:/Coq/Sorting/Heap/contents.con" as definition.
138 (*#* equivalence of two trees is equality of corresponding multisets *)
140 inline procedural "cic:/Coq/Sorting/Heap/equiv_Tree.con" as definition.
142 (*#* specification of heap insertion *)
144 inline procedural "cic:/Coq/Sorting/Heap/insert_spec.ind".
146 inline procedural "cic:/Coq/Sorting/Heap/insert.con" as lemma.
148 (*#* building a heap from a list *)
150 inline procedural "cic:/Coq/Sorting/Heap/build_heap.ind".
152 inline procedural "cic:/Coq/Sorting/Heap/list_to_heap.con" as lemma.
154 (*#* building the sorted list *)
156 inline procedural "cic:/Coq/Sorting/Heap/flat_spec.ind".
158 inline procedural "cic:/Coq/Sorting/Heap/heap_to_list.con" as lemma.
160 (*#* specification of treesort *)
162 inline procedural "cic:/Coq/Sorting/Heap/treesort.con" as theorem.