~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to contrib/field/LegacyField_Compl.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(************************************************************************)
 
2
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
 
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
 
4
(*   \VV/  **************************************************************)
 
5
(*    //   *      This file is distributed under the terms of the       *)
 
6
(*         *       GNU Lesser General Public License Version 2.1        *)
 
7
(************************************************************************)
 
8
 
 
9
(* $Id: LegacyField_Compl.v 9273 2006-10-25 11:30:36Z barras $ *)
 
10
 
 
11
Require Import List.
 
12
 
 
13
Definition assoc_2nd :=
 
14
  (fix assoc_2nd_rec (A:Type) (B:Set)
 
15
                     (eq_dec:forall e1 e2:B, {e1 = e2} + {e1 <> e2})
 
16
                     (lst:list (prod A B)) {struct lst} : 
 
17
   B -> A -> A :=
 
18
     fun (key:B) (default:A) =>
 
19
       match lst with
 
20
       | nil => default
 
21
       | (v,e) :: l =>
 
22
           match eq_dec e key with
 
23
           | left _ => v
 
24
           | right _ => assoc_2nd_rec A B eq_dec l key default
 
25
           end
 
26
       end).
 
27
 
 
28
Definition mem :=
 
29
  (fix mem (A:Set) (eq_dec:forall e1 e2:A, {e1 = e2} + {e1 <> e2}) 
 
30
           (a:A) (l:list A) {struct l} : bool :=
 
31
     match l with
 
32
     | nil => false
 
33
     | a1 :: l1 =>
 
34
         match eq_dec a a1 with
 
35
         | left _ => true
 
36
         | right _ => mem A eq_dec a l1
 
37
         end
 
38
     end).