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

« back to all changes in this revision

Viewing changes to test-suite/success/MatchFail.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 Export ZArith.
 
2
Require Export ZArithRing.
 
3
 
 
4
(* Cette tactique a pour objectif de remplacer toute instance
 
5
   de (POS (xI e)) ou de (POS (xO e)) par
 
6
   2*(POS e)+1  ou 2*(POS e), pour rendre les expressions plus
 
7
   � m�me d'�tre utilis�es par Ring, lorsque ces expressions contiennent
 
8
   des variables de type positive. *)
 
9
Ltac compute_POS :=
 
10
  match goal with
 
11
  |  |- context [(Zpos (xI ?X1))] =>
 
12
      let v := constr:X1 in
 
13
      match constr:v with
 
14
      | 1%positive => fail 1
 
15
      | _ =>  rewrite (BinInt.Zpos_xI v)
 
16
      end
 
17
  |  |- context [(Zpos (xO ?X1))] =>
 
18
      let v := constr:X1 in
 
19
      match constr:v with
 
20
      | 1%positive => fail 1
 
21
      | _ =>  rewrite (BinInt.Zpos_xO v)
 
22
      end
 
23
  end.
 
24
 
 
25
Goal forall x : positive, Zpos (xI (xI x)) = (4 * Zpos x + 3)%Z.
 
26
intros.
 
27
repeat compute_POS.
 
28
 ring.
 
29
Qed.