72 lines
1.0 KiB
Coq
72 lines
1.0 KiB
Coq
(*
|
|
- N: https://coq.inria.fr/library/Coq.Numbers.BinNums.html
|
|
- Z: https://coq.inria.fr/library/Coq.Numbers.BinNums.html
|
|
- positive: https://coq.inria.fr/library/Coq.Numbers.BinNums.html
|
|
*)
|
|
|
|
Print Nat.
|
|
Require Import Nat.
|
|
Print Nat.
|
|
Print t.
|
|
Unset Printing Notations.
|
|
Check ~True.
|
|
Set Printing Notations.
|
|
|
|
|
|
Print nat.
|
|
(*
|
|
Inductive nat : Set :=
|
|
| O : nat
|
|
| S : nat -> nat.
|
|
*)
|
|
|
|
Require Import BinNums.
|
|
Print positive.
|
|
(*
|
|
Inductive positive : Set :=
|
|
| xI : positive -> positive
|
|
| xO : positive -> positive
|
|
| xH : positive.
|
|
*)
|
|
|
|
(*Require Import BinNat.*)
|
|
Print N.
|
|
(*
|
|
Inductive N : Set :=
|
|
| N0 : N
|
|
| Npos : positive -> N.
|
|
*)
|
|
|
|
(*Require Import ZArith.*)
|
|
Print Z.
|
|
(*
|
|
Inductive Z : Set :=
|
|
| Z0 : Z
|
|
| Zpos : positive -> Z
|
|
| Zneg : positive -> Z.
|
|
*)
|
|
|
|
Require Import Reals.
|
|
Print R.
|
|
|
|
Require Import QArith.
|
|
Print Q.
|
|
(*
|
|
Record Q : Set := Qmake {
|
|
Qnum : Z;
|
|
Qden : positive
|
|
}.
|
|
*)
|
|
|
|
Check 6%positive.
|
|
Check 6%Q.
|
|
Check 6%R.
|
|
Check 6%N.
|
|
Check 6%Z.
|
|
Compute 6%xpositive.
|
|
|
|
Unset Printing Notations.
|
|
Check 6%nat.
|
|
Set Printing Notations.
|
|
|