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

« back to all changes in this revision

Viewing changes to contrib/micromega/Psatz.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
(* Micromega: A reflexive tactic using the Positivstellensatz           *)
 
10
(*                                                                      *)
 
11
(*  Frédéric Besson (Irisa/Inria) 2006-2008                             *)
 
12
(*                                                                      *)
 
13
(************************************************************************)
 
14
 
 
15
Require Import ZMicromega.
 
16
Require Import QMicromega.
 
17
Require Import RMicromega.
 
18
Require Import QArith.
 
19
Require Export Ring_normalize.
 
20
Require Import ZArith.
 
21
Require Import Raxioms.
 
22
Require Export RingMicromega.
 
23
Require Import VarMap.
 
24
Require Tauto.
 
25
 
 
26
Ltac xpsatz dom d :=
 
27
  let tac := lazymatch dom with
 
28
  | Z => 
 
29
    (sos_Z || psatz_Z d) ;
 
30
    intros __wit __varmap __ff ; 
 
31
    change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; 
 
32
    apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
33
  | R =>
 
34
    (sos_R || psatz_R d) ;
 
35
    intros __wit __varmap __ff ; 
 
36
    change (Tauto.eval_f (Reval_formula (@find R 0%R __varmap)) __ff) ; 
 
37
    apply (RTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
38
  | Q =>
 
39
      (sos_Q || psatz_Q d) ;
 
40
    intros __wit __varmap __ff ; 
 
41
    change (Tauto.eval_f (Qeval_formula (@find Q 0%Q __varmap)) __ff) ; 
 
42
    apply (QTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
43
  | _ => fail "Unsupported domain"
 
44
  end in tac.
 
45
 
 
46
Tactic Notation "psatz" constr(dom) int_or_var(n) := xpsatz dom n.
 
47
Tactic Notation "psatz" constr(dom) := xpsatz dom ltac:-1.
 
48
 
 
49
Ltac psatzl dom :=
 
50
  let tac := lazymatch dom with
 
51
  | Z =>
 
52
    psatzl_Z ;
 
53
    intros __wit __varmap __ff ;
 
54
    change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; 
 
55
    apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
56
  | Q =>
 
57
    psatzl_Q ; 
 
58
    intros __wit __varmap __ff ; 
 
59
    change (Tauto.eval_f (Qeval_formula (@find Q 0%Q __varmap)) __ff) ; 
 
60
    apply (QTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
61
  | R => 
 
62
    psatzl_R ;
 
63
    intros __wit __varmap __ff ;
 
64
    change (Tauto.eval_f (Reval_formula (@find R 0%R __varmap)) __ff) ; 
 
65
    apply (RTautoChecker_sound __ff __wit); vm_compute ; reflexivity
 
66
  | _ => fail "Unsupported domain"
 
67
  end in tac.
 
68
 
 
69
 
 
70
 
 
71
Ltac lia := 
 
72
  xlia ;
 
73
  intros __wit __varmap __ff ;
 
74
    change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; 
 
75
      apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity.