aboutsummaryrefslogtreecommitdiff
path: root/plugins/syntax/NatSyntaxViaZ.v
diff options
context:
space:
mode:
authorPierre Letouzey2017-03-21 15:37:34 +0100
committerJason Gross2018-08-31 20:05:53 -0400
commitb344d8d3bf9a0685d31db51788aab817da85e5b8 (patch)
tree1f3422fc431fd70866dbf70fbf94ee45b1cd39c1 /plugins/syntax/NatSyntaxViaZ.v
parentf3d18836471ced1244922430df4195f79b347a7c (diff)
remove test file NatSyntaxViaZ.v
Diffstat (limited to 'plugins/syntax/NatSyntaxViaZ.v')
-rw-r--r--plugins/syntax/NatSyntaxViaZ.v57
1 files changed, 0 insertions, 57 deletions
diff --git a/plugins/syntax/NatSyntaxViaZ.v b/plugins/syntax/NatSyntaxViaZ.v
deleted file mode 100644
index 8a4d8f236d..0000000000
--- a/plugins/syntax/NatSyntaxViaZ.v
+++ /dev/null
@@ -1,57 +0,0 @@
-Declare ML Module "numeral_notation_plugin".
-Require Import BinNums.
-
-(** ** Parsing and Printing digit strings as type nat *)
-
-Fixpoint pos_pred_double x :=
- match x with
- | xI p => xI (xO p)
- | xO p => xI (pos_pred_double p)
- | xH => xH
- end.
-
-Definition nat_of_Z x :=
- match x with
- | Z0 => Some O
- | Zpos p =>
- let fix iter p a :=
- match p with
- | xI p0 => a + iter p0 (a + a)
- | xO p0 => iter p0 (a + a)
- | xH => a
- end
- in
- Some (iter p (S O))
- | Zneg p => None
- end.
-
-Fixpoint pos_succ x :=
- match x with
- | xI p => xO (pos_succ p)
- | xO p => xI p
- | xH => xO xH
- end.
-
-Definition Z_succ x :=
- match x with
- | Z0 => Zpos xH
- | Zpos x => Zpos (pos_succ x)
- | Zneg x =>
- match x with
- | xI p => Zneg (xO p)
- | xO p => Zneg (pos_pred_double p)
- | xH => Z0
- end
- end.
-
-Fixpoint Z_of_nat n :=
- match n with
- | O => Z0
- | S p => Z_succ (Z_of_nat p)
- end.
-
-(** The 1st conversion must either have type [Z->nat] or [Z->option nat].
- The 2nd one must either have type [nat->Z] or [nat->option Z]. *)
-
-Numeral Notation nat nat_of_Z Z_of_nat : nat_scope
- (warning after 5000).