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 |
|---|---|---|---|---|---|---|
Typereference := [
| VarRef (ident)
| ConstRef (constant)
| IndRef (inductive)
| ConstructRef (constructor)
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typestrength := [ Norm | Head ]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typered_flags := {
rStrength : strength;
rBeta : bool;
rMatch : bool;
rFix : bool;
rCofix : bool;
rZeta : bool;
rDelta : bool; (** true = delta all but rConst; false = delta only on rConst*)
rConst : reference list
}. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Type'a not_implemented. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typerec intro_pattern := [
| IntroForthcoming (bool)
| IntroNaming (intro_pattern_naming)
| IntroAction (intro_pattern_action)
]
with intro_pattern_naming := [
| IntroIdentifier (ident)
| IntroFresh (ident)
| IntroAnonymous
]
with intro_pattern_action := [
| IntroWildcard
| IntroOrAndPattern (or_and_intro_pattern)
| In... | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typedestruction_arg := [
| ElimOnConstr (unit -> constr_with_bindings)
| ElimOnIdent (ident)
| ElimOnAnonHyp (int)
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeinduction_clause := {
indcl_arg : destruction_arg;
indcl_eqn : intro_pattern_naming option;
indcl_as : or_and_intro_pattern option;
indcl_in : clause option;
}. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeassertion := [
| AssertType (intro_pattern option, constr, (unit -> unit) option)
| AssertValue (ident, constr)
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typerepeat := [
| Precisely (int)
| UpTo (int)
| RepeatStar
| RepeatPlus
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeorientation := [ LTR | RTL ]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typerewriting := {
rew_orient : orientation option;
rew_repeat : repeat;
rew_equatn : (unit -> constr_with_bindings);
}. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeevar_flag := bool. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeadvanced_flag := bool. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typemove_location := [
| MoveAfter (ident)
| MoveBefore (ident)
| MoveFirst
| MoveLast
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typeinversion_kind := [
| SimpleInversion
| FullInversion
| FullInversionClear
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typet. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
red(c : clause) : unit := eval_in Red.red c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | red | |
hnf(c : clause) : unit := eval_in Red.hnf c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | hnf | |
simpl(flags : red_flags) (occs : (pattern * occurrences) option) (c : clause) := eval_in (Red.simpl flags occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | simpl | |
cbv(flags : red_flags) (c : clause) : unit := eval_in (Red.cbv flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | cbv | |
cbn(flags : red_flags) (c : clause) : unit := eval_in (Red.cbn flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | cbn | |
lazy(flags : red_flags) (c : clause) : unit := eval_in (Red.lazy flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | lazy | |
unfold(occs : (reference * occurrences) list) (c : clause) : unit := eval_in (Red.unfold occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | unfold | |
fold(cs : constr list) (c : clause) : unit := eval_in (Red.fold cs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | fold | |
pattern(occs : (constr * occurrences) list) (c : clause) : unit := eval_in (Red.pattern occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | pattern | |
vm(ctx : (pattern * occurrences) option) (c : clause) : unit := eval_in (Red.vm ctx) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | vm | |
native(ctx : (pattern * occurrences) option) (c : clause) : unit := eval_in (Red.native ctx) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | native | |
eval_red(c : constr) : constr := eval Red.red c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_red | |
eval_hnf(c : constr) : constr := eval Red.hnf c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_hnf | |
eval_simpl(flags : red_flags) (occs : (pattern * occurrences) option) (c : constr) := eval (Red.simpl flags occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_simpl | |
eval_cbv(flags : red_flags) (c : constr) : constr := eval (Red.cbv flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_cbv | |
eval_cbn(flags : red_flags) (c : constr) : constr := eval (Red.cbn flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_cbn | |
eval_lazy(flags : red_flags) (c : constr) : constr := eval (Red.lazy flags) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_lazy | |
eval_unfold(occs : (reference * occurrences) list) (c : constr) : constr := eval (Red.unfold occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_unfold | |
eval_fold(cs : constr list) (c : constr) : constr := eval (Red.fold cs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_fold | |
eval_pattern(occs : (constr * occurrences) list) (c : constr) : constr := eval (Red.pattern occs) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_pattern | |
eval_vm(ctx : (pattern * occurrences) option) (c : constr) : constr := eval (Red.vm ctx) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_vm | |
eval_native(ctx : (pattern * occurrences) option) (c : constr) : constr := eval (Red.native ctx) c. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | eval_native | |
Typedebug := [ Off | Info | Debug ]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typestrategy := [ BFS | DFS ]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Std.v | Type | |
Typet := string. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/String.v | Type | |
is_emptys := match s with "" => true | _ => false end. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/String.v | is_empty | |
Typet. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/TransparentState.v | Type | |
Typet := uint63. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init"
] | Ltac2/Uint63.v | Type | |
Typeconv_flag := [
| CONV
| CUMUL
]. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init",
"Require Ltac2.TransparentState"
] | Ltac2/Unification.v | Type | |
conv_current: constr -> constr -> bool := fun c1 c2 => conv CONV (TransparentState.current ()) c1 c2. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init",
"Require Ltac2.TransparentState"
] | Ltac2/Unification.v | conv_current | |
conv_full: constr -> constr -> bool := fun c1 c2 => conv CONV TransparentState.full c1 c2. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init",
"Require Ltac2.TransparentState"
] | Ltac2/Unification.v | conv_full | |
unify_with_full_ts: constr -> constr -> unit := fun c1 c2 =>
unify TransparentState.full c1 c2. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init",
"Require Ltac2.TransparentState"
] | Ltac2/Unification.v | unify_with_full_ts | |
unify_with_current_ts: constr -> constr -> unit := fun c1 c2 =>
unify (TransparentState.current ()) c1 c2. | Ltac2 | Ltac2 | [
"Require Import Ltac2.Init",
"Require Ltac2.TransparentState"
] | Ltac2/Unification.v | unify_with_current_ts | |
get_out_of_bounds: forall A (t:array A) i,
in_bounds i t = false -> t.[i] = default t. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | get_out_of_bounds | |
get_set_same: forall A t i (a:A),
in_bounds i t = true -> t.[i<-a].[i] = a. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | get_set_same | |
get_set_other: forall A t i j (a:A), i <> j -> t.[i<-a].[j] = t.[j]. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | get_set_other | |
default_set: forall A t i (a:A), default t.[i<-a] = default t. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | default_set | |
get_make: forall A (a:A) size i, (make size a).[i] = a. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | get_make | |
leb_length: forall A (t:array A),
PrimInt63.leb (length t) max_length = true. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | leb_length | |
length_make: forall A size (a:A),
length (make size a) = if PrimInt63.leb size max_length then size else max_length. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | length_make | |
length_set: forall A t i (a:A),
length t.[i<-a] = length t. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | length_set | |
get_copy: forall A (t:array A) i, (copy t).[i] = t.[i]. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | get_copy | |
length_copy: forall A (t:array A), length (copy t) = length t. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | length_copy | |
array_ext: forall A (t1 t2:array A),
length t1 = length t2 ->
(forall i, in_bounds i t1 = true -> t1.[i] = t2.[i]) ->
default t1 = default t2 ->
t1 = t2. | Axiom | Corelib | [
"From Corelib Require Import PrimArray"
] | Corelib/Array/ArrayAxioms.v | array_ext | |
doublex :=
match x with
| 0 => 0
| Zpos p => Zpos p~0
| Zneg p => Zneg p~0
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | double | |
succ_doublex :=
match x with
| 0 => 1
| Zpos p => Zpos p~1
| Zneg p => Zneg (Pos.pred_double p)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | succ_double | |
pred_doublex :=
match x with
| 0 => Zneg 1
| Zneg p => Zneg p~1
| Zpos p => Zpos (Pos.pred_double p)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | pred_double | |
pos_sub(x y:positive) {struct y} : Z :=
match x, y with
| p~1, q~1 => double (pos_sub p q)
| p~1, q~0 => succ_double (pos_sub p q)
| p~1, xH => Zpos p~0
| p~0, q~1 => pred_double (pos_sub p q)
| p~0, q~0 => double (pos_sub p q)
| p~0, xH => Zpos (Pos.pred_double p)
| xH, q~1 => Zneg q~0
... | Fixpoint | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | pos_sub | |
addx y :=
match x, y with
| 0, y => y
| x, 0 => x
| Zpos x', Zpos y' => Zpos (Pos.add x' y')
| Zpos x', Zneg y' => pos_sub x' y'
| Zneg x', Zpos y' => pos_sub y' x'
| Zneg x', Zneg y' => Zneg (Pos.add x' y')
end.
Infix "+" := add : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | add | |
oppx :=
match x with
| 0 => 0
| Zpos x => Zneg x
| Zneg x => Zpos x
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | opp | |
subm n := m + -n.
Infix "-" := sub : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | sub | |
mulx y :=
match x, y with
| 0, _ => 0
| _, 0 => 0
| Zpos x', Zpos y' => Zpos (Pos.mul x' y')
| Zpos x', Zneg y' => Zneg (Pos.mul x' y')
| Zneg x', Zpos y' => Zneg (Pos.mul x' y')
| Zneg x', Zneg y' => Zpos (Pos.mul x' y')
end.
Infix "*" := mul : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | mul | |
pow_pos(z:Z) := Pos.iter (mul z) 1. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | pow_pos | |
powx y :=
match y with
| Zpos p => pow_pos x p
| 0 => 1
| Zneg _ => 0
end.
Infix "^" := pow : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | pow | |
comparex y :=
match x, y with
| 0, 0 => Eq
| 0, Zpos y' => Lt
| 0, Zneg y' => Gt
| Zpos x', 0 => Gt
| Zpos x', Zpos y' => Pos.compare x' y'
| Zpos x', Zneg y' => Gt
| Zneg x', 0 => Lt
| Zneg x', Zpos y' => Lt
| Zneg x', Zneg y' => CompOpp (Pos.compare x' y')
end.
Infix "?=" := c... | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | compare | |
ltx y := (x ?= y) = Lt. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | lt | |
gtx y := (x ?= y) = Gt. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | gt | |
lex y := (x ?= y) <> Gt. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | le | |
gex y := (x ?= y) <> Lt.
Infix "<=" := le : Z_scope.
Infix "<" := lt : Z_scope.
Infix ">=" := ge : Z_scope.
Infix ">" := gt : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | ge | |
lebx y :=
match compare x y with
| Gt => false
| _ => true
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | leb | |
ltbx y :=
match compare x y with
| Lt => true
| _ => false
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | ltb | |
eqbx y :=
match x, y with
| 0, 0 => true
| Zpos p, Zpos q => Pos.eqb p q
| Zneg p, Zneg q => Pos.eqb p q
| _, _ => false
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | eqb | |
maxn m :=
match compare n m with
| Eq | Gt => n
| Lt => m
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | max | |
minn m :=
match compare n m with
| Eq | Lt => n
| Gt => m
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | min | |
to_nat(z:Z) : nat :=
match z with
| Zpos p => Pos.to_nat p
| _ => O
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | to_nat | |
of_nat(n:nat) : Z :=
match n with
| O => 0
| S n => Zpos (Pos.of_succ_nat n)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | of_nat | |
of_N(n:N) : Z :=
match n with
| N0 => 0
| Npos p => Zpos p
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | of_N | |
to_pos(z:Z) : positive :=
match z with
| Zpos p => p
| _ => 1%positive
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | to_pos | |
pos_div_eucl(a:positive) (b:Z) : Z * Z :=
match a with
| xH => if leb 2 b then (0, 1) else (1, 0)
| xO a' =>
let (q, r) := pos_div_eucl a' b in
let r' := 2 * r in
if ltb r' b then (2 * q, r') else (2 * q + 1, r' - b)
| xI a' =>
let (q, r) := pos_div_eucl a' b in
let r' := 2 *... | Fixpoint | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | pos_div_eucl | |
div_eucl(a b:Z) : Z * Z :=
match a, b with
| 0, _ => (0, 0)
| _, 0 => (0, a)
| Zpos a', Zpos _ => pos_div_eucl a' b
| Zneg a', Zpos _ =>
let (q, r) := pos_div_eucl a' b in
match r with
| 0 => (- q, 0)
| _ => (- (q + 1), b - r)
end
| Zneg a', Zneg b' =>
... | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | div_eucl | |
div(a b:Z) : Z := let (q, _) := div_eucl a b in q. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | div | |
modulo(a b:Z) : Z := let (_, r) := div_eucl a b in r. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | modulo | |
quotrem(a b:Z) : Z * Z :=
match a, b with
| 0, _ => (0, 0)
| _, 0 => (0, a)
| Zpos a, Zpos b =>
let (q, r) := N.pos_div_eucl a (Npos b) in (of_N q, of_N r)
| Zneg a, Zpos b =>
let (q, r) := N.pos_div_eucl a (Npos b) in (-of_N q, - of_N r)
| Zpos a, Zneg b =>
let (q, r) := N.pos_div_euc... | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | quotrem | |
quota b := fst (quotrem a b). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | quot | |
rema b := snd (quotrem a b).
Infix "÷" := quot (at level 40, left associativity) : Z_scope. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | rem | |
evenz :=
match z with
| 0 => true
| Zpos (xO _) => true
| Zneg (xO _) => true
| _ => false
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | even | |
div2z :=
match z with
| 0 => 0
| Zpos 1 => 0
| Zpos p => Zpos (Pos.div2 p)
| Zneg p => Zneg (Pos.div2_up p)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | div2 | |
sqrtremn :=
match n with
| 0 => (0, 0)
| Zpos p =>
match Pos.sqrtrem p with
| (s, Pos.IsPos r) => (Zpos s, Zpos r)
| (s, _) => (Zpos s, 0)
end
| Zneg _ => (0,0)
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | sqrtrem | |
shiftla n :=
match n with
| 0 => a
| Zpos p => Pos.iter (mul 2) a p
| Zneg p => Pos.iter div2 a p
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | shiftl | |
shiftra n := shiftl a (-n). | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | shiftr | |
lora b :=
match a, b with
| 0, _ => b
| _, 0 => a
| Zpos a, Zpos b => Zpos (Pos.lor a b)
| Zneg a, Zpos b => Zneg (N.succ_pos (N.ldiff (Pos.pred_N a) (Npos b)))
| Zpos a, Zneg b => Zneg (N.succ_pos (N.ldiff (Pos.pred_N b) (Npos a)))
| Zneg a, Zneg b => Zneg (N.succ_pos (N.land (Pos.pred_N a) (Pos.pre... | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | lor | |
landa b :=
match a, b with
| 0, _ => 0
| _, 0 => 0
| Zpos a, Zpos b => of_N (Pos.land a b)
| Zneg a, Zpos b => of_N (N.ldiff (Npos b) (Pos.pred_N a))
| Zpos a, Zneg b => of_N (N.ldiff (Npos a) (Pos.pred_N b))
| Zneg a, Zneg b => Zneg (N.succ_pos (N.lor (Pos.pred_N a) (Pos.pred_N b)))
end. | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | land | |
lxora b :=
match a, b with
| 0, _ => b
| _, 0 => a
| Zpos a, Zpos b => of_N (Pos.lxor a b)
| Zneg a, Zpos b => Zneg (N.succ_pos (N.lxor (Pos.pred_N a) (Npos b)))
| Zpos a, Zneg b => Zneg (N.succ_pos (N.lxor (Npos a) (Pos.pred_N b)))
| Zneg a, Zneg b => of_N (N.lxor (Pos.pred_N a) (Pos.pred_N b))
end... | Definition | Corelib | [
"From Corelib Require Import BinNums PosDef NatDef"
] | Corelib/BinNums/IntDef.v | lxor | |
succ_doublex :=
match x with
| N0 => Npos 1
| Npos p => Npos p~1
end. | Definition | Corelib | [
"From Corelib Require Export BinNums PosDef"
] | Corelib/BinNums/NatDef.v | succ_double |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.