fact stringlengths 6 2.88k | type stringclasses 17
values | library stringclasses 2
values | imports listlengths 0 16 | filename stringclasses 89
values | symbolic_name stringlengths 1 36 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
compare_spec:
forall (s1 s2 : string),
compare s1 s2 =
ListDef.list_compare char63_compare (to_list s1) (to_list s2). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef ListDef",
"From Corelib Require Export PrimInt63 Uint63Axioms",
"From Corelib Require Export PrimString"
] | Corelib/Strings/PrimStringAxioms.v | compare_spec | |
carry(A : Type) :=
| C0 : A -> carry A
| C1 : A -> carry A. | Variant | Corelib | [] | Corelib/Numbers/Cyclic/Int63/CarryType.v | carry | |
pos_neg_int63:= Pos (d:int) | Neg (d:int).
Register pos_neg_int63 as num.int63.pos_neg_int63.
Declare Scope uint63_scope. | Variant | Corelib | [
"Require Export CarryType"
] | Corelib/Numbers/Cyclic/Int63/PrimInt63.v | pos_neg_int63 | |
id_int: int -> int := fun x => x. | Definition | Corelib | [
"Require Export CarryType"
] | Corelib/Numbers/Cyclic/Int63/PrimInt63.v | id_int | |
int_wrapper:= wrap_int {int_wrap : int}.
Register int_wrapper as num.int63.int_wrapper.
Register wrap_int as num.int63.wrap_int. | Record | Corelib | [
"Require Export CarryType"
] | Corelib/Numbers/Cyclic/Int63/PrimInt63.v | int_wrapper | |
printer(x : int_wrapper) : pos_neg_int63 := Pos (int_wrap x). | Definition | Corelib | [
"Require Export CarryType"
] | Corelib/Numbers/Cyclic/Int63/PrimInt63.v | printer | |
parser(x : pos_neg_int63) : option int :=
match x with
| Pos p => Some p
| Neg _ => None
end.
Declare Scope int63_scope. | Definition | Corelib | [
"Require Export CarryType"
] | Corelib/Numbers/Cyclic/Int63/PrimInt63.v | parser | |
min_int:= Eval vm_compute in (lsl 1 62). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | min_int | |
to_Z(i : int) :=
if ltb i min_int then to_Z i
else Z.opp (to_Z (sub 0 i)). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | to_Z | |
asr_spec: forall x p, to_Z (asr x p) = Z.div (to_Z x) (2 ^ (to_Z p)). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | asr_spec | |
div_spec: forall x y,
to_Z x <> to_Z min_int \/ to_Z y <> Zneg 1 ->
to_Z (divs x y) = Z.quot (to_Z x) (to_Z y). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | div_spec | |
mod_spec: forall x y, to_Z (mods x y) = Z.rem (to_Z x) (to_Z y). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | mod_spec | |
ltb_spec: forall x y, ltsb x y = true <-> to_Z x < to_Z y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | ltb_spec | |
leb_spec: forall x y, lesb x y = true <-> to_Z x <= to_Z y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | leb_spec | |
compare_spec: forall x y, compares x y = Z.compare (to_Z x) (to_Z y). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63 Uint63Axioms"
] | Corelib/Numbers/Cyclic/Int63/Sint63Axioms.v | compare_spec | |
size:= 63%nat. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | size | |
digits:= 63%uint63. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | digits | |
max_int:= Eval vm_compute in sub 0 1. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | max_int | |
get_digitx p := ltb 0 (land x (lsl 1 p)). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | get_digit | |
set_digitx p (b:bool) :=
if if leb 0 p then ltb p digits else false then
if b then lor x (lsl 1 p)
else land x (lxor max_int (lsl 1 p))
else x. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | set_digit | |
is_zero(i:int) := eqb i 0. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | is_zero | |
is_even(i:int) := is_zero (land i 1). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | is_even | |
to_Z_rec(n:nat) (i:int) :=
match n with
| O => 0
| S n =>
(if is_even i then Z.double else Z.succ_double) (to_Z_rec n (lsr i 1))
end. | Fixpoint | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | to_Z_rec | |
to_Z:= to_Z_rec size. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | to_Z | |
of_pos_rec(n:nat) (p:positive) {struct p} :=
match n, p with
| O, _ => 0%uint63
| S n, xH => 1%uint63
| S n, xO p => lsl (of_pos_rec n p) 1
| S n, xI p => lor (lsl (of_pos_rec n p) 1) 1
end. | Fixpoint | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | of_pos_rec | |
of_pos:= of_pos_rec size. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | of_pos | |
of_Zz :=
match z with
| Zpos p => of_pos p
| 0 => 0%uint63
| Zneg p => sub 0 (of_pos p)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | of_Z | |
wB:= 2 ^ (Z.of_nat size). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | wB | |
of_to_Z: forall x, of_Z (to_Z x) = x. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | of_to_Z | |
lsl_spec: forall x p, to_Z (lsl x p) = Z.modulo (to_Z x * 2 ^ to_Z p) wB. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | lsl_spec | |
lsr_spec: forall x p, to_Z (lsr x p) = Z.div (to_Z x) (2 ^ to_Z p). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | lsr_spec | |
biti n := negb (is_zero (lsl (lsr i n) (sub digits 1))). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | bit | |
land_spec: forall x y i, bit (land x y) i = andb (bit x i) (bit y i). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | land_spec | |
lor_spec: forall x y i, bit (lor x y) i = orb (bit x i) (bit y i). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | lor_spec | |
lxor_spec: forall x y i, bit (lxor x y) i = xorb (bit x i) (bit y i). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | lxor_spec | |
add_spec: forall x y, to_Z (add x y) = Z.modulo (to_Z x + to_Z y) wB. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | add_spec | |
sub_spec: forall x y, to_Z (sub x y) = Z.modulo (to_Z x - to_Z y) wB. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | sub_spec | |
mul_spec: forall x y, to_Z (mul x y) = Z.modulo (to_Z x * to_Z y) wB. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | mul_spec | |
mulc_spec: forall x y,
to_Z x * to_Z y = to_Z (fst (mulc x y)) * wB + to_Z (snd (mulc x y)). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | mulc_spec | |
div_spec: forall x y, to_Z (div x y) = Z.div (to_Z x) (to_Z y). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | div_spec | |
mod_spec: forall x y,
to_Z (PrimInt63.mod x y) = Z.modulo (to_Z x) (to_Z y). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | mod_spec | |
eqb_correct: forall i j, eqb i j = true -> i = j. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | eqb_correct | |
eqb_refl: forall x, eqb x x = true. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | eqb_refl | |
ltb_spec: forall x y, ltb x y = true <-> to_Z x < to_Z y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | ltb_spec | |
leb_spec: forall x y, leb x y = true <-> to_Z x <= to_Z y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | leb_spec | |
compare_defx y :=
if ltb x y then Lt else if eqb x y then Eq else Gt. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | compare_def | |
compare_def_spec: forall x y, compare x y = compare_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | compare_def_spec | |
head0_spec: forall x, 0 < to_Z x ->
Z.div wB 2 <= 2 ^ (to_Z (head0 x)) * to_Z x < wB. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | head0_spec | |
tail0_spec: forall x, 0 < to_Z x ->
exists y, Z0 <= y /\ to_Z x = (2 * y + 1) * (2 ^ to_Z (tail0 x)). | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | tail0_spec | |
addc_defx y :=
let r := add x y in
if ltb r x then C1 r else C0 r. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addc_def | |
addc_def_spec: forall x y, addc x y = addc_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addc_def_spec | |
addcarryi j := add (add i j) 1. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addcarry | |
addcarryc_defx y :=
let r := addcarry x y in
if leb r x then C1 r else C0 r. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addcarryc_def | |
addcarryc_def_spec: forall x y, addcarryc x y = addcarryc_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addcarryc_def_spec | |
subc_defx y := if leb y x then C0 (sub x y) else C1 (sub x y). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | subc_def | |
subc_def_spec: forall x y, subc x y = subc_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | subc_def_spec | |
subcarryc_defx y :=
if ltb y x then C0 (sub (sub x y) 1) else C1 (sub (sub x y) 1). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | subcarryc_def | |
subcarryc_def_spec: forall x y, subcarryc x y = subcarryc_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | subcarryc_def_spec | |
diveucl_defx y := (div x y, PrimInt63.mod x y). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | diveucl_def | |
diveucl_def_spec: forall x y, diveucl x y = diveucl_def x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | diveucl_def_spec | |
diveucl_21_spec: forall a1 a2 b,
let (q,r) := diveucl_21 a1 a2 b in
let (q',r') := Z.div_eucl (to_Z a1 * wB + to_Z a2) (to_Z b) in
to_Z a1 < to_Z b -> to_Z q = q' /\ to_Z r = r'. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | diveucl_21_spec | |
addmuldiv_defp x y :=
lor (lsl x p) (lsr y (sub digits p)). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addmuldiv_def | |
addmuldiv_def_spec: forall p x y,
addmuldiv p x y = addmuldiv_def p x y. | Axiom | Corelib | [
"From Corelib Require Import BinNums PosDef IntDef",
"From Corelib Require Export PrimInt63"
] | Corelib/Numbers/Cyclic/Int63/Uint63Axioms.v | addmuldiv_def_spec | |
empty() := empty. | Ltac2 | Ltac2 | [
"Require Export Ltac2.Compat.Coq819",
"Require Ltac2.Array"
] | Ltac2/Compat/Coq818.v | empty |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.