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
(************************************************************************)
9
(*i $Id: Utils.v 11709 2008-12-20 11:42:15Z msozeau $ i*)
11
(** Various syntaxic shortands that are useful with [Program]. *)
13
Require Export Coq.Program.Tactics.
15
Set Implicit Arguments.
17
(** A simpler notation for subsets defined on a cartesian product. *)
19
Notation "{ ( x , y ) : A | P }" :=
20
(sig (fun anonymous : A => let (x,y) := anonymous in P))
21
(x ident, y ident, at level 10) : type_scope.
23
(** Generates an obligation to prove False. *)
25
Notation " ! " := (False_rect _ _) : program_scope.
27
Delimit Scope program_scope with prg.
29
(** Abbreviation for first projection and hiding of proofs of subset objects. *)
31
Notation " ` t " := (proj1_sig t) (at level 10, t at next level) : program_scope.
33
(** Coerces objects to their support before comparing them. *)
35
Notation " x '`=' y " := ((x :>) = (y :>)) (at level 70) : program_scope.
37
Require Import Coq.Bool.Sumbool.
39
(** Construct a dependent disjunction from a boolean. *)
41
Notation dec := sumbool_of_bool.
43
(** The notations [in_right] and [in_left] construct objects of a dependent disjunction. *)
45
(** Hide proofs and generates obligations when put in a term. *)
47
Notation in_left := (@left _ _ _).
48
Notation in_right := (@right _ _ _).
50
(** Extraction directives *)
52
Extraction Inline proj1_sig.
53
Extract Inductive unit => "unit" [ "()" ].
54
Extract Inductive bool => "bool" [ "true" "false" ].
55
Extract Inductive sumbool => "bool" [ "true" "false" ].
56
(* Extract Inductive prod "'a" "'b" => " 'a * 'b " [ "(,)" ]. *)
57
(* Extract Inductive sigT => "prod" [ "" ]. *)
b'\\ No newline at end of file'