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

« back to all changes in this revision

Viewing changes to test-suite/bugs/closed/shouldsucceed/1411.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
Require Import List.
 
2
Require Import Program.
 
3
 
 
4
Inductive Tree : Set :=
 
5
| Br : Tree -> Tree -> Tree
 
6
| No : nat -> Tree
 
7
.
 
8
 
 
9
(* given a tree, we want to know which lists can
 
10
   be used to navigate exactly to a node *)
 
11
Inductive Exact : Tree -> list bool -> Prop :=
 
12
| exDone  n    :              Exact (No n)   nil
 
13
| exLeft  l r p: Exact l p -> Exact (Br l r) (true::p)
 
14
| exRight l r p: Exact r p -> Exact (Br l r) (false::p)
 
15
.
 
16
 
 
17
Definition unreachable A : False -> A.
 
18
intros.
 
19
destruct H.
 
20
Defined.
 
21
 
 
22
Program Fixpoint fetch t p (x:Exact t p) {struct t} :=
 
23
   match t, p with
 
24
   | No p' , nil      => p'
 
25
   | No p' , _::_     => unreachable nat _
 
26
   | Br l r, nil      => unreachable nat _ 
 
27
   | Br l r, true::t  => fetch l t _
 
28
   | Br l r, false::t => fetch r t _
 
29
   end.
 
30
 
 
31
Next Obligation. inversion x. Qed.
 
32
Next Obligation. inversion x. Qed.
 
33
Next Obligation. inversion x; trivial. Qed.
 
34
Next Obligation. inversion x; trivial. Qed.
 
35