file_name stringlengths 5 52 | name stringlengths 4 95 | original_source_type stringlengths 0 23k | source_type stringlengths 9 23k | source_definition stringlengths 9 57.9k | source dict | source_range dict | file_context stringlengths 0 721k | dependencies dict | opens_and_abbrevs listlengths 2 94 | vconfig dict | interleaved bool 1
class | verbose_type stringlengths 1 7.42k | effect stringclasses 118
values | effect_flags listlengths 0 2 | mutual_with listlengths 0 11 | ideal_premises listlengths 0 236 | proof_features listlengths 0 1 | is_simple_lemma bool 2
classes | is_div bool 2
classes | is_proof bool 2
classes | is_simply_typed bool 2
classes | is_type bool 2
classes | partial_definition stringlengths 5 3.99k | completed_definiton stringlengths 1 1.63M | isa_cross_project_example bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FStar.UInt128.fst | FStar.UInt128.lem_ult | val lem_ult (a b: uint_t 64) : Lemma (if a < b then fact1 a b else fact0 a b) | val lem_ult (a b: uint_t 64) : Lemma (if a < b then fact1 a b else fact0 a b) | let lem_ult (a b:uint_t 64)
: Lemma (if a < b
then fact1 a b
else fact0 a b)
= int2bv_ult a b;
lem_ult_1 a b;
lem_ult_2 a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 96,
"start_col": 0,
"start_line": 90
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt.uint_t 64 -> b: FStar.UInt.uint_t 64
-> FStar.Pervasives.Lemma
(ensures
((match a < b with
| true -> FStar.UInt128.fact1 a b
| _ -> FStar.UInt128.fact0 a b)
<:
Type0)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt.uint_t",
"FStar.UInt128.lem_ult_2",
"Prims.unit",
"FStar.UInt128.lem_ult_1",
"FStar.UInt128.int2bv_ult",
"Prims.l_True",
"Prims.squash",
"Prims.op_LessThan",
"FStar.UInt128.fact1",
"Prims.bool",
"FStar.UInt128.fact0",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let lem_ult (a b: uint_t 64) : Lemma (if a < b then fact1 a b else fact0 a b) =
| int2bv_ult a b;
lem_ult_1 a b;
lem_ult_2 a b | false |
FStar.UInt128.fst | FStar.UInt128.int2bv_ult | val int2bv_ult (#n: pos) (a b: uint_t n)
: Lemma (ensures a < b <==> bvult #n (int2bv #n a) (int2bv #n b)) | val int2bv_ult (#n: pos) (a b: uint_t n)
: Lemma (ensures a < b <==> bvult #n (int2bv #n a) (int2bv #n b)) | let int2bv_ult (#n: pos) (a b: uint_t n)
: Lemma (ensures a < b <==> bvult #n (int2bv #n a) (int2bv #n b))
= introduce (a < b) ==> (bvult #n (int2bv #n a) (int2bv #n b))
with _ . FStar.BV.int2bv_lemma_ult_1 a b;
introduce (bvult #n (int2bv #n a) (int2bv #n b)) ==> (a < b)
with _ . FStar.BV.int2bv_lemma_... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 88,
"start_col": 0,
"start_line": 83
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt.uint_t n -> b: FStar.UInt.uint_t n
-> FStar.Pervasives.Lemma
(ensures a < b <==> FStar.BV.bvult (FStar.BV.int2bv a) (FStar.BV.int2bv b)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.UInt.uint_t",
"FStar.Classical.Sugar.implies_intro",
"Prims.b2t",
"FStar.BV.bvult",
"FStar.BV.int2bv",
"Prims.squash",
"Prims.op_LessThan",
"FStar.BV.int2bv_lemma_ult_2",
"Prims.unit",
"FStar.BV.int2bv_lemma_ult_1",
"Prims.l_True",
"Prims.l_iff",
"Prims.Nil",
"FStar.P... | [] | false | false | true | false | false | let int2bv_ult (#n: pos) (a b: uint_t n)
: Lemma (ensures a < b <==> bvult #n (int2bv #n a) (int2bv #n b)) =
| introduce (a < b) ==> (bvult #n (int2bv #n a) (int2bv #n b))
with _. FStar.BV.int2bv_lemma_ult_1 a b;
introduce (bvult #n (int2bv #n a) (int2bv #n b)) ==> (a < b)
with _. FStar.BV.int2bv_lemma_ult_2 a b | false |
FStar.UInt128.fst | FStar.UInt128.t | val t: (x:Type0{hasEq x}) | val t: (x:Type0{hasEq x}) | let t = uint128 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 113,
"start_col": 0,
"start_line": 113
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Type0{Prims.hasEq x} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.uint128"
] | [] | false | false | false | false | false | let t =
| uint128 | false |
FStar.UInt128.fst | FStar.UInt128.v | val v (x:t) : Tot (uint_t n) | val v (x:t) : Tot (uint_t n) | let v x = U64.v x.low + (U64.v x.high) * (pow2 64) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 50,
"end_line": 119,
"start_col": 0,
"start_line": 119
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt128.t -> FStar.UInt.uint_t FStar.UInt128.n | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.t",
"Prims.op_Addition",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.Mul.op_Star",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.pow2",
"FStar.UInt.uint_t",
"FStar.UInt128.n"
] | [] | false | false | false | true | false | let v x =
| U64.v x.low + (U64.v x.high) * (pow2 64) | false |
FStar.UInt128.fst | FStar.UInt128.mod_mul | val mod_mul: n:nat -> k1:pos -> k2:pos ->
Lemma ((n % k2) * k1 == (n * k1) % (k1*k2)) | val mod_mul: n:nat -> k1:pos -> k2:pos ->
Lemma ((n % k2) * k1 == (n * k1) % (k1*k2)) | let mod_mul n k1 k2 =
Math.modulo_scale_lemma n k1 k2 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 221,
"start_col": 0,
"start_line": 220
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> k1: Prims.pos -> k2: Prims.pos
-> FStar.Pervasives.Lemma (ensures (n % k2) * k1 == n * k1 % (k1 * k2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.Math.Lemmas.modulo_scale_lemma",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_mul n k1 k2 =
| Math.modulo_scale_lemma n k1 k2 | false |
FStar.UInt128.fst | FStar.UInt128.mod_mod | val mod_mod: a:nat -> k:nat{k>0} -> k':nat{k'>0} ->
Lemma ((a % k) % (k'*k) == a % k) | val mod_mod: a:nat -> k:nat{k>0} -> k':nat{k'>0} ->
Lemma ((a % k) % (k'*k) == a % k) | let mod_mod a k k' =
assert (a % k < k);
assert (a % k < k' * k) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 203,
"start_col": 0,
"start_line": 201
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> k: Prims.nat{k > 0} -> k': Prims.nat{k' > 0}
-> FStar.Pervasives.Lemma (ensures a % k % (k' * k) == a % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims._assert",
"Prims.op_LessThan",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_mod a k k' =
| assert (a % k < k);
assert (a % k < k' * k) | false |
FStar.UInt128.fst | FStar.UInt128.v_inj | val v_inj (x1 x2: t): Lemma (requires (v x1 == v x2)) (ensures (x1 == x2)) | val v_inj (x1 x2: t): Lemma (requires (v x1 == v x2)) (ensures (x1 == x2)) | let v_inj (x1 x2: t): Lemma (requires (v x1 == v x2))
(ensures x1 == x2) =
assert (uint_to_t (v x1) == uint_to_t (v x2));
assert (uint_to_t (v x1) == x1);
assert (uint_to_t (v x2) == x2);
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 133,
"start_col": 0,
"start_line": 128
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x1: FStar.UInt128.t -> x2: FStar.UInt128.t
-> FStar.Pervasives.Lemma (requires FStar.UInt128.v x1 == FStar.UInt128.v x2) (ensures x1 == x2) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.UInt128.uint_to_t",
"FStar.UInt128.v",
"FStar.UInt.uint_t",
"FStar.UInt128.n",
"Prims.squash",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let v_inj (x1 x2: t) : Lemma (requires (v x1 == v x2)) (ensures x1 == x2) =
| assert (uint_to_t (v x1) == uint_to_t (v x2));
assert (uint_to_t (v x1) == x1);
assert (uint_to_t (v x2) == x2);
() | false |
FStar.UInt128.fst | FStar.UInt128.uint_to_t | val uint_to_t: x:uint_t n -> Pure t
(requires True)
(ensures (fun y -> v y = x)) | val uint_to_t: x:uint_t n -> Pure t
(requires True)
(ensures (fun y -> v y = x)) | let uint_to_t x =
div_mod x (pow2 64);
{ low = U64.uint_to_t (x % (pow2 64));
high = U64.uint_to_t (x / (pow2 64)); } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 45,
"end_line": 126,
"start_col": 0,
"start_line": 123
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt.uint_t FStar.UInt128.n -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt.uint_t",
"FStar.UInt128.n",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.uint_to_t",
"Prims.op_Modulus",
"Prims.pow2",
"Prims.op_Division",
"Prims.unit",
"FStar.UInt128.div_mod",
"FStar.UInt128.t"
] | [] | false | false | false | false | false | let uint_to_t x =
| div_mod x (pow2 64);
{ low = U64.uint_to_t (x % (pow2 64)); high = U64.uint_to_t (x / (pow2 64)) } | false |
FStar.UInt128.fst | FStar.UInt128.carry | val carry (a b: U64.t)
: Pure U64.t
(requires True)
(ensures (fun r -> U64.v r == (if U64.v a < U64.v b then 1 else 0))) | val carry (a b: U64.t)
: Pure U64.t
(requires True)
(ensures (fun r -> U64.v r == (if U64.v a < U64.v b then 1 else 0))) | let carry (a b: U64.t) : Pure U64.t
(requires True)
(ensures (fun r -> U64.v r == (if U64.v a < U64.v b then 1 else 0))) =
constant_time_carry_ok a b;
constant_time_carry a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 176,
"start_col": 0,
"start_line": 172
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t -> Prims.Pure FStar.UInt64.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.constant_time_carry",
"Prims.unit",
"FStar.UInt128.constant_time_carry_ok",
"Prims.l_True",
"Prims.eq2",
"Prims.int",
"FStar.UInt64.v",
"Prims.op_LessThan",
"Prims.bool"
] | [] | false | false | false | false | false | let carry (a b: U64.t)
: Pure U64.t
(requires True)
(ensures (fun r -> U64.v r == (if U64.v a < U64.v b then 1 else 0))) =
| constant_time_carry_ok a b;
constant_time_carry a b | false |
FStar.UInt128.fst | FStar.UInt128.vec128 | val vec128 (a: t) : BV.bv_t 128 | val vec128 (a: t) : BV.bv_t 128 | let vec128 (a: t) : BV.bv_t 128 = UInt.to_vec #128 (v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 56,
"end_line": 388,
"start_col": 0,
"start_line": 388
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> FStar.BitVector.bv_t 128 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.t",
"FStar.UInt.to_vec",
"FStar.UInt128.v",
"FStar.BitVector.bv_t"
] | [] | false | false | false | false | false | let vec128 (a: t) : BV.bv_t 128 =
| UInt.to_vec #128 (v a) | false |
Hacl.Bignum4096_32.fsti | Hacl.Bignum4096_32.n_bytes | val n_bytes : FStar.UInt32.t | let n_bytes = n_limbs `FStar.UInt32.mul` 4ul | {
"file_name": "code/bignum/Hacl.Bignum4096_32.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 18,
"start_col": 0,
"start_line": 18
} | module Hacl.Bignum4096_32
open FStar.Mul
module BN = Hacl.Bignum
module BS = Hacl.Bignum.SafeAPI
module MA = Hacl.Bignum.MontArithmetic
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
inline_for_extraction noextract
let t_limbs: Hacl.Bignum.Definitions.limb_t = Lib.IntTypes.U32
inline_for_extraction noextract
let ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Bignum.SafeAPI.fst.checked",
"Hacl.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.MontArithmetic",
"short_module": "MA"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.SafeAPI",
"short_module": "BS"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | FStar.UInt32.t | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.mul",
"Hacl.Bignum4096_32.n_limbs",
"FStar.UInt32.__uint_to_t"
] | [] | false | false | false | true | false | let n_bytes =
| n_limbs `FStar.UInt32.mul` 4ul | false | |
FStar.UInt128.fst | FStar.UInt128.vec64 | val vec64 (a: U64.t) : BV.bv_t 64 | val vec64 (a: U64.t) : BV.bv_t 64 | let vec64 (a: U64.t) : BV.bv_t 64 = UInt.to_vec (U64.v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 57,
"end_line": 389,
"start_col": 0,
"start_line": 389
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> FStar.BitVector.bv_t 64 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.to_vec",
"FStar.UInt64.n",
"FStar.UInt64.v",
"FStar.BitVector.bv_t"
] | [] | false | false | false | false | false | let vec64 (a: U64.t) : BV.bv_t 64 =
| UInt.to_vec (U64.v a) | false |
FStar.UInt128.fst | FStar.UInt128.div_product | val div_product : n:nat -> m1:nat{m1>0} -> m2:nat{m2>0} ->
Lemma (n / (m1*m2) == (n / m1) / m2) | val div_product : n:nat -> m1:nat{m1>0} -> m2:nat{m2>0} ->
Lemma (n / (m1*m2) == (n / m1) / m2) | let div_product n m1 m2 =
Math.division_multiplication_lemma n m1 m2 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 211,
"start_col": 0,
"start_line": 210
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> m1: Prims.nat{m1 > 0} -> m2: Prims.nat{m2 > 0}
-> FStar.Pervasives.Lemma (ensures n / (m1 * m2) == n / m1 / m2) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Math.Lemmas.division_multiplication_lemma",
"Prims.unit"
] | [] | true | false | true | false | false | let div_product n m1 m2 =
| Math.division_multiplication_lemma n m1 m2 | false |
FStar.UInt128.fst | FStar.UInt128.add | val add: a:t -> b:t -> Pure t
(requires (size (v a + v b) n))
(ensures (fun c -> v a + v b = v c)) | val add: a:t -> b:t -> Pure t
(requires (size (v a + v b) n))
(ensures (fun c -> v a + v b = v c)) | let add (a b: t) : Pure t
(requires (v a + v b < pow2 128))
(ensures (fun r -> v a + v b = v r)) =
let l = U64.add_mod a.low b.low in
carry_sum_ok a.low b.low;
{ low = l;
high = U64.add (U64.add a.high b.high) (carry l b.low); } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 187,
"start_col": 0,
"start_line": 181
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.add",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.carry",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.unit",
"FStar.UInt128.carry_sum_ok",
"FStar.UInt64.t",
"FStar.UInt64.add_mod",
"Prims.b2t",
"Prims.op_Les... | [] | false | false | false | false | false | let add (a b: t) : Pure t (requires (v a + v b < pow2 128)) (ensures (fun r -> v a + v b = v r)) =
| let l = U64.add_mod a.low b.low in
carry_sum_ok a.low b.low;
{ low = l; high = U64.add (U64.add a.high b.high) (carry l b.low) } | false |
FStar.UInt128.fst | FStar.UInt128.mod_add | val mod_add: n1:nat -> n2:nat -> k:nat{k > 0} ->
Lemma ((n1 % k + n2 % k) % k == (n1 + n2) % k) | val mod_add: n1:nat -> n2:nat -> k:nat{k > 0} ->
Lemma ((n1 % k + n2 % k) % k == (n1 + n2) % k) | let mod_add n1 n2 k = Math.modulo_distributivity n1 n2 k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 56,
"end_line": 228,
"start_col": 0,
"start_line": 228
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n1: Prims.nat -> n2: Prims.nat -> k: Prims.nat{k > 0}
-> FStar.Pervasives.Lemma (ensures (n1 % k + n2 % k) % k == (n1 + n2) % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Math.Lemmas.modulo_distributivity",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_add n1 n2 k =
| Math.modulo_distributivity n1 n2 k | false |
Hacl.Bignum4096_32.fsti | Hacl.Bignum4096_32.n_limbs | val n_limbs:BN.meta_len t_limbs | val n_limbs:BN.meta_len t_limbs | let n_limbs: BN.meta_len t_limbs = 128ul | {
"file_name": "code/bignum/Hacl.Bignum4096_32.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 15,
"start_col": 0,
"start_line": 15
} | module Hacl.Bignum4096_32
open FStar.Mul
module BN = Hacl.Bignum
module BS = Hacl.Bignum.SafeAPI
module MA = Hacl.Bignum.MontArithmetic
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
inline_for_extraction noextract
let t_limbs: Hacl.Bignum.Definitions.limb_t = Lib.IntTypes.U32 | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Bignum.SafeAPI.fst.checked",
"Hacl.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.MontArithmetic",
"short_module": "MA"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.SafeAPI",
"short_module": "BS"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Bignum.meta_len Hacl.Bignum4096_32.t_limbs | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.__uint_to_t"
] | [] | false | false | false | true | false | let n_limbs:BN.meta_len t_limbs =
| 128ul | false |
FStar.UInt128.fst | FStar.UInt128.mod_spec_rew_n | val mod_spec_rew_n (n: nat) (k: nat{k > 0}) : Lemma (n == (n / k) * k + n % k) | val mod_spec_rew_n (n: nat) (k: nat{k > 0}) : Lemma (n == (n / k) * k + n % k) | let mod_spec_rew_n (n:nat) (k:nat{k > 0}) :
Lemma (n == n / k * k + n % k) = mod_spec n k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 224,
"start_col": 0,
"start_line": 223
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> k: Prims.nat{k > 0} -> FStar.Pervasives.Lemma (ensures n == (n / k) * k + n % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.UInt128.mod_spec",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.op_Division",
"Prims.op_Modulus",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let mod_spec_rew_n (n: nat) (k: nat{k > 0}) : Lemma (n == (n / k) * k + n % k) =
| mod_spec n k | false |
FStar.UInt128.fst | FStar.UInt128.mod_add_small | val mod_add_small: n1:nat -> n2:nat -> k:nat{k > 0} -> Lemma
(requires (n1 % k + n2 % k < k))
(ensures (n1 % k + n2 % k == (n1 + n2) % k)) | val mod_add_small: n1:nat -> n2:nat -> k:nat{k > 0} -> Lemma
(requires (n1 % k + n2 % k < k))
(ensures (n1 % k + n2 % k == (n1 + n2) % k)) | let mod_add_small n1 n2 k =
mod_add n1 n2 k;
Math.small_modulo_lemma_1 (n1%k + n2%k) k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 43,
"end_line": 235,
"start_col": 0,
"start_line": 233
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n1: Prims.nat -> n2: Prims.nat -> k: Prims.nat{k > 0}
-> FStar.Pervasives.Lemma (requires n1 % k + n2 % k < k)
(ensures n1 % k + n2 % k == (n1 + n2) % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Math.Lemmas.small_modulo_lemma_1",
"Prims.op_Addition",
"Prims.op_Modulus",
"Prims.unit",
"FStar.UInt128.mod_add"
] | [] | true | false | true | false | false | let mod_add_small n1 n2 k =
| mod_add n1 n2 k;
Math.small_modulo_lemma_1 (n1 % k + n2 % k) k | false |
FStar.UInt128.fst | FStar.UInt128.sub_mod_wrap1_ok | val sub_mod_wrap1_ok : a:t -> b:t -> Lemma
(requires (v a - v b < 0 /\ U64.v a.low < U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | val sub_mod_wrap1_ok : a:t -> b:t -> Lemma
(requires (v a - v b < 0 /\ U64.v a.low < U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | let sub_mod_wrap1_ok a b =
// carry == 1 and subtraction in low wraps
let l = U64.sub_mod a.low b.low in
assert (U64.v (carry a.low l) == 1);
u64_diff_wrap a.low b.low;
// a.high <= b.high since v a < v b;
// case split on equality and strictly less
if U64.v a.high = U64.v b.high then ()
... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 7,
"end_line": 334,
"start_col": 0,
"start_line": 323
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 10,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t
-> FStar.Pervasives.Lemma
(requires
FStar.UInt128.v a - FStar.UInt128.v b < 0 /\
FStar.UInt64.v (Mkuint128?.low a) < FStar.UInt64.v (Mkuint128?.low b))
(ensures
FStar.UInt128.v (FStar.UInt128.sub_mod_impl a b) =
FStar.UInt128.v a - F... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.op_Equality",
"FStar.UInt.uint_t",
"FStar.UInt64.n",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.bool",
"Prims.unit",
"FStar.UInt128.u64_diff_wrap",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims._assert",
"Prims.eq2",
"Prims.int",
... | [] | false | false | true | false | false | let sub_mod_wrap1_ok a b =
| let l = U64.sub_mod a.low b.low in
assert (U64.v (carry a.low l) == 1);
u64_diff_wrap a.low b.low;
if U64.v a.high = U64.v b.high
then ()
else
(u64_diff_wrap a.high b.high;
()) | false |
FStar.UInt128.fst | FStar.UInt128.add_underspec | val add_underspec: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c ->
size (v a + v b) n ==> v a + v b = v c)) | val add_underspec: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c ->
size (v a + v b) n ==> v a + v b = v c)) | let add_underspec (a b: t) =
let l = U64.add_mod a.low b.low in
begin
if v a + v b < pow2 128
then carry_sum_ok a.low b.low
else ()
end;
{ low = l;
high = U64.add_underspec (U64.add_underspec a.high b.high) (carry l b.low); } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 83,
"end_line": 197,
"start_col": 0,
"start_line": 189
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.add_underspec",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.carry",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.unit",
"Prims.op_LessThan",
"Prims.op_Addition",
"FStar.UInt128.v",
"Prims.pow2",
"FStar.UInt12... | [] | false | false | false | false | false | let add_underspec (a b: t) =
| let l = U64.add_mod a.low b.low in
if v a + v b < pow2 128 then carry_sum_ok a.low b.low;
{ low = l; high = U64.add_underspec (U64.add_underspec a.high b.high) (carry l b.low) } | false |
FStar.UInt128.fst | FStar.UInt128.sub_mod_wrap2_ok | val sub_mod_wrap2_ok (a b: t)
: Lemma (requires (v a - v b < 0 /\ U64.v a.low >= U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | val sub_mod_wrap2_ok (a b: t)
: Lemma (requires (v a - v b < 0 /\ U64.v a.low >= U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | let sub_mod_wrap2_ok (a b:t) : Lemma
(requires (v a - v b < 0 /\ U64.v a.low >= U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) =
// carry == 0, subtraction in low is exact, but subtraction in high
// must wrap since v a < v b
let l = U64.sub_mod a.low b.low in
let r = sub_mod_impl a b... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 352,
"start_col": 0,
"start_line": 341
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t
-> FStar.Pervasives.Lemma
(requires
FStar.UInt128.v a - FStar.UInt128.v b < 0 /\
FStar.UInt64.v (Mkuint128?.low a) >= FStar.UInt64.v (Mkuint128?.low b))
(ensures
FStar.UInt128.v (FStar.UInt128.sub_mod_impl a b) =
FStar.UInt128.v a - ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.UInt64.v",
"FStar.UInt64.sub_mod",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_Addition",
"Prims.op_Subtraction",
"Prims.pow2",
"FStar.UInt128.sum_lt",
"FStar.UInt128.__proj__Mkuint128__item__low"... | [] | true | false | true | false | false | let sub_mod_wrap2_ok (a b: t)
: Lemma (requires (v a - v b < 0 /\ U64.v a.low >= U64.v b.low))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) =
| let l = U64.sub_mod a.low b.low in
let r = sub_mod_impl a b in
assert (U64.v l == U64.v a.low - U64.v b.low);
assert (U64.v (carry a.low l) == 0);
sum_lt (U64.v a.low) (U64.v a.high * pow2 64) (U64.v b.low) (U64.v b.high * pow2 64);
assert (U64.v (U64.sub_mod a.high b.high) == U64.v a.high - U64.v b.high + pow2 64);
() | false |
FStar.UInt128.fst | FStar.UInt128.sub_mod_pos_ok | val sub_mod_pos_ok (a b: t)
: Lemma (requires (v a - v b >= 0)) (ensures (v (sub_mod_impl a b) = v a - v b)) | val sub_mod_pos_ok (a b: t)
: Lemma (requires (v a - v b >= 0)) (ensures (v (sub_mod_impl a b) = v a - v b)) | let sub_mod_pos_ok (a b:t) : Lemma
(requires (v a - v b >= 0))
(ensures (v (sub_mod_impl a b) = v a - v b)) =
assert (sub a b == sub_mod_impl a b);
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 309,
"start_col": 0,
"start_line": 305
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 10,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t
-> FStar.Pervasives.Lemma (requires FStar.UInt128.v a - FStar.UInt128.v b >= 0)
(ensures
FStar.UInt128.v (FStar.UInt128.sub_mod_impl a b) = FStar.UInt128.v a - FStar.UInt128.v b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.UInt128.sub",
"FStar.UInt128.sub_mod_impl",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.op_Subtraction",
"FStar.UInt128.v",
"Prims.squash",
"Prims.op_Equality",
"Prims.int",
"Prims.Nil",
"FStar.Pervasives.patter... | [] | true | false | true | false | false | let sub_mod_pos_ok (a b: t)
: Lemma (requires (v a - v b >= 0)) (ensures (v (sub_mod_impl a b) = v a - v b)) =
| assert (sub a b == sub_mod_impl a b);
() | false |
FStar.UInt128.fst | FStar.UInt128.mul_div_cancel | val mul_div_cancel : n:nat -> k:nat{k>0} ->
Lemma ((n * k) / k == n) | val mul_div_cancel : n:nat -> k:nat{k>0} ->
Lemma ((n * k) / k == n) | let mul_div_cancel n k =
Math.cancel_mul_div n k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 216,
"start_col": 0,
"start_line": 215
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> k: Prims.nat{k > 0} -> FStar.Pervasives.Lemma (ensures n * k / k == n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Math.Lemmas.cancel_mul_div",
"Prims.unit"
] | [] | true | false | true | false | false | let mul_div_cancel n k =
| Math.cancel_mul_div n k | false |
FStar.UInt128.fst | FStar.UInt128.sub_mod | val sub_mod: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c -> (v a - v b) % pow2 n = v c)) | val sub_mod: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c -> (v a - v b) % pow2 n = v c)) | let sub_mod (a b: t) : Pure t
(requires True)
(ensures (fun r -> v r = (v a - v b) % pow2 128)) =
(if v a - v b >= 0
then sub_mod_pos_ok a b
else sub_mod_wrap_ok a b);
sub_mod_impl a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 368,
"start_col": 0,
"start_line": 362
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.sub_mod_impl",
"Prims.unit",
"Prims.op_GreaterThanOrEqual",
"Prims.op_Subtraction",
"FStar.UInt128.v",
"FStar.UInt128.sub_mod_pos_ok",
"Prims.bool",
"FStar.UInt128.sub_mod_wrap_ok",
"Prims.l_True",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_M... | [] | false | false | false | false | false | let sub_mod (a b: t) : Pure t (requires True) (ensures (fun r -> v r = (v a - v b) % pow2 128)) =
| (if v a - v b >= 0 then sub_mod_pos_ok a b else sub_mod_wrap_ok a b);
sub_mod_impl a b | false |
FStar.UInt128.fst | FStar.UInt128.constant_time_carry_ok | val constant_time_carry_ok (a b: U64.t)
: Lemma (constant_time_carry a b == (if U64.lt a b then U64.uint_to_t 1 else U64.uint_to_t 0)) | val constant_time_carry_ok (a b: U64.t)
: Lemma (constant_time_carry a b == (if U64.lt a b then U64.uint_to_t 1 else U64.uint_to_t 0)) | let constant_time_carry_ok (a b:U64.t)
: Lemma (constant_time_carry a b ==
(if U64.lt a b then U64.uint_to_t 1 else U64.uint_to_t 0))
= calc (==) {
U64.v (constant_time_carry a b);
(==) { carry_uint64_equiv a b }
carry_uint64 (U64.v a) (U64.v b);
(==) { inverse_num_lemma (carry_uint64... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 98,
"end_line": 170,
"start_col": 0,
"start_line": 144
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.constant_time_carry a b ==
(match FStar.UInt64.lt a b with
| true -> 1uL
| _ -> 0uL)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt64.v_inj",
"FStar.UInt128.constant_time_carry",
"FStar.UInt64.lt",
"FStar.UInt64.uint_to_t",
"Prims.bool",
"Prims.unit",
"FStar.Tactics.Effect.assert_by_tactic",
"Prims.eq2",
"FStar.UInt.uint_t",
"FStar.UInt64.n",
"FStar.BV.bv2int",
"Prims.op_LessThan",
"FStar.... | [] | false | false | true | false | false | let constant_time_carry_ok (a b: U64.t)
: Lemma (constant_time_carry a b == (if U64.lt a b then U64.uint_to_t 1 else U64.uint_to_t 0)) =
| calc ( == ) {
U64.v (constant_time_carry a b);
( == ) { carry_uint64_equiv a b }
carry_uint64 (U64.v a) (U64.v b);
( == ) { inverse_num_lemma (carry_uint64 (U64.v a) (U64.v b)) }
bv2int (int2bv (carry_uint64 (U64.v a) (U64.v b)));
( == ) { (carry_uint64_ok (U64.v a) (U64.v b);
bv2int_fun (int2bv (carry_... | false |
FStar.UInt128.fst | FStar.UInt128.sub | val sub: a:t -> b:t -> Pure t
(requires (size (v a - v b) n))
(ensures (fun c -> v a - v b = v c)) | val sub: a:t -> b:t -> Pure t
(requires (size (v a - v b) n))
(ensures (fun c -> v a - v b = v c)) | let sub (a b: t) : Pure t
(requires (v a - v b >= 0))
(ensures (fun r -> v r = v a - v b)) =
let l = U64.sub_mod a.low b.low in
{ low = l;
high = U64.sub (U64.sub a.high b.high) (carry a.low l); } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 291,
"start_col": 0,
"start_line": 286
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 5,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_eli... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.sub",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.carry",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt64.t",
"FStar.UInt64.sub_mod",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.op_Subtraction",
"F... | [] | false | false | false | false | false | let sub (a b: t) : Pure t (requires (v a - v b >= 0)) (ensures (fun r -> v r = v a - v b)) =
| let l = U64.sub_mod a.low b.low in
{ low = l; high = U64.sub (U64.sub a.high b.high) (carry a.low l) } | false |
FStar.UInt128.fst | FStar.UInt128.sub_mod_wrap_ok | val sub_mod_wrap_ok (a b: t)
: Lemma (requires (v a - v b < 0)) (ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | val sub_mod_wrap_ok (a b: t)
: Lemma (requires (v a - v b < 0)) (ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) | let sub_mod_wrap_ok (a b:t) : Lemma
(requires (v a - v b < 0))
(ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) =
if U64.v a.low < U64.v b.low
then sub_mod_wrap1_ok a b
else sub_mod_wrap2_ok a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 359,
"start_col": 0,
"start_line": 354
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t
-> FStar.Pervasives.Lemma (requires FStar.UInt128.v a - FStar.UInt128.v b < 0)
(ensures
FStar.UInt128.v (FStar.UInt128.sub_mod_impl a b) =
FStar.UInt128.v a - FStar.UInt128.v b + Prims.pow2 128) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.op_LessThan",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.sub_mod_wrap1_ok",
"Prims.bool",
"FStar.UInt128.sub_mod_wrap2_ok",
"Prims.unit",
"Prims.b2t",
"Prims.op_Subtraction",
"FStar.UInt128.v",
"Prims.squash",
"Prims.op_Equality",... | [] | false | false | true | false | false | let sub_mod_wrap_ok (a b: t)
: Lemma (requires (v a - v b < 0)) (ensures (v (sub_mod_impl a b) = v a - v b + pow2 128)) =
| if U64.v a.low < U64.v b.low then sub_mod_wrap1_ok a b else sub_mod_wrap2_ok a b | false |
FStar.UInt128.fst | FStar.UInt128.sub_underspec | val sub_underspec: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c ->
size (v a - v b) n ==> v a - v b = v c)) | val sub_underspec: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c ->
size (v a - v b) n ==> v a - v b = v c)) | let sub_underspec (a b: t) =
let l = U64.sub_mod a.low b.low in
{ low = l;
high = U64.sub_underspec (U64.sub_underspec a.high b.high) (carry a.low l); } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 81,
"end_line": 297,
"start_col": 0,
"start_line": 294
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.sub_underspec",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.carry",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt64.t",
"FStar.UInt64.sub_mod"
] | [] | false | false | false | false | false | let sub_underspec (a b: t) =
| let l = U64.sub_mod a.low b.low in
{ low = l; high = U64.sub_underspec (U64.sub_underspec a.high b.high) (carry a.low l) } | false |
FStar.UInt128.fst | FStar.UInt128.to_vec_append | val to_vec_append : #n1:nat{n1 > 0} -> #n2:nat{n2 > 0} -> num1:UInt.uint_t n1 -> num2:UInt.uint_t n2 ->
Lemma (UInt.to_vec (append_uint num1 num2) == Seq.append (UInt.to_vec num2) (UInt.to_vec num1)) | val to_vec_append : #n1:nat{n1 > 0} -> #n2:nat{n2 > 0} -> num1:UInt.uint_t n1 -> num2:UInt.uint_t n2 ->
Lemma (UInt.to_vec (append_uint num1 num2) == Seq.append (UInt.to_vec num2) (UInt.to_vec num1)) | let to_vec_append #n1 #n2 num1 num2 =
UInt.append_lemma (UInt.to_vec num2) (UInt.to_vec num1) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 57,
"end_line": 386,
"start_col": 0,
"start_line": 385
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | num1: FStar.UInt.uint_t n1 -> num2: FStar.UInt.uint_t n2
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt.to_vec (FStar.UInt128.append_uint num1 num2) ==
FStar.Seq.Base.append (FStar.UInt.to_vec num2) (FStar.UInt.to_vec num1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.UInt.uint_t",
"FStar.UInt.append_lemma",
"FStar.UInt.to_vec",
"Prims.unit"
] | [] | true | false | true | false | false | let to_vec_append #n1 #n2 num1 num2 =
| UInt.append_lemma (UInt.to_vec num2) (UInt.to_vec num1) | false |
FStar.UInt128.fst | FStar.UInt128.append_uint | val append_uint : #n1:nat -> #n2:nat -> num1:UInt.uint_t n1 -> num2:UInt.uint_t n2 -> UInt.uint_t (n1+n2) | val append_uint : #n1:nat -> #n2:nat -> num1:UInt.uint_t n1 -> num2:UInt.uint_t n2 -> UInt.uint_t (n1+n2) | let append_uint #n1 #n2 num1 num2 =
shift_bound num2 n1;
num1 + num2 * pow2 n1 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 23,
"end_line": 381,
"start_col": 0,
"start_line": 379
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | num1: FStar.UInt.uint_t n1 -> num2: FStar.UInt.uint_t n2 -> FStar.UInt.uint_t (n1 + n2) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.UInt.uint_t",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"FStar.UInt128.shift_bound"
] | [] | false | false | false | false | false | let append_uint #n1 #n2 num1 num2 =
| shift_bound num2 n1;
num1 + num2 * pow2 n1 | false |
FStar.UInt128.fst | FStar.UInt128.to_vec_v | val to_vec_v (a: t) : Lemma (vec128 a == Seq.append (vec64 a.high) (vec64 a.low)) | val to_vec_v (a: t) : Lemma (vec128 a == Seq.append (vec64 a.high) (vec64 a.low)) | let to_vec_v (a: t) :
Lemma (vec128 a == Seq.append (vec64 a.high) (vec64 a.low)) =
to_vec_append (U64.v a.low) (U64.v a.high) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 393,
"start_col": 0,
"start_line": 391
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.vec128 a ==
FStar.Seq.Base.append (FStar.UInt128.vec64 (Mkuint128?.high a))
(FStar.UInt128.vec64 (Mkuint128?.low a))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.to_vec_append",
"FStar.UInt64.n",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Prims.bool",
"FStar.UInt128.vec... | [] | true | false | true | false | false | let to_vec_v (a: t) : Lemma (vec128 a == Seq.append (vec64 a.high) (vec64 a.low)) =
| to_vec_append (U64.v a.low) (U64.v a.high) | false |
FStar.UInt128.fst | FStar.UInt128.shift_bound | val shift_bound : #n:nat -> num:UInt.uint_t n -> n':nat ->
Lemma (num * pow2 n' <= pow2 (n'+n) - pow2 n') | val shift_bound : #n:nat -> num:UInt.uint_t n -> n':nat ->
Lemma (num * pow2 n' <= pow2 (n'+n) - pow2 n') | let shift_bound #n num n' =
Math.lemma_mult_le_right (pow2 n') num (pow2 n - 1);
Math.distributivity_sub_left (pow2 n) 1 (pow2 n');
Math.pow2_plus n' n | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 21,
"end_line": 376,
"start_col": 0,
"start_line": 373
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | num: FStar.UInt.uint_t n -> n': Prims.nat
-> FStar.Pervasives.Lemma (ensures num * Prims.pow2 n' <= Prims.pow2 (n' + n) - Prims.pow2 n') | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.UInt.uint_t",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.distributivity_sub_left",
"Prims.pow2",
"FStar.Math.Lemmas.lemma_mult_le_right",
"Prims.op_Subtraction"
] | [] | true | false | true | false | false | let shift_bound #n num n' =
| Math.lemma_mult_le_right (pow2 n') num (pow2 n - 1);
Math.distributivity_sub_left (pow2 n) 1 (pow2 n');
Math.pow2_plus n' n | false |
FStar.UInt128.fst | FStar.UInt128.logxor_vec_append | val logxor_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logxor_vec a1 b1) (BV.logxor_vec a2 b2) ==
BV.logxor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | val logxor_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logxor_vec a1 b1) (BV.logxor_vec a2 b2) ==
BV.logxor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | let logxor_vec_append #n1 #n2 a1 b1 a2 b2 =
Seq.lemma_eq_intro (Seq.append (BV.logxor_vec a1 b1) (BV.logxor_vec a2 b2))
(BV.logxor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 85,
"end_line": 421,
"start_col": 0,
"start_line": 419
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a1: FStar.BitVector.bv_t n1 ->
b1: FStar.BitVector.bv_t n1 ->
a2: FStar.BitVector.bv_t n2 ->
b2: FStar.BitVector.bv_t n2
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.append (FStar.BitVector.logxor_vec a1 b1) (FStar.BitVector.logxor_vec a2 b2) ==
FStar.BitVector.logxor_vec (FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.BitVector.bv_t",
"FStar.Seq.Base.lemma_eq_intro",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.BitVector.logxor_vec",
"Prims.op_Addition",
"Prims.unit"
] | [] | true | false | true | false | false | let logxor_vec_append #n1 #n2 a1 b1 a2 b2 =
| Seq.lemma_eq_intro (Seq.append (BV.logxor_vec a1 b1) (BV.logxor_vec a2 b2))
(BV.logxor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | false |
FStar.UInt128.fst | FStar.UInt128.logand | val logand: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logand (v a) (v b))) | val logand: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logand (v a) (v b))) | let logand (a b: t) : Pure t
(requires True)
(ensures (fun r -> v r = UInt.logand #128 (v a) (v b))) =
let r = { low = U64.logand a.low b.low;
high = U64.logand a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logand_vec_append (vec64 a.high) (vec64 b.... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 414,
"start_col": 0,
"start_line": 402
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.BitVector.bv_t",
"FStar.UInt128.vec128",
"FStar.BitVector.logand_vec",
"FStar.UInt128.to_vec_v",
"FStar.UInt128.logand_vec_append",
"FStar.UInt128.vec64",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.__proj_... | [] | false | false | false | false | false | let logand (a b: t) : Pure t (requires True) (ensures (fun r -> v r = UInt.logand #128 (v a) (v b))) =
| let r = { low = U64.logand a.low b.low; high = U64.logand a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logand_vec_append (vec64 a.high) (vec64 b.high) (vec64 a.low) (vec64 b.low);
to_vec_v a;
to_vec_v b;
assert (vec128 r == BV.logand_vec (vec128 a) (vec128 b));
r | false |
FStar.UInt128.fst | FStar.UInt128.logor_vec_append | val logor_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logor_vec a1 b1) (BV.logor_vec a2 b2) ==
BV.logor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | val logor_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logor_vec a1 b1) (BV.logor_vec a2 b2) ==
BV.logor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | let logor_vec_append #n1 #n2 a1 b1 a2 b2 =
Seq.lemma_eq_intro (Seq.append (BV.logor_vec a1 b1) (BV.logor_vec a2 b2))
(BV.logor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 84,
"end_line": 442,
"start_col": 0,
"start_line": 440
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a1: FStar.BitVector.bv_t n1 ->
b1: FStar.BitVector.bv_t n1 ->
a2: FStar.BitVector.bv_t n2 ->
b2: FStar.BitVector.bv_t n2
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.append (FStar.BitVector.logor_vec a1 b1) (FStar.BitVector.logor_vec a2 b2) ==
FStar.BitVector.logor_vec (FStar.Seq... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.BitVector.bv_t",
"FStar.Seq.Base.lemma_eq_intro",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.BitVector.logor_vec",
"Prims.op_Addition",
"Prims.unit"
] | [] | true | false | true | false | false | let logor_vec_append #n1 #n2 a1 b1 a2 b2 =
| Seq.lemma_eq_intro (Seq.append (BV.logor_vec a1 b1) (BV.logor_vec a2 b2))
(BV.logor_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | false |
FStar.UInt128.fst | FStar.UInt128.shift_past_mod | val shift_past_mod (n k1: nat) (k2: nat{k2 >= k1}) : Lemma ((n * pow2 k2) % pow2 k1 == 0) | val shift_past_mod (n k1: nat) (k2: nat{k2 >= k1}) : Lemma ((n * pow2 k2) % pow2 k1 == 0) | let shift_past_mod (n:nat) (k1:nat) (k2:nat{k2 >= k1}) :
Lemma ((n * pow2 k2) % pow2 k1 == 0) =
assert (k2 == (k2 - k1) + k1);
Math.pow2_plus (k2 - k1) k1;
Math.paren_mul_right n (pow2 (k2 - k1)) (pow2 k1);
mod_mul_cancel (n * pow2 (k2 - k1)) (pow2 k1) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 488,
"start_col": 0,
"start_line": 483
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> k1: Prims.nat -> k2: Prims.nat{k2 >= k1}
-> FStar.Pervasives.Lemma (ensures n * Prims.pow2 k2 % Prims.pow2 k1 == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt128.mod_mul_cancel",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Subtraction",
"Prims.unit",
"FStar.Math.Lemmas.paren_mul_right",
"FStar.Math.Lemmas.pow2_plus",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Additio... | [] | true | false | true | false | false | let shift_past_mod (n k1: nat) (k2: nat{k2 >= k1}) : Lemma ((n * pow2 k2) % pow2 k1 == 0) =
| assert (k2 == (k2 - k1) + k1);
Math.pow2_plus (k2 - k1) k1;
Math.paren_mul_right n (pow2 (k2 - k1)) (pow2 k1);
mod_mul_cancel (n * pow2 (k2 - k1)) (pow2 k1) | false |
FStar.UInt128.fst | FStar.UInt128.logxor | val logxor: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logxor (v a) (v b))) | val logxor: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logxor (v a) (v b))) | let logxor (a b: t) : Pure t
(requires True)
(ensures (fun r -> v r = UInt.logxor #128 (v a) (v b))) =
let r = { low = U64.logxor a.low b.low;
high = U64.logxor a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logxor_vec_append (vec64 a.high) (vec64 b.high)
(v... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 435,
"start_col": 0,
"start_line": 423
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.BitVector.bv_t",
"FStar.UInt128.vec128",
"FStar.BitVector.logxor_vec",
"FStar.UInt128.to_vec_v",
"FStar.UInt128.logxor_vec_append",
"FStar.UInt128.vec64",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.__proj_... | [] | false | false | false | false | false | let logxor (a b: t) : Pure t (requires True) (ensures (fun r -> v r = UInt.logxor #128 (v a) (v b))) =
| let r = { low = U64.logxor a.low b.low; high = U64.logxor a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logxor_vec_append (vec64 a.high) (vec64 b.high) (vec64 a.low) (vec64 b.low);
to_vec_v a;
to_vec_v b;
assert (vec128 r == BV.logxor_vec (vec128 a) (vec128 b));
r | false |
FStar.UInt128.fst | FStar.UInt128.lognot | val lognot: a:t -> Pure t
(requires True)
(ensures (fun r -> v r == lognot (v a))) | val lognot: a:t -> Pure t
(requires True)
(ensures (fun r -> v r == lognot (v a))) | let lognot (a: t) : Pure t
(requires True)
(ensures (fun r -> v r = UInt.lognot #128 (v a))) =
let r = { low = U64.lognot a.low;
high = U64.lognot a.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
lognot_vec_append (vec64 a.high) (vec64 a.low);
to_vec_v a;
... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 475,
"start_col": 0,
"start_line": 465
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.BitVector.bv_t",
"FStar.UInt128.vec128",
"FStar.BitVector.lognot_vec",
"FStar.UInt128.to_vec_v",
"FStar.UInt128.lognot_vec_append",
"FStar.UInt128.vec64",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.__proj_... | [] | false | false | false | false | false | let lognot (a: t) : Pure t (requires True) (ensures (fun r -> v r = UInt.lognot #128 (v a))) =
| let r = { low = U64.lognot a.low; high = U64.lognot a.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
lognot_vec_append (vec64 a.high) (vec64 a.low);
to_vec_v a;
assert (vec128 r == BV.lognot_vec (vec128 a));
r | false |
FStar.UInt128.fst | FStar.UInt128.mod_mul_cancel | val mod_mul_cancel (n: nat) (k: nat{k > 0}) : Lemma ((n * k) % k == 0) | val mod_mul_cancel (n: nat) (k: nat{k > 0}) : Lemma ((n * k) % k == 0) | let mod_mul_cancel (n:nat) (k:nat{k > 0}) :
Lemma ((n * k) % k == 0) =
mod_spec (n * k) k;
mul_div_cancel n k;
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 481,
"start_col": 0,
"start_line": 477
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> k: Prims.nat{k > 0} -> FStar.Pervasives.Lemma (ensures n * k % k == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.unit",
"FStar.UInt128.mul_div_cancel",
"FStar.UInt128.mod_spec",
"FStar.Mul.op_Star",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let mod_mul_cancel (n: nat) (k: nat{k > 0}) : Lemma ((n * k) % k == 0) =
| mod_spec (n * k) k;
mul_div_cancel n k;
() | false |
FStar.UInt128.fst | FStar.UInt128.shift_left_large_lemma | val shift_left_large_lemma
(#n1 #n2: nat)
(a1: UInt.uint_t n1)
(a2: UInt.uint_t n2)
(s: nat{s >= n2})
: Lemma (((a1 + a2 * pow2 n1) * pow2 s) % pow2 (n1 + n2) == (a1 * pow2 s) % pow2 (n1 + n2)) | val shift_left_large_lemma
(#n1 #n2: nat)
(a1: UInt.uint_t n1)
(a2: UInt.uint_t n2)
(s: nat{s >= n2})
: Lemma (((a1 + a2 * pow2 n1) * pow2 s) % pow2 (n1 + n2) == (a1 * pow2 s) % pow2 (n1 + n2)) | let shift_left_large_lemma (#n1: nat) (#n2: nat) (a1:UInt.uint_t n1) (a2:UInt.uint_t n2) (s: nat{s >= n2}) :
Lemma (((a1 + a2 * pow2 n1) * pow2 s) % pow2 (n1+n2) ==
(a1 * pow2 s) % pow2 (n1+n2)) =
shift_left_large_val a1 a2 s;
mod_add (a1 * pow2 s) (a2 * pow2 (n1+s)) (pow2 (n1+n2));
shift_past_mod a2 (... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 509,
"start_col": 0,
"start_line": 502
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a1: FStar.UInt.uint_t n1 -> a2: FStar.UInt.uint_t n2 -> s: Prims.nat{s >= n2}
-> FStar.Pervasives.Lemma
(ensures
(a1 + a2 * Prims.pow2 n1) * Prims.pow2 s % Prims.pow2 (n1 + n2) ==
a1 * Prims.pow2 s % Prims.pow2 (n1 + n2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.UInt.uint_t",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.unit",
"FStar.UInt128.mod_double",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Addition",
"FStar.UInt128.shift_past_mod",
"FStar.UInt128.mod_add",
"FStar.UInt128.shift_left_large_val",
"Prims.l_True",
"Pr... | [] | true | false | true | false | false | let shift_left_large_lemma
(#n1 #n2: nat)
(a1: UInt.uint_t n1)
(a2: UInt.uint_t n2)
(s: nat{s >= n2})
: Lemma (((a1 + a2 * pow2 n1) * pow2 s) % pow2 (n1 + n2) == (a1 * pow2 s) % pow2 (n1 + n2)) =
| shift_left_large_val a1 a2 s;
mod_add (a1 * pow2 s) (a2 * pow2 (n1 + s)) (pow2 (n1 + n2));
shift_past_mod a2 (n1 + n2) (n1 + s);
mod_double (a1 * pow2 s) (pow2 (n1 + n2));
() | false |
FStar.UInt128.fst | FStar.UInt128.lognot_vec_append | val lognot_vec_append (#n1 #n2: pos) (a1: BV.bv_t n1) (a2: BV.bv_t n2) :
Lemma (Seq.append (BV.lognot_vec a1) (BV.lognot_vec a2) ==
BV.lognot_vec #(n1 + n2) (Seq.append a1 a2)) | val lognot_vec_append (#n1 #n2: pos) (a1: BV.bv_t n1) (a2: BV.bv_t n2) :
Lemma (Seq.append (BV.lognot_vec a1) (BV.lognot_vec a2) ==
BV.lognot_vec #(n1 + n2) (Seq.append a1 a2)) | let lognot_vec_append #n1 #n2 a1 a2 =
Seq.lemma_eq_intro (Seq.append (BV.lognot_vec a1) (BV.lognot_vec a2))
(BV.lognot_vec #(n1 + n2) (Seq.append a1 a2)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 67,
"end_line": 463,
"start_col": 0,
"start_line": 461
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a1: FStar.BitVector.bv_t n1 -> a2: FStar.BitVector.bv_t n2
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.append (FStar.BitVector.lognot_vec a1) (FStar.BitVector.lognot_vec a2) ==
FStar.BitVector.lognot_vec (FStar.Seq.Base.append a1 a2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.BitVector.bv_t",
"FStar.Seq.Base.lemma_eq_intro",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.BitVector.lognot_vec",
"Prims.op_Addition",
"Prims.unit"
] | [] | true | false | true | false | false | let lognot_vec_append #n1 #n2 a1 a2 =
| Seq.lemma_eq_intro (Seq.append (BV.lognot_vec a1) (BV.lognot_vec a2))
(BV.lognot_vec #(n1 + n2) (Seq.append a1 a2)) | false |
FStar.UInt128.fst | FStar.UInt128.u32_64 | val u32_64:n: U32.t{U32.v n == 64} | val u32_64:n: U32.t{U32.v n == 64} | let u32_64: n:U32.t{U32.v n == 64} = U32.uint_to_t 64 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 519,
"start_col": 8,
"start_line": 519
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: FStar.UInt32.t{FStar.UInt32.v n == 64} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.uint_to_t"
] | [] | false | false | false | false | false | let u32_64:n: U32.t{U32.v n == 64} =
| U32.uint_to_t 64 | false |
FStar.UInt128.fst | FStar.UInt128.shift_left_large_val | val shift_left_large_val (#n1 #n2: nat) (a1: UInt.uint_t n1) (a2: UInt.uint_t n2) (s: nat)
: Lemma ((a1 + a2 * pow2 n1) * pow2 s == (a1 * pow2 s + a2 * pow2 (n1 + s))) | val shift_left_large_val (#n1 #n2: nat) (a1: UInt.uint_t n1) (a2: UInt.uint_t n2) (s: nat)
: Lemma ((a1 + a2 * pow2 n1) * pow2 s == (a1 * pow2 s + a2 * pow2 (n1 + s))) | let shift_left_large_val (#n1:nat) (#n2: nat) (a1:UInt.uint_t n1) (a2:UInt.uint_t n2) (s:nat) :
Lemma ((a1 + a2 * pow2 n1) * pow2 s == (a1 * pow2 s + a2 * pow2 (n1+s))) =
Math.distributivity_add_left a1 (a2 * pow2 n1) (pow2 s);
Math.paren_mul_right a2 (pow2 n1) (pow2 s);
Math.pow2_plus n1 s | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 21,
"end_line": 499,
"start_col": 0,
"start_line": 495
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a1: FStar.UInt.uint_t n1 -> a2: FStar.UInt.uint_t n2 -> s: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
(a1 + a2 * Prims.pow2 n1) * Prims.pow2 s == a1 * Prims.pow2 s + a2 * Prims.pow2 (n1 + s)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.UInt.uint_t",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.paren_mul_right",
"Prims.pow2",
"FStar.Math.Lemmas.distributivity_add_left",
"FStar.Mul.op_Star",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"Prims.Nil",
... | [] | true | false | true | false | false | let shift_left_large_val (#n1 #n2: nat) (a1: UInt.uint_t n1) (a2: UInt.uint_t n2) (s: nat)
: Lemma ((a1 + a2 * pow2 n1) * pow2 s == (a1 * pow2 s + a2 * pow2 (n1 + s))) =
| Math.distributivity_add_left a1 (a2 * pow2 n1) (pow2 s);
Math.paren_mul_right a2 (pow2 n1) (pow2 s);
Math.pow2_plus n1 s | false |
FStar.UInt128.fst | FStar.UInt128.logand_vec_append | val logand_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logand_vec a1 b1) (BV.logand_vec a2 b2) ==
BV.logand_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | val logand_vec_append (#n1 #n2: pos) (a1 b1: BV.bv_t n1) (a2 b2: BV.bv_t n2) :
Lemma (Seq.append (BV.logand_vec a1 b1) (BV.logand_vec a2 b2) ==
BV.logand_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | let logand_vec_append #n1 #n2 a1 b1 a2 b2 =
Seq.lemma_eq_intro (Seq.append (BV.logand_vec a1 b1) (BV.logand_vec a2 b2))
(BV.logand_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 85,
"end_line": 400,
"start_col": 0,
"start_line": 398
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a1: FStar.BitVector.bv_t n1 ->
b1: FStar.BitVector.bv_t n1 ->
a2: FStar.BitVector.bv_t n2 ->
b2: FStar.BitVector.bv_t n2
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.append (FStar.BitVector.logand_vec a1 b1) (FStar.BitVector.logand_vec a2 b2) ==
FStar.BitVector.logand_vec (FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.BitVector.bv_t",
"FStar.Seq.Base.lemma_eq_intro",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.BitVector.logand_vec",
"Prims.op_Addition",
"Prims.unit"
] | [] | true | false | true | false | false | let logand_vec_append #n1 #n2 a1 b1 a2 b2 =
| Seq.lemma_eq_intro (Seq.append (BV.logand_vec a1 b1) (BV.logand_vec a2 b2))
(BV.logand_vec #(n1 + n2) (Seq.append a1 a2) (Seq.append b1 b2)) | false |
FStar.UInt128.fst | FStar.UInt128.shift_left_large_lemma_t | val shift_left_large_lemma_t : a:t -> s:nat ->
Lemma (requires (s >= 64))
(ensures ((v a * pow2 s) % pow2 128 ==
(U64.v a.low * pow2 s) % pow2 128)) | val shift_left_large_lemma_t : a:t -> s:nat ->
Lemma (requires (s >= 64))
(ensures ((v a * pow2 s) % pow2 128 ==
(U64.v a.low * pow2 s) % pow2 128)) | let shift_left_large_lemma_t a s =
shift_left_large_lemma #64 #64 (U64.v a.low) (U64.v a.high) s | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 63,
"end_line": 517,
"start_col": 0,
"start_line": 516
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: Prims.nat
-> FStar.Pervasives.Lemma (requires s >= 64)
(ensures
FStar.UInt128.v a * Prims.pow2 s % Prims.pow2 128 ==
FStar.UInt64.v (Mkuint128?.low a) * Prims.pow2 s % Prims.pow2 128) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.nat",
"FStar.UInt128.shift_left_large_lemma",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.unit"
] | [] | true | false | true | false | false | let shift_left_large_lemma_t a s =
| shift_left_large_lemma #64 #64 (U64.v a.low) (U64.v a.high) s | false |
FStar.UInt128.fst | FStar.UInt128.logor | val logor: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logor (v a) (v b))) | val logor: a:t -> b:t -> Pure t
(requires True)
(ensures (fun r -> v r == logor (v a) (v b))) | let logor (a b: t) : Pure t
(requires True)
(ensures (fun r -> v r = UInt.logor #128 (v a) (v b))) =
let r = { low = U64.logor a.low b.low;
high = U64.logor a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logor_vec_append (vec64 a.high) (vec64 b.high)... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 456,
"start_col": 0,
"start_line": 444
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.BitVector.bv_t",
"FStar.UInt128.vec128",
"FStar.BitVector.logor_vec",
"FStar.UInt128.to_vec_v",
"FStar.UInt128.logor_vec_append",
"FStar.UInt128.vec64",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UInt128.__proj__M... | [] | false | false | false | false | false | let logor (a b: t) : Pure t (requires True) (ensures (fun r -> v r = UInt.logor #128 (v a) (v b))) =
| let r = { low = U64.logor a.low b.low; high = U64.logor a.high b.high } in
to_vec_v r;
assert (vec128 r == Seq.append (vec64 r.high) (vec64 r.low));
logor_vec_append (vec64 a.high) (vec64 b.high) (vec64 a.low) (vec64 b.low);
to_vec_v a;
to_vec_v b;
assert (vec128 r == BV.logor_vec (vec128 a) (vec128 b));
r | false |
FStar.UInt128.fst | FStar.UInt128.add_mod_small' | val add_mod_small' : n:nat -> m:nat -> k:pos ->
Lemma (requires (n + m % k < k))
(ensures (n + m % k == (n + m) % k)) | val add_mod_small' : n:nat -> m:nat -> k:pos ->
Lemma (requires (n + m % k < k))
(ensures (n + m % k == (n + m) % k)) | let add_mod_small' n m k =
Math.lemma_mod_lt (n + m % k) k;
Math.modulo_lemma n k;
mod_add n m k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 620,
"start_col": 0,
"start_line": 617
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> m: Prims.nat -> k: Prims.pos
-> FStar.Pervasives.Lemma (requires n + m % k < k) (ensures n + m % k == (n + m) % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.UInt128.mod_add",
"Prims.unit",
"FStar.Math.Lemmas.modulo_lemma",
"FStar.Math.Lemmas.lemma_mod_lt",
"Prims.op_Addition",
"Prims.op_Modulus"
] | [] | true | false | true | false | false | let add_mod_small' n m k =
| Math.lemma_mod_lt (n + m % k) k;
Math.modulo_lemma n k;
mod_add n m k | false |
FStar.UInt128.fst | FStar.UInt128.shift_t_mod_val' | val shift_t_mod_val' (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s) % pow2 128) | val shift_t_mod_val' (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s) % pow2 128) | let shift_t_mod_val' (a: t) (s: nat{s < 64}) :
Lemma ((v a * pow2 s) % pow2 128 ==
U64.v a.low * pow2 s + U64.v a.high * pow2 (64+s) % pow2 128) =
let a_l = U64.v a.low in
let a_h = U64.v a.high in
u64_pow2_bound a_l s;
mul_mod_bound a_h (64+s) 128;
// assert (a_h * pow2 (64+s) % pow2 128 <= pow2 12... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 664,
"start_col": 0,
"start_line": 653
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: Prims.nat{s < 64}
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.v a * Prims.pow2 s % Prims.pow2 128 ==
FStar.UInt64.v (Mkuint128?.low a) * Prims.pow2 s +
FStar.UInt64.v (Mkuint128?.high a) * Prims.pow2 (64 + s) % Prims.pow2 128) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.unit",
"FStar.UInt128.shift_t_val",
"FStar.UInt128.add_mod_small'",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Addition",
"FStar.UInt128.add_lt_le",
"Prims.op_Modulus",
"Prims.op_Subtraction",
"FStar.UInt128.mul_mod... | [] | true | false | true | false | false | let shift_t_mod_val' (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s) % pow2 128) =
| let a_l = U64.v a.low in
let a_h = U64.v a.high in
u64_pow2_bound a_l s;
mul_mod_bound a_h (64 + s) 128;
add_lt_le (a_l * pow2 s) (pow2 (64 + s)) (a_h * pow2 (64 + s) % pow2 128) (pow2 128 - pow2 (64 + s));
add_mod_small' (a_l * pow2 s) (a_h * pow2 (64 + s)) (pow2 128);
shift_t_val a s;
() | false |
FStar.UInt128.fst | FStar.UInt128.div_pow2_diff | val div_pow2_diff: a:nat -> n1:nat -> n2:nat{n2 <= n1} -> Lemma
(requires True)
(ensures (a / pow2 (n1 - n2) == a * pow2 n2 / pow2 n1)) | val div_pow2_diff: a:nat -> n1:nat -> n2:nat{n2 <= n1} -> Lemma
(requires True)
(ensures (a / pow2 (n1 - n2) == a * pow2 n2 / pow2 n1)) | let div_pow2_diff a n1 n2 =
Math.pow2_plus n2 (n1-n2);
assert (a * pow2 n2 / pow2 n1 == a * pow2 n2 / (pow2 n2 * pow2 (n1 - n2)));
div_product (a * pow2 n2) (pow2 n2) (pow2 (n1-n2));
mul_div_cancel a (pow2 n2) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 528,
"start_col": 0,
"start_line": 524
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> n1: Prims.nat -> n2: Prims.nat{n2 <= n1}
-> FStar.Pervasives.Lemma (ensures a / Prims.pow2 (n1 - n2) == a * Prims.pow2 n2 / Prims.pow2 n1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.UInt128.mul_div_cancel",
"Prims.pow2",
"Prims.unit",
"FStar.UInt128.div_product",
"FStar.Mul.op_Star",
"Prims.op_Subtraction",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Division",
"FStar.Math.Lemmas.pow2_plus"
] | [] | true | false | true | false | false | let div_pow2_diff a n1 n2 =
| Math.pow2_plus n2 (n1 - n2);
assert (a * pow2 n2 / pow2 n1 == a * pow2 n2 / (pow2 n2 * pow2 (n1 - n2)));
div_product (a * pow2 n2) (pow2 n2) (pow2 (n1 - n2));
mul_div_cancel a (pow2 n2) | false |
FStar.UInt128.fst | FStar.UInt128.mod_double | val mod_double: a:nat -> k:nat{k>0} ->
Lemma (a % k % k == a % k) | val mod_double: a:nat -> k:nat{k>0} ->
Lemma (a % k % k == a % k) | let mod_double a k =
mod_mod a k 1 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 493,
"start_col": 0,
"start_line": 492
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> k: Prims.nat{k > 0} -> FStar.Pervasives.Lemma (ensures a % k % k == a % k) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.UInt128.mod_mod",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_double a k =
| mod_mod a k 1 | false |
FStar.UInt128.fst | FStar.UInt128.mul_pow2_diff | val mul_pow2_diff: a:nat -> n1:nat -> n2:nat{n2 <= n1} ->
Lemma (a * pow2 (n1 - n2) == a * pow2 n1 / pow2 n2) | val mul_pow2_diff: a:nat -> n1:nat -> n2:nat{n2 <= n1} ->
Lemma (a * pow2 (n1 - n2) == a * pow2 n1 / pow2 n2) | let mul_pow2_diff a n1 n2 =
Math.paren_mul_right a (pow2 (n1-n2)) (pow2 n2);
mul_div_cancel (a * pow2 (n1 - n2)) (pow2 n2);
Math.pow2_plus (n1 - n2) n2 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 735,
"start_col": 0,
"start_line": 732
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> n1: Prims.nat -> n2: Prims.nat{n2 <= n1}
-> FStar.Pervasives.Lemma (ensures a * Prims.pow2 (n1 - n2) == a * Prims.pow2 n1 / Prims.pow2 n2) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Math.Lemmas.pow2_plus",
"Prims.op_Subtraction",
"Prims.unit",
"FStar.UInt128.mul_div_cancel",
"FStar.Mul.op_Star",
"Prims.pow2",
"FStar.Math.Lemmas.paren_mul_right"
] | [] | true | false | true | false | false | let mul_pow2_diff a n1 n2 =
| Math.paren_mul_right a (pow2 (n1 - n2)) (pow2 n2);
mul_div_cancel (a * pow2 (n1 - n2)) (pow2 n2);
Math.pow2_plus (n1 - n2) n2 | false |
FStar.UInt128.fst | FStar.UInt128.mod_mul_pow2 | val mod_mul_pow2 : n:nat -> e1:nat -> e2:nat ->
Lemma (n % pow2 e1 * pow2 e2 <= pow2 (e1+e2) - pow2 e2) | val mod_mul_pow2 : n:nat -> e1:nat -> e2:nat ->
Lemma (n % pow2 e1 * pow2 e2 <= pow2 (e1+e2) - pow2 e2) | let mod_mul_pow2 n e1 e2 =
Math.lemma_mod_lt n (pow2 e1);
Math.lemma_mult_le_right (pow2 e2) (n % pow2 e1) (pow2 e1 - 1);
assert (n % pow2 e1 * pow2 e2 <= pow2 e1 * pow2 e2 - pow2 e2);
Math.pow2_plus e1 e2 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 536,
"start_col": 0,
"start_line": 532
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> e1: Prims.nat -> e2: Prims.nat
-> FStar.Pervasives.Lemma
(ensures (n % Prims.pow2 e1) * Prims.pow2 e2 <= Prims.pow2 (e1 + e2) - Prims.pow2 e2) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.pow2",
"Prims.op_Subtraction",
"FStar.Math.Lemmas.lemma_mult_le_right",
"FStar.Math.Lemmas.lemma_mod_lt"
] | [] | true | false | true | false | false | let mod_mul_pow2 n e1 e2 =
| Math.lemma_mod_lt n (pow2 e1);
Math.lemma_mult_le_right (pow2 e2) (n % pow2 e1) (pow2 e1 - 1);
assert ((n % pow2 e1) * pow2 e2 <= pow2 e1 * pow2 e2 - pow2 e2);
Math.pow2_plus e1 e2 | false |
FStar.UInt128.fst | FStar.UInt128.pow2_div_bound | val pow2_div_bound (#b: _) (n: UInt.uint_t b) (s: nat{s <= b}) : Lemma (n / pow2 s < pow2 (b - s)) | val pow2_div_bound (#b: _) (n: UInt.uint_t b) (s: nat{s <= b}) : Lemma (n / pow2 s < pow2 (b - s)) | let pow2_div_bound #b (n:UInt.uint_t b) (s:nat{s <= b}) :
Lemma (n / pow2 s < pow2 (b - s)) =
Math.lemma_div_lt n b s | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 540,
"start_col": 0,
"start_line": 538
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: FStar.UInt.uint_t b -> s: Prims.nat{s <= b}
-> FStar.Pervasives.Lemma (ensures n / Prims.pow2 s < Prims.pow2 (b - s)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.UInt.uint_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Math.Lemmas.lemma_div_lt",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.op_LessThan",
"Prims.op_Division",
"Prims.pow2",
"Prims.op_Subtraction",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let pow2_div_bound #b (n: UInt.uint_t b) (s: nat{s <= b}) : Lemma (n / pow2 s < pow2 (b - s)) =
| Math.lemma_div_lt n b s | false |
FStar.UInt128.fst | FStar.UInt128.u64_pow2_bound | val u64_pow2_bound (a: UInt.uint_t 64) (s: nat) : Lemma (a * pow2 s < pow2 (64 + s)) | val u64_pow2_bound (a: UInt.uint_t 64) (s: nat) : Lemma (a * pow2 s < pow2 (64 + s)) | let u64_pow2_bound (a: UInt.uint_t 64) (s: nat) :
Lemma (a * pow2 s < pow2 (64+s)) =
Math.pow2_plus 64 s;
Math.lemma_mult_le_right (pow2 s) a (pow2 64) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 651,
"start_col": 0,
"start_line": 648
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt.uint_t 64 -> s: Prims.nat
-> FStar.Pervasives.Lemma (ensures a * Prims.pow2 s < Prims.pow2 (64 + s)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt.uint_t",
"Prims.nat",
"FStar.Math.Lemmas.lemma_mult_le_right",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"Prims.l_True",
"Prims.squash",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Prims.op_Addition",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let u64_pow2_bound (a: UInt.uint_t 64) (s: nat) : Lemma (a * pow2 s < pow2 (64 + s)) =
| Math.pow2_plus 64 s;
Math.lemma_mult_le_right (pow2 s) a (pow2 64) | false |
FStar.UInt128.fst | FStar.UInt128.div_plus_multiple | val div_plus_multiple (a b: nat) (k: pos)
: Lemma (requires (a < k)) (ensures ((a + b * k) / k == b)) | val div_plus_multiple (a b: nat) (k: pos)
: Lemma (requires (a < k)) (ensures ((a + b * k) / k == b)) | let div_plus_multiple (a:nat) (b:nat) (k:pos) :
Lemma (requires (a < k))
(ensures ((a + b * k) / k == b)) =
Math.division_addition_lemma a k b;
Math.small_division_lemma_1 a k | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 566,
"start_col": 0,
"start_line": 562
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> b: Prims.nat -> k: Prims.pos
-> FStar.Pervasives.Lemma (requires a < k) (ensures (a + b * k) / k == b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.Math.Lemmas.small_division_lemma_1",
"Prims.unit",
"FStar.Math.Lemmas.division_addition_lemma",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Division",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.Nil",
"FStar.... | [] | true | false | true | false | false | let div_plus_multiple (a b: nat) (k: pos)
: Lemma (requires (a < k)) (ensures ((a + b * k) / k == b)) =
| Math.division_addition_lemma a k b;
Math.small_division_lemma_1 a k | false |
FStar.UInt128.fst | FStar.UInt128.add_mod_small | val add_mod_small: n: nat -> m:nat -> k1:pos -> k2:pos ->
Lemma (requires (n < k1))
(ensures (n + (k1 * m) % (k1 * k2) ==
(n + k1 * m) % (k1 * k2))) | val add_mod_small: n: nat -> m:nat -> k1:pos -> k2:pos ->
Lemma (requires (n < k1))
(ensures (n + (k1 * m) % (k1 * k2) ==
(n + k1 * m) % (k1 * k2))) | let add_mod_small n m k1 k2 =
mod_spec (k1 * m) (k1 * k2);
mod_spec (n + k1 * m) (k1 * k2);
div_add_small n m k1 k2 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 585,
"start_col": 0,
"start_line": 582
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> m: Prims.nat -> k1: Prims.pos -> k2: Prims.pos
-> FStar.Pervasives.Lemma (requires n < k1)
(ensures n + k1 * m % (k1 * k2) == (n + k1 * m) % (k1 * k2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.UInt128.div_add_small",
"Prims.unit",
"FStar.UInt128.mod_spec",
"Prims.op_Addition",
"FStar.Mul.op_Star"
] | [] | true | false | true | false | false | let add_mod_small n m k1 k2 =
| mod_spec (k1 * m) (k1 * k2);
mod_spec (n + k1 * m) (k1 * k2);
div_add_small n m k1 k2 | false |
FStar.UInt128.fst | FStar.UInt128.mul_mod_bound | val mul_mod_bound : n:nat -> s1:nat -> s2:nat{s2>=s1} ->
Lemma (n * pow2 s1 % pow2 s2 <= pow2 s2 - pow2 s1) | val mul_mod_bound : n:nat -> s1:nat -> s2:nat{s2>=s1} ->
Lemma (n * pow2 s1 % pow2 s2 <= pow2 s2 - pow2 s1) | let mul_mod_bound n s1 s2 =
// n * pow2 s1 % pow2 s2 == n % pow2 (s2-s1) * pow2 s1
// n % pow2 (s2-s1) <= pow2 (s2-s1) - 1
// n % pow2 (s2-s1) * pow2 s1 <= pow2 s2 - pow2 s1
mod_mul n (pow2 s1) (pow2 (s2-s1));
// assert (n * pow2 s1 % pow2 s2 == n % pow2 (s2-s1) * pow2 s1);
Math.lemma_mod_lt n (pow2 (s2-s1)... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 27,
"end_line": 641,
"start_col": 0,
"start_line": 633
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 5,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_eli... | false | n: Prims.nat -> s1: Prims.nat -> s2: Prims.nat{s2 >= s1}
-> FStar.Pervasives.Lemma
(ensures n * Prims.pow2 s1 % Prims.pow2 s2 <= Prims.pow2 s2 - Prims.pow2 s1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.Math.Lemmas.pow2_plus",
"Prims.op_Subtraction",
"Prims.unit",
"FStar.Math.Lemmas.lemma_mult_le_right",
"Prims.pow2",
"Prims.op_Modulus",
"FStar.Math.Lemmas.lemma_mod_lt",
"FStar.UInt128.mod_mul"
] | [] | true | false | true | false | false | let mul_mod_bound n s1 s2 =
| mod_mul n (pow2 s1) (pow2 (s2 - s1));
Math.lemma_mod_lt n (pow2 (s2 - s1));
Math.lemma_mult_le_right (pow2 s1) (n % pow2 (s2 - s1)) (pow2 (s2 - s1) - 1);
Math.pow2_plus (s2 - s1) s1 | false |
FStar.UInt128.fst | FStar.UInt128.add_u64_shift_left | val add_u64_shift_left (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r = (U64.v hi * pow2 (U32.v s)) % pow2 64 + U64.v lo / pow2 (64 - U32.v s))) | val add_u64_shift_left (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r = (U64.v hi * pow2 (U32.v s)) % pow2 64 + U64.v lo / pow2 (64 - U32.v s))) | let add_u64_shift_left (hi lo: U64.t) (s: U32.t{U32.v s < 64}) : Pure U64.t
(requires (U32.v s <> 0))
(ensures (fun r -> U64.v r = (U64.v hi * pow2 (U32.v s)) % pow2 64 + U64.v lo / pow2 (64 - U32.v s))) =
let high = U64.shift_left hi s in
let low = U64.shift_right lo (U32.sub u32_64 s) in
let s = U32.v s in
... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 558,
"start_col": 0,
"start_line": 543
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hi: FStar.UInt64.t -> lo: FStar.UInt64.t -> s: FStar.UInt32.t{FStar.UInt32.v s < 64}
-> Prims.Pure FStar.UInt64.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"FStar.UInt64.add",
"Prims.unit",
"FStar.UInt128.mod_mul_pow2",
"FStar.UInt64.v",
"Prims.op_Subtraction",
"Prims._assert",
"Prims.pow2",
"FStar.UInt128.pow2_div_bound",
"FStar.UInt64.n",
"Prims.eq2",
... | [] | false | false | false | false | false | let add_u64_shift_left (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r = (U64.v hi * pow2 (U32.v s)) % pow2 64 + U64.v lo / pow2 (64 - U32.v s))) =
| let high = U64.shift_left hi s in
let low = U64.shift_right lo (U32.sub u32_64 s) in
let s = U32.v s in
let high_n = (U64.v hi % pow2 (64 - s)) * pow2 s in
let low_n = U64.v lo / pow2 (64 - s) in
Math.pow2_plus (64 - s) s;
mod_mul (U64.v hi) (pow2 s) (pow2 (64 - s));
assert (U64.v high == high_n);
assert (U64.v low == ... | false |
FStar.UInt128.fst | FStar.UInt128.shift_t_mod_val | val shift_t_mod_val (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 ==
U64.v a.low * pow2 s + (U64.v a.high * pow2 64) * pow2 s % pow2 128) | val shift_t_mod_val (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 ==
U64.v a.low * pow2 s + (U64.v a.high * pow2 64) * pow2 s % pow2 128) | let shift_t_mod_val (a: t) (s: nat{s < 64}) :
Lemma ((v a * pow2 s) % pow2 128 ==
U64.v a.low * pow2 s + (U64.v a.high * pow2 64) * pow2 s % pow2 128) =
let a_l = U64.v a.low in
let a_h = U64.v a.high in
shift_t_mod_val' a s;
Math.pow2_plus 64 s;
Math.paren_mul_right a_h (pow2 64) (pow2 s);
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 674,
"start_col": 0,
"start_line": 666
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: Prims.nat{s < 64}
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.v a * Prims.pow2 s % Prims.pow2 128 ==
FStar.UInt64.v (Mkuint128?.low a) * Prims.pow2 s +
(FStar.UInt64.v (Mkuint128?.high a) * Prims.pow2 64) * Prims.pow2 s % Prims.pow2 128) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.unit",
"FStar.Math.Lemmas.paren_mul_right",
"Prims.pow2",
"FStar.Math.Lemmas.pow2_plus",
"FStar.UInt128.shift_t_mod_val'",
"FStar.UInt.uint_t",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__high",
"FStar.UIn... | [] | true | false | true | false | false | let shift_t_mod_val (a: t) (s: nat{s < 64})
: Lemma
((v a * pow2 s) % pow2 128 ==
U64.v a.low * pow2 s + (U64.v a.high * pow2 64) * pow2 s % pow2 128) =
| let a_l = U64.v a.low in
let a_h = U64.v a.high in
shift_t_mod_val' a s;
Math.pow2_plus 64 s;
Math.paren_mul_right a_h (pow2 64) (pow2 s);
() | false |
FStar.UInt128.fst | FStar.UInt128.shift_left_small | val shift_left_small (a: t) (s: U32.t)
: Pure t (requires (U32.v s < 64)) (ensures (fun r -> v r = (v a * pow2 (U32.v s)) % pow2 128)) | val shift_left_small (a: t) (s: U32.t)
: Pure t (requires (U32.v s < 64)) (ensures (fun r -> v r = (v a * pow2 (U32.v s)) % pow2 128)) | let shift_left_small (a: t) (s: U32.t) : Pure t
(requires (U32.v s < 64))
(ensures (fun r -> v r = (v a * pow2 (U32.v s)) % pow2 128)) =
if U32.eq s 0ul then a
else
let r = { low = U64.shift_left a.low s;
high = add_u64_shift_left_respec a.high a.low s; } in
let s = U32.v s in
let a_l ... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 689,
"start_col": 0,
"start_line": 677
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"FStar.UInt32.eq",
"FStar.UInt32.__uint_to_t",
"Prims.bool",
"Prims.unit",
"FStar.UInt128.shift_t_mod_val",
"FStar.UInt128.mod_spec_rew_n",
"FStar.Mul.op_Star",
"Prims.pow2",
"FStar.UInt.uint_t",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__h... | [] | false | false | false | false | false | let shift_left_small (a: t) (s: U32.t)
: Pure t (requires (U32.v s < 64)) (ensures (fun r -> v r = (v a * pow2 (U32.v s)) % pow2 128)) =
| if U32.eq s 0ul
then a
else
let r = { low = U64.shift_left a.low s; high = add_u64_shift_left_respec a.high a.low s } in
let s = U32.v s in
let a_l = U64.v a.low in
let a_h = U64.v a.high in
mod_spec_rew_n (a_l * pow2 s) (pow2 64);
shift_t_mod_val a s;
r | false |
FStar.UInt128.fst | FStar.UInt128.mod_then_mul_64 | val mod_then_mul_64 (n: nat) : Lemma ((n % pow2 64) * pow2 64 == n * pow2 64 % pow2 128) | val mod_then_mul_64 (n: nat) : Lemma ((n % pow2 64) * pow2 64 == n * pow2 64 % pow2 128) | let mod_then_mul_64 (n:nat) : Lemma (n % pow2 64 * pow2 64 == n * pow2 64 % pow2 128) =
Math.pow2_plus 64 64;
mod_mul n (pow2 64) (pow2 64) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 31,
"end_line": 589,
"start_col": 0,
"start_line": 587
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures (n % Prims.pow2 64) * Prims.pow2 64 == n * Prims.pow2 64 % Prims.pow2 128) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.UInt128.mod_mul",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let mod_then_mul_64 (n: nat) : Lemma ((n % pow2 64) * pow2 64 == n * pow2 64 % pow2 128) =
| Math.pow2_plus 64 64;
mod_mul n (pow2 64) (pow2 64) | false |
FStar.UInt128.fst | FStar.UInt128.add_u64_shift_left_respec | val add_u64_shift_left_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r * pow2 64 ==
(U64.v hi * pow2 64) * pow2 (U32.v s) % pow2 128 +
(U64.v lo * pow2 (U32.v s) / pow2 64) * pow2 64)) | val add_u64_shift_left_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r * pow2 64 ==
(U64.v hi * pow2 64) * pow2 (U32.v s) % pow2 128 +
(U64.v lo * pow2 (U32.v s) / pow2 64) * pow2 64)) | let add_u64_shift_left_respec (hi lo:U64.t) (s:U32.t{U32.v s < 64}) : Pure U64.t
(requires (U32.v s <> 0))
(ensures (fun r ->
U64.v r * pow2 64 ==
(U64.v hi * pow2 64) * pow2 (U32.v s) % pow2 128 +
U64.v lo * pow2 (U32.v s) / pow2 64 * pow2 64)) =
let r = add_u64_shift_le... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 612,
"start_col": 0,
"start_line": 593
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hi: FStar.UInt64.t -> lo: FStar.UInt64.t -> s: FStar.UInt32.t{FStar.UInt32.v s < 64}
-> Prims.Pure FStar.UInt64.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.unit",
"FStar.UInt128.mul_abc_to_acb",
"Prims.pow2",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"FStar.UInt64.v",
"Prims.op_Addition",
"Prims.op_Modulus",
"Prims.op_Divis... | [] | false | false | false | false | false | let add_u64_shift_left_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r * pow2 64 ==
(U64.v hi * pow2 64) * pow2 (U32.v s) % pow2 128 +
(U64.v lo * pow2 (U32.v s) / pow2 64) * pow2 64)) =
| let r = add_u64_shift_left hi lo s in
let hi = U64.v hi in
let lo = U64.v lo in
let s = U32.v s in
assert (U64.v r == hi * pow2 s % pow2 64 + lo / pow2 (64 - s));
Math.distributivity_add_left (hi * pow2 s % pow2 64) (lo / pow2 (64 - s)) (pow2 64);
mod_then_mul_64 (hi * pow2 s);
assert ((hi * pow2 s % pow2 64) * pow2 64... | false |
FStar.UInt128.fst | FStar.UInt128.shift_left_large | val shift_left_large : a:t -> s:U32.t{U32.v s >= 64 /\ U32.v s < 128} ->
r:t{v r = (v a * pow2 (U32.v s)) % pow2 128} | val shift_left_large : a:t -> s:U32.t{U32.v s >= 64 /\ U32.v s < 128} ->
r:t{v r = (v a * pow2 (U32.v s)) % pow2 128} | let shift_left_large a s =
let h_shift = U32.sub s u32_64 in
assert (U32.v h_shift < 64);
let r = { low = U64.uint_to_t 0;
high = U64.shift_left a.low h_shift; } in
assert (U64.v r.high == (U64.v a.low * pow2 (U32.v s - 64)) % pow2 64);
mod_mul (U64.v a.low * pow2 (U32.v s - 64)) (pow2 64) (pow2 6... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 706,
"start_col": 0,
"start_line": 696
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 5,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_eli... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t{FStar.UInt32.v s >= 64 /\ FStar.UInt32.v s < 128}
-> r:
FStar.UInt128.t
{FStar.UInt128.v r = FStar.UInt128.v a * Prims.pow2 (FStar.UInt32.v s) % Prims.pow2 128} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"Prims.op_LessThan",
"Prims.unit",
"FStar.UInt128.shift_left_large_lemma_t",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"FStar.UInt64.v",
"FStar.UInt128.... | [] | false | false | false | false | false | let shift_left_large a s =
| let h_shift = U32.sub s u32_64 in
assert (U32.v h_shift < 64);
let r = { low = U64.uint_to_t 0; high = U64.shift_left a.low h_shift } in
assert (U64.v r.high == (U64.v a.low * pow2 (U32.v s - 64)) % pow2 64);
mod_mul (U64.v a.low * pow2 (U32.v s - 64)) (pow2 64) (pow2 64);
Math.pow2_plus (U32.v s - 64) 64;
assert (U64.... | false |
FStar.UInt128.fst | FStar.UInt128.add_mod | val add_mod: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c -> (v a + v b) % pow2 n = v c)) | val add_mod: a:t -> b:t -> Pure t
(requires True)
(ensures (fun c -> (v a + v b) % pow2 n = v c)) | let add_mod (a b: t) : Pure t
(requires True)
(ensures (fun r -> (v a + v b) % pow2 128 = v r)) =
let l = U64.add_mod a.low b.low in
let r = { low = l;
high = U64.add_mod (U64.add_mod a.high b.high) (carry l b.low)} in
let a_l = U64.v a.low in
let a_h = U64.v a.high in
let b_l = U64.v b.low i... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 282,
"start_col": 0,
"start_line": 240
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 5,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_eli... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.unit",
"FStar.Pervasives.assert_spinoff",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Prims.op_Addition",
"FStar.UInt128.v",
"Prims.pow2",
"Prims._assert",
"Prims.eq2",
"FStar.Mul.op_Star",
"FStar.UInt128.mod_spec_rew_n",
"FStar.UInt64.v"... | [] | false | false | false | false | false | let add_mod (a b: t) : Pure t (requires True) (ensures (fun r -> (v a + v b) % pow2 128 = v r)) =
| let l = U64.add_mod a.low b.low in
let r = { low = l; high = U64.add_mod (U64.add_mod a.high b.high) (carry l b.low) } in
let a_l = U64.v a.low in
let a_h = U64.v a.high in
let b_l = U64.v b.low in
let b_h = U64.v b.high in
carry_sum_ok a.low b.low;
Math.lemma_mod_plus_distr_l (a_h + b_h) ((a_l + b_l) / (pow2 64)) (pow... | false |
FStar.UInt128.fst | FStar.UInt128.add_u64_shift_right | val add_u64_shift_right (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 (64 - U32.v s) % pow2 64)) | val add_u64_shift_right (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 (64 - U32.v s) % pow2 64)) | let add_u64_shift_right (hi lo: U64.t) (s: U32.t{U32.v s < 64}) : Pure U64.t
(requires (U32.v s <> 0))
(ensures (fun r -> U64.v r == U64.v lo / pow2 (U32.v s) +
U64.v hi * pow2 (64 - U32.v s) % pow2 64)) =
let low = U64.shift_right lo s in
let high = U64.shift_left hi (U32.sub u32_6... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 728,
"start_col": 0,
"start_line": 713
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hi: FStar.UInt64.t -> lo: FStar.UInt64.t -> s: FStar.UInt32.t{FStar.UInt32.v s < 64}
-> Prims.Pure FStar.UInt64.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"FStar.UInt64.add",
"Prims.unit",
"FStar.UInt128.mod_mul_pow2",
"FStar.UInt64.v",
"Prims.op_Subtraction",
"Prims._assert",
"Prims.pow2",
"FStar.UInt128.pow2_div_bound",
"FStar.UInt64.n",
"Prims.eq2",
... | [] | false | false | false | false | false | let add_u64_shift_right (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r -> U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 (64 - U32.v s) % pow2 64)) =
| let low = U64.shift_right lo s in
let high = U64.shift_left hi (U32.sub u32_64 s) in
let s = U32.v s in
let low_n = U64.v lo / pow2 s in
let high_n = (U64.v hi % pow2 s) * pow2 (64 - s) in
Math.pow2_plus (64 - s) s;
mod_mul (U64.v hi) (pow2 (64 - s)) (pow2 s);
assert (U64.v high == high_n);
pow2_div_bound (U64.v lo) s;... | false |
FStar.UInt128.fst | FStar.UInt128.u128_div_pow2 | val u128_div_pow2 (a: t) (s:nat{s < 64}) :
Lemma (v a / pow2 s == U64.v a.low / pow2 s + U64.v a.high * pow2 (64 - s)) | val u128_div_pow2 (a: t) (s:nat{s < 64}) :
Lemma (v a / pow2 s == U64.v a.low / pow2 s + U64.v a.high * pow2 (64 - s)) | let u128_div_pow2 a s =
Math.pow2_plus (64-s) s;
Math.paren_mul_right (U64.v a.high) (pow2 (64-s)) (pow2 s);
Math.division_addition_lemma (U64.v a.low) (pow2 s) (U64.v a.high * pow2 (64 - s)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 84,
"end_line": 771,
"start_col": 0,
"start_line": 768
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: Prims.nat{s < 64}
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.v a / Prims.pow2 s ==
FStar.UInt64.v (Mkuint128?.low a) / Prims.pow2 s +
FStar.UInt64.v (Mkuint128?.high a) * Prims.pow2 (64 - s)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Math.Lemmas.division_addition_lemma",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.pow2",
"FStar.Mul.op_Star",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_Subtraction",
"Prims.unit",... | [] | true | false | true | false | false | let u128_div_pow2 a s =
| Math.pow2_plus (64 - s) s;
Math.paren_mul_right (U64.v a.high) (pow2 (64 - s)) (pow2 s);
Math.division_addition_lemma (U64.v a.low) (pow2 s) (U64.v a.high * pow2 (64 - s)) | false |
FStar.UInt128.fst | FStar.UInt128.div_add_small | val div_add_small: n:nat -> m:nat -> k1:pos -> k2:pos ->
Lemma (requires (n < k1))
(ensures (k1*m / (k1*k2) == (n + k1*m) / (k1*k2))) | val div_add_small: n:nat -> m:nat -> k1:pos -> k2:pos ->
Lemma (requires (n < k1))
(ensures (k1*m / (k1*k2) == (n + k1*m) / (k1*k2))) | let div_add_small n m k1 k2 =
div_product (k1*m) k1 k2;
div_product (n+k1*m) k1 k2;
mul_div_cancel m k1;
assert (k1*m/k1 == m);
div_plus_multiple n m k1 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 26,
"end_line": 576,
"start_col": 0,
"start_line": 571
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> m: Prims.nat -> k1: Prims.pos -> k2: Prims.pos
-> FStar.Pervasives.Lemma (requires n < k1)
(ensures k1 * m / (k1 * k2) == (n + k1 * m) / (k1 * k2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.UInt128.div_plus_multiple",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Division",
"FStar.Mul.op_Star",
"FStar.UInt128.mul_div_cancel",
"FStar.UInt128.div_product",
"Prims.op_Addition"
] | [] | true | false | true | false | false | let div_add_small n m k1 k2 =
| div_product (k1 * m) k1 k2;
div_product (n + k1 * m) k1 k2;
mul_div_cancel m k1;
assert (k1 * m / k1 == m);
div_plus_multiple n m k1 | false |
FStar.UInt128.fst | FStar.UInt128.shift_right_reconstruct | val shift_right_reconstruct : a_h:UInt.uint_t 64 -> s:nat{s < 64} ->
Lemma (a_h * pow2 (64-s) == a_h / pow2 s * pow2 64 + a_h * pow2 64 / pow2 s % pow2 64) | val shift_right_reconstruct : a_h:UInt.uint_t 64 -> s:nat{s < 64} ->
Lemma (a_h * pow2 (64-s) == a_h / pow2 s * pow2 64 + a_h * pow2 64 / pow2 s % pow2 64) | let shift_right_reconstruct a_h s =
mul_pow2_diff a_h 64 s;
mod_spec_rew_n (a_h * pow2 (64-s)) (pow2 64);
div_product_comm (a_h * pow2 64) (pow2 s) (pow2 64);
mul_div_cancel a_h (pow2 64);
assert (a_h / pow2 s * pow2 64 == a_h * pow2 64 / pow2 s / pow2 64 * pow2 64);
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 764,
"start_col": 0,
"start_line": 758
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a_h: FStar.UInt.uint_t 64 -> s: Prims.nat{s < 64}
-> FStar.Pervasives.Lemma
(ensures
a_h * Prims.pow2 (64 - s) ==
(a_h / Prims.pow2 s) * Prims.pow2 64 + a_h * Prims.pow2 64 / Prims.pow2 s % Prims.pow2 64) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt.uint_t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"Prims.op_Division",
"Prims.pow2",
"FStar.UInt128.mul_div_cancel",
"FStar.UInt128.div_product_comm",
"FStar.UInt128.mod_spec_rew_n",
"Prims.op... | [] | true | false | true | false | false | let shift_right_reconstruct a_h s =
| mul_pow2_diff a_h 64 s;
mod_spec_rew_n (a_h * pow2 (64 - s)) (pow2 64);
div_product_comm (a_h * pow2 64) (pow2 s) (pow2 64);
mul_div_cancel a_h (pow2 64);
assert ((a_h / pow2 s) * pow2 64 == (a_h * pow2 64 / pow2 s / pow2 64) * pow2 64);
() | false |
FStar.UInt128.fst | FStar.UInt128.shift_left | val shift_left: a:t -> s:UInt32.t -> Pure t
(requires (U32.v s < n))
(ensures (fun c -> v c = ((v a * pow2 (UInt32.v s)) % pow2 n))) | val shift_left: a:t -> s:UInt32.t -> Pure t
(requires (U32.v s < n))
(ensures (fun c -> v c = ((v a * pow2 (UInt32.v s)) % pow2 n))) | let shift_left a s =
if (U32.lt s u32_64) then shift_left_small a s
else shift_left_large a s | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 27,
"end_line": 711,
"start_col": 0,
"start_line": 709
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"FStar.UInt32.lt",
"FStar.UInt128.u32_64",
"FStar.UInt128.shift_left_small",
"Prims.bool",
"FStar.UInt128.shift_left_large"
] | [] | false | false | false | false | false | let shift_left a s =
| if (U32.lt s u32_64) then shift_left_small a s else shift_left_large a s | false |
FStar.UInt128.fst | FStar.UInt128.div_product_comm | val div_product_comm : n1:nat -> k1:pos -> k2:pos ->
Lemma (n1 / k1 / k2 == n1 / k2 / k1) | val div_product_comm : n1:nat -> k1:pos -> k2:pos ->
Lemma (n1 / k1 / k2 == n1 / k2 / k1) | let div_product_comm n1 k1 k2 =
div_product n1 k1 k2;
div_product n1 k2 k1 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 24,
"end_line": 754,
"start_col": 0,
"start_line": 752
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n1: Prims.nat -> k1: Prims.pos -> k2: Prims.pos
-> FStar.Pervasives.Lemma (ensures n1 / k1 / k2 == n1 / k2 / k1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.pos",
"FStar.UInt128.div_product",
"Prims.unit"
] | [] | true | false | true | false | false | let div_product_comm n1 k1 k2 =
| div_product n1 k1 k2;
div_product n1 k2 k1 | false |
FStar.UInt128.fst | FStar.UInt128.shift_right_small | val shift_right_small (a: t) (s: U32.t{U32.v s < 64})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) | val shift_right_small (a: t) (s: U32.t{U32.v s < 64})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) | let shift_right_small (a: t) (s: U32.t{U32.v s < 64}) : Pure t
(requires True)
(ensures (fun r -> v r == v a / pow2 (U32.v s))) =
if U32.eq s 0ul then a
else
let r = { low = add_u64_shift_right_respec a.high a.low s;
high = U64.shift_right a.high s; } in
let a_h = U64.v a.high in
let a_l = U64... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 786,
"start_col": 0,
"start_line": 773
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t{FStar.UInt32.v s < 64} -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"FStar.UInt32.eq",
"FStar.UInt32.__uint_to_t",
"Prims.bool",
"Prims.unit",
"FStar.UInt128.u128_div_pow2",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.UInt128.v",
"Prims.op_Addition",
"FStar.M... | [] | false | false | false | false | false | let shift_right_small (a: t) (s: U32.t{U32.v s < 64})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) =
| if U32.eq s 0ul
then a
else
let r = { low = add_u64_shift_right_respec a.high a.low s; high = U64.shift_right a.high s } in
let a_h = U64.v a.high in
let a_l = U64.v a.low in
let s = U32.v s in
shift_right_reconstruct a_h s;
assert (v r == a_h * pow2 (64 - s) + a_l / pow2 s);
u128_div_pow2 a s;
r | false |
FStar.UInt128.fst | FStar.UInt128.add_u64_shift_right_respec | val add_u64_shift_right_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 64 / pow2 (U32.v s) % pow2 64)) | val add_u64_shift_right_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 64 / pow2 (U32.v s) % pow2 64)) | let add_u64_shift_right_respec (hi lo:U64.t) (s: U32.t{U32.v s < 64}) : Pure U64.t
(requires (U32.v s <> 0))
(ensures (fun r -> U64.v r == U64.v lo / pow2 (U32.v s) +
U64.v hi * pow2 64 / pow2 (U32.v s) % pow2 64)) =
let r = add_u64_shift_right hi lo s in
let s = U32.v s in
mul_po... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 744,
"start_col": 0,
"start_line": 737
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hi: FStar.UInt64.t -> lo: FStar.UInt64.t -> s: FStar.UInt32.t{FStar.UInt32.v s < 64}
-> Prims.Pure FStar.UInt64.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.unit",
"FStar.UInt128.mul_pow2_diff",
"FStar.UInt64.v",
"FStar.UInt.uint_t",
"FStar.UInt128.add_u64_shift_right",
"Prims.op_disEquality",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Prims.o... | [] | false | false | false | false | false | let add_u64_shift_right_respec (hi lo: U64.t) (s: U32.t{U32.v s < 64})
: Pure U64.t
(requires (U32.v s <> 0))
(ensures
(fun r ->
U64.v r == U64.v lo / pow2 (U32.v s) + U64.v hi * pow2 64 / pow2 (U32.v s) % pow2 64)) =
| let r = add_u64_shift_right hi lo s in
let s = U32.v s in
mul_pow2_diff (U64.v hi) 64 s;
r | false |
FStar.UInt128.fst | FStar.UInt128.shift_right | val shift_right: a:t -> s:UInt32.t -> Pure t
(requires (U32.v s < n))
(ensures (fun c -> v c = (v a / (pow2 (UInt32.v s))))) | val shift_right: a:t -> s:UInt32.t -> Pure t
(requires (U32.v s < n))
(ensures (fun c -> v c = (v a / (pow2 (UInt32.v s))))) | let shift_right (a: t) (s: U32.t) : Pure t
(requires (U32.v s < 128))
(ensures (fun r -> v r == v a / pow2 (U32.v s))) =
if U32.lt s u32_64
then shift_right_small a s
else shift_right_large a s | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 805,
"start_col": 0,
"start_line": 800
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"FStar.UInt32.lt",
"FStar.UInt128.u32_64",
"FStar.UInt128.shift_right_small",
"Prims.bool",
"FStar.UInt128.shift_right_large",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.eq2",
"Prims.int",
"FStar.UInt128.v",
"Prims.op_Division",
"Prims... | [] | false | false | false | false | false | let shift_right (a: t) (s: U32.t)
: Pure t (requires (U32.v s < 128)) (ensures (fun r -> v r == v a / pow2 (U32.v s))) =
| if U32.lt s u32_64 then shift_right_small a s else shift_right_large a s | false |
FStar.UInt128.fst | FStar.UInt128.shift_right_large | val shift_right_large (a: t) (s: U32.t{U32.v s >= 64 /\ U32.v s < 128})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) | val shift_right_large (a: t) (s: U32.t{U32.v s >= 64 /\ U32.v s < 128})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) | let shift_right_large (a: t) (s: U32.t{U32.v s >= 64 /\ U32.v s < 128}) : Pure t
(requires True)
(ensures (fun r -> v r == v a / pow2 (U32.v s))) =
let r = { high = U64.uint_to_t 0;
low = U64.shift_right a.high (U32.sub s u32_64); } in
let s = U32.v s in
Math.pow2_plus 64 (s - 64);
div_product (... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 798,
"start_col": 0,
"start_line": 788
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> s: FStar.UInt32.t{FStar.UInt32.v s >= 64 /\ FStar.UInt32.v s < 128}
-> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"Prims.op_LessThan",
"Prims.unit",
"FStar.UInt128.div_plus_multiple",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.__proj__Mkuint128__item__high",... | [] | false | false | false | false | false | let shift_right_large (a: t) (s: U32.t{U32.v s >= 64 /\ U32.v s < 128})
: Pure t (requires True) (ensures (fun r -> v r == v a / pow2 (U32.v s))) =
| let r = { high = U64.uint_to_t 0; low = U64.shift_right a.high (U32.sub s u32_64) } in
let s = U32.v s in
Math.pow2_plus 64 (s - 64);
div_product (v a) (pow2 64) (pow2 (s - 64));
assert (v a / pow2 s == v a / pow2 64 / pow2 (s - 64));
div_plus_multiple (U64.v a.low) (U64.v a.high) (pow2 64);
r | false |
FStar.UInt128.fst | FStar.UInt128.gte | val gte (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == gte #n (v a) (v b))) | val gte (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == gte #n (v a) (v b))) | let gte (a b:t) = U64.gt a.high b.high ||
(U64.eq a.high b.high && U64.gte a.low b.low) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 63,
"end_line": 813,
"start_col": 0,
"start_line": 812
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure Prims.bool | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.op_BarBar",
"FStar.UInt64.gt",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_AmpAmp",
"FStar.UInt64.eq",
"FStar.UInt64.gte",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.bool"
] | [] | false | false | false | false | false | let gte (a b: t) =
| U64.gt a.high b.high || (U64.eq a.high b.high && U64.gte a.low b.low) | false |
FStar.UInt128.fst | FStar.UInt128.gt | val gt (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == gt #n (v a) (v b))) | val gt (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == gt #n (v a) (v b))) | let gt (a b:t) = U64.gt a.high b.high ||
(U64.eq a.high b.high && U64.gt a.low b.low) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 809,
"start_col": 0,
"start_line": 808
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure Prims.bool | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.op_BarBar",
"FStar.UInt64.gt",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_AmpAmp",
"FStar.UInt64.eq",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.bool"
] | [] | false | false | false | false | false | let gt (a b: t) =
| U64.gt a.high b.high || (U64.eq a.high b.high && U64.gt a.low b.low) | false |
FStar.UInt128.fst | FStar.UInt128.lt | val lt (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == lt #n (v a) (v b))) | val lt (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == lt #n (v a) (v b))) | let lt (a b:t) = U64.lt a.high b.high ||
(U64.eq a.high b.high && U64.lt a.low b.low) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 811,
"start_col": 0,
"start_line": 810
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure Prims.bool | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.op_BarBar",
"FStar.UInt64.lt",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_AmpAmp",
"FStar.UInt64.eq",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.bool"
] | [] | false | false | false | false | false | let lt (a b: t) =
| U64.lt a.high b.high || (U64.eq a.high b.high && U64.lt a.low b.low) | false |
FStar.UInt128.fst | FStar.UInt128.pll_l | val pll_l (x y: U64.t) : UInt.uint_t 32 | val pll_l (x y: U64.t) : UInt.uint_t 32 | let pll_l (x y: U64.t) : UInt.uint_t 32 =
l32 (pll x y) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 986,
"start_col": 0,
"start_line": 985
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> y: FStar.UInt64.t -> FStar.UInt.uint_t 32 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.l32",
"FStar.UInt128.pll",
"FStar.UInt.uint_t"
] | [] | false | false | false | false | false | let pll_l (x y: U64.t) : UInt.uint_t 32 =
| l32 (pll x y) | false |
FStar.UInt128.fst | FStar.UInt128.pll_h | val pll_h (x y: U64.t) : UInt.uint_t 32 | val pll_h (x y: U64.t) : UInt.uint_t 32 | let pll_h (x y: U64.t) : UInt.uint_t 32 =
h32 (pll x y) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 988,
"start_col": 0,
"start_line": 987
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> y: FStar.UInt64.t -> FStar.UInt.uint_t 32 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.h32",
"FStar.UInt128.pll",
"FStar.UInt.uint_t"
] | [] | false | false | false | false | false | let pll_h (x y: U64.t) : UInt.uint_t 32 =
| h32 (pll x y) | false |
FStar.UInt128.fst | FStar.UInt128.u64_logand_comm | val u64_logand_comm (a b: U64.t) : Lemma (U64.logand a b == U64.logand b a) | val u64_logand_comm (a b: U64.t) : Lemma (U64.logand a b == U64.logand b a) | let u64_logand_comm (a b:U64.t) : Lemma (U64.logand a b == U64.logand b a) =
UInt.logand_commutative (U64.v a) (U64.v b) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 45,
"end_line": 818,
"start_col": 0,
"start_line": 817
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma (ensures FStar.UInt64.logand a b == FStar.UInt64.logand b a) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logand_commutative",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.UInt64.logand",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let u64_logand_comm (a b: U64.t) : Lemma (U64.logand a b == U64.logand b a) =
| UInt.logand_commutative (U64.v a) (U64.v b) | false |
FStar.UInt128.fst | FStar.UInt128.u64_and_0 | val u64_and_0 (a b:U64.t) :
Lemma (U64.v b = 0 ==> U64.v (U64.logand a b) = 0)
[SMTPat (U64.logand a b)] | val u64_and_0 (a b:U64.t) :
Lemma (U64.v b = 0 ==> U64.v (U64.logand a b) = 0)
[SMTPat (U64.logand a b)] | let u64_and_0 a b = UInt.logand_lemma_1 (U64.v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 823,
"start_col": 0,
"start_line": 823
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures FStar.UInt64.v b = 0 ==> FStar.UInt64.v (FStar.UInt64.logand a b) = 0)
[SMTPat (FStar.UInt64.logand a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logand_lemma_1",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_and_0 a b =
| UInt.logand_lemma_1 (U64.v a) | false |
FStar.UInt128.fst | FStar.UInt128.eq | val eq (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == eq #n (v a) (v b))) | val eq (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == eq #n (v a) (v b))) | let eq (a b:t) = U64.eq a.low b.low && U64.eq a.high b.high | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 59,
"end_line": 807,
"start_col": 0,
"start_line": 807
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure Prims.bool | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.op_AmpAmp",
"FStar.UInt64.eq",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.bool"
] | [] | false | false | false | false | false | let eq (a b: t) =
| U64.eq a.low b.low && U64.eq a.high b.high | false |
FStar.UInt128.fst | FStar.UInt128.u64_0_and | val u64_0_and (a b: U64.t)
: Lemma (U64.v a = 0 ==> U64.v (U64.logand a b) = 0) [SMTPat (U64.logand a b)] | val u64_0_and (a b: U64.t)
: Lemma (U64.v a = 0 ==> U64.v (U64.logand a b) = 0) [SMTPat (U64.logand a b)] | let u64_0_and (a b:U64.t) :
Lemma (U64.v a = 0 ==> U64.v (U64.logand a b) = 0)
[SMTPat (U64.logand a b)] =
u64_logand_comm a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 21,
"end_line": 828,
"start_col": 0,
"start_line": 825
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures FStar.UInt64.v a = 0 ==> FStar.UInt64.v (FStar.UInt64.logand a b) = 0)
[SMTPat (FStar.UInt64.logand a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.u64_logand_comm",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.UInt64.v",
"FStar.UInt64.logand",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat",
"Prims.Nil"
] | [] | true | false | true | false | false | let u64_0_and (a b: U64.t)
: Lemma (U64.v a = 0 ==> U64.v (U64.logand a b) = 0) [SMTPat (U64.logand a b)] =
| u64_logand_comm a b | false |
FStar.UInt128.fst | FStar.UInt128.shift_t_val | val shift_t_val (a: t) (s: nat)
: Lemma (v a * pow2 s == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s)) | val shift_t_val (a: t) (s: nat)
: Lemma (v a * pow2 s == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s)) | let shift_t_val (a: t) (s: nat) :
Lemma (v a * pow2 s == U64.v a.low * pow2 s + U64.v a.high * pow2 (64+s)) =
Math.pow2_plus 64 s;
() | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 626,
"start_col": 0,
"start_line": 623
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 5,
"quake_keep": false,
"quake_lo": 1,
"retry": true,
"reuse_hint_for": null,
"smtencoding_eli... | false | a: FStar.UInt128.t -> s: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt128.v a * Prims.pow2 s ==
FStar.UInt64.v (Mkuint128?.low a) * Prims.pow2 s +
FStar.UInt64.v (Mkuint128?.high a) * Prims.pow2 (64 + s)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt128.t",
"Prims.nat",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"FStar.UInt128.v",
"Prims.pow2",
"Prims.op_Addition",
"FStar.UInt64.v",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128... | [] | true | false | true | false | false | let shift_t_val (a: t) (s: nat)
: Lemma (v a * pow2 s == U64.v a.low * pow2 s + U64.v a.high * pow2 (64 + s)) =
| Math.pow2_plus 64 s;
() | false |
FStar.UInt128.fst | FStar.UInt128.u64_or_1 | val u64_or_1 (a b:U64.t) :
Lemma (U64.v b = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1)
[SMTPat (U64.logor a b)] | val u64_or_1 (a b:U64.t) :
Lemma (U64.v b = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1)
[SMTPat (U64.logor a b)] | let u64_or_1 a b = UInt.logor_lemma_2 (U64.v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 859,
"start_col": 0,
"start_line": 859
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt64.v b = Prims.pow2 64 - 1 ==>
FStar.UInt64.v (FStar.UInt64.logor a b) = Prims.pow2 64 - 1)
[SMTPat (FStar.UInt64.logor a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logor_lemma_2",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_or_1 a b =
| UInt.logor_lemma_2 (U64.v a) | false |
FStar.UInt128.fst | FStar.UInt128.u64_not_1 | val u64_not_1 (a:U64.t) :
Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.lognot a) = 0)
[SMTPat (U64.lognot a)] | val u64_not_1 (a:U64.t) :
Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.lognot a) = 0)
[SMTPat (U64.lognot a)] | let u64_not_1 a =
UInt.nth_lemma (UInt.lognot #64 (UInt.ones 64)) (UInt.zero 64) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 64,
"end_line": 880,
"start_col": 0,
"start_line": 879
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures FStar.UInt64.v a = Prims.pow2 64 - 1 ==> FStar.UInt64.v (FStar.UInt64.lognot a) = 0)
[SMTPat (FStar.UInt64.lognot a)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.nth_lemma",
"FStar.UInt.lognot",
"FStar.UInt.ones",
"FStar.UInt.zero",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_not_1 a =
| UInt.nth_lemma (UInt.lognot #64 (UInt.ones 64)) (UInt.zero 64) | false |
FStar.UInt128.fst | FStar.UInt128.lte | val lte (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == lte #n (v a) (v b))) | val lte (a:t) (b:t) : Pure bool
(requires True)
(ensures (fun r -> r == lte #n (v a) (v b))) | let lte (a b:t) = U64.lt a.high b.high ||
(U64.eq a.high b.high && U64.lte a.low b.low) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 63,
"end_line": 815,
"start_col": 0,
"start_line": 814
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t -> Prims.Pure Prims.bool | Prims.Pure | [] | [] | [
"FStar.UInt128.t",
"Prims.op_BarBar",
"FStar.UInt64.lt",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.op_AmpAmp",
"FStar.UInt64.eq",
"FStar.UInt64.lte",
"FStar.UInt128.__proj__Mkuint128__item__low",
"Prims.bool"
] | [] | false | false | false | false | false | let lte (a b: t) =
| U64.lt a.high b.high || (U64.eq a.high b.high && U64.lte a.low b.low) | false |
FStar.UInt128.fst | FStar.UInt128.u64_1s_and | val u64_1s_and (a b:U64.t) :
Lemma (U64.v a = pow2 64 - 1 /\
U64.v b = pow2 64 - 1 ==> U64.v (U64.logand a b) = pow2 64 - 1)
[SMTPat (U64.logand a b)] | val u64_1s_and (a b:U64.t) :
Lemma (U64.v a = pow2 64 - 1 /\
U64.v b = pow2 64 - 1 ==> U64.v (U64.logand a b) = pow2 64 - 1)
[SMTPat (U64.logand a b)] | let u64_1s_and a b = UInt.logand_lemma_2 (U64.v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 50,
"end_line": 834,
"start_col": 0,
"start_line": 834
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt64.v a = Prims.pow2 64 - 1 /\ FStar.UInt64.v b = Prims.pow2 64 - 1 ==>
FStar.UInt64.v (FStar.UInt64.logand a b) = Prims.pow2 64 - 1)
[SMTPat (FStar.UInt64.logand a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logand_lemma_2",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_1s_and a b =
| UInt.logand_lemma_2 (U64.v a) | false |
FStar.UInt128.fst | FStar.UInt128.u64_not_0 | val u64_not_0 (a:U64.t) :
Lemma (U64.v a = 0 ==> U64.v (U64.lognot a) = pow2 64 - 1)
[SMTPat (U64.lognot a)] | val u64_not_0 (a:U64.t) :
Lemma (U64.v a = 0 ==> U64.v (U64.lognot a) = pow2 64 - 1)
[SMTPat (U64.lognot a)] | let u64_not_0 a = UInt.lognot_lemma_1 #64 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 41,
"end_line": 874,
"start_col": 0,
"start_line": 874
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures FStar.UInt64.v a = 0 ==> FStar.UInt64.v (FStar.UInt64.lognot a) = Prims.pow2 64 - 1)
[SMTPat (FStar.UInt64.lognot a)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.lognot_lemma_1",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_not_0 a =
| UInt.lognot_lemma_1 #64 | false |
FStar.UInt128.fst | FStar.UInt128.u64_or_0 | val u64_or_0 (a b:U64.t) :
Lemma (U64.v a = 0 /\ U64.v b = 0 ==> U64.v (U64.logor a b) = 0)
[SMTPat (U64.logor a b)] | val u64_or_0 (a b:U64.t) :
Lemma (U64.v a = 0 /\ U64.v b = 0 ==> U64.v (U64.logor a b) = 0)
[SMTPat (U64.logor a b)] | let u64_or_0 a b = UInt.logor_lemma_1 (U64.v a) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 869,
"start_col": 0,
"start_line": 869
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt64.v a = 0 /\ FStar.UInt64.v b = 0 ==> FStar.UInt64.v (FStar.UInt64.logor a b) = 0
) [SMTPat (FStar.UInt64.logor a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logor_lemma_1",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit"
] | [] | true | false | true | false | false | let u64_or_0 a b =
| UInt.logor_lemma_1 (U64.v a) | false |
FStar.UInt128.fst | FStar.UInt128.u64_1_or | val u64_1_or (a b: U64.t)
: Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1) [SMTPat (U64.logor a b)] | val u64_1_or (a b: U64.t)
: Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1) [SMTPat (U64.logor a b)] | let u64_1_or (a b:U64.t) :
Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1)
[SMTPat (U64.logor a b)] =
u64_logor_comm a b | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 864,
"start_col": 0,
"start_line": 861
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt64.v a = Prims.pow2 64 - 1 ==>
FStar.UInt64.v (FStar.UInt64.logor a b) = Prims.pow2 64 - 1)
[SMTPat (FStar.UInt64.logor a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.u64_logor_comm",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.UInt64.v",
"Prims.op_Subtraction",
"Prims.pow2",
"FStar.UInt64.logor",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.P... | [] | true | false | true | false | false | let u64_1_or (a b: U64.t)
: Lemma (U64.v a = pow2 64 - 1 ==> U64.v (U64.logor a b) = pow2 64 - 1) [SMTPat (U64.logor a b)] =
| u64_logor_comm a b | false |
FStar.UInt128.fst | FStar.UInt128.uint128_to_uint64 | val uint128_to_uint64: a:t -> b:U64.t{U64.v b == v a % pow2 64} | val uint128_to_uint64: a:t -> b:U64.t{U64.v b == v a % pow2 64} | let uint128_to_uint64 (a:t) : b:U64.t{U64.v b == v a % pow2 64} = a.low | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 71,
"end_line": 896,
"start_col": 0,
"start_line": 896
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt64.t{FStar.UInt64.v b == FStar.UInt128.v a % Prims.pow2 64} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt64.t",
"Prims.eq2",
"Prims.int",
"FStar.UInt64.v",
"Prims.op_Modulus",
"FStar.UInt128.v",
"Prims.pow2"
] | [] | false | false | false | false | false | let uint128_to_uint64 (a: t) : b: U64.t{U64.v b == v a % pow2 64} =
| a.low | false |
FStar.UInt128.fst | FStar.UInt128.u64_logor_comm | val u64_logor_comm (a b: U64.t) : Lemma (U64.logor a b == U64.logor b a) | val u64_logor_comm (a b: U64.t) : Lemma (U64.logor a b == U64.logor b a) | let u64_logor_comm (a b:U64.t) : Lemma (U64.logor a b == U64.logor b a) =
UInt.logor_commutative (U64.v a) (U64.v b) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 854,
"start_col": 0,
"start_line": 853
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt64.t
-> FStar.Pervasives.Lemma (ensures FStar.UInt64.logor a b == FStar.UInt64.logor b a) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt.logor_commutative",
"FStar.UInt64.n",
"FStar.UInt64.v",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.UInt64.logor",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let u64_logor_comm (a b: U64.t) : Lemma (U64.logor a b == U64.logor b a) =
| UInt.logor_commutative (U64.v a) (U64.v b) | false |
FStar.UInt128.fst | FStar.UInt128.eq_mask | val eq_mask: a:t -> b:t -> Tot (c:t{(v a = v b ==> v c = pow2 n - 1) /\ (v a <> v b ==> v c = 0)}) | val eq_mask: a:t -> b:t -> Tot (c:t{(v a = v b ==> v c = pow2 n - 1) /\ (v a <> v b ==> v c = 0)}) | let eq_mask (a b: t) : Pure t
(requires True)
(ensures (fun r -> (v a = v b ==> v r = pow2 128 - 1) /\ (v a <> v b ==> v r = 0))) =
let mask = U64.logand (U64.eq_mask a.low b.low)
(U64.eq_mask a.high b.high) in
{ low = mask; high = mask; } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 841,
"start_col": 0,
"start_line": 836
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt128.t -> b: FStar.UInt128.t
-> c:
FStar.UInt128.t
{ (FStar.UInt128.v a = FStar.UInt128.v b ==>
FStar.UInt128.v c = Prims.pow2 FStar.UInt128.n - 1) /\
(FStar.UInt128.v a <> FStar.UInt128.v b ==> FStar.UInt128.v c = 0) } | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt128.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.t",
"FStar.UInt64.logand",
"FStar.UInt64.eq_mask",
"FStar.UInt128.__proj__Mkuint128__item__low",
"FStar.UInt128.__proj__Mkuint128__item__high",
"Prims.l_True",
"Prims.l_and",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_Equality",
"FStar.U... | [] | false | false | false | false | false | let eq_mask (a b: t)
: Pure t
(requires True)
(ensures (fun r -> (v a = v b ==> v r = pow2 128 - 1) /\ (v a <> v b ==> v r = 0))) =
| let mask = U64.logand (U64.eq_mask a.low b.low) (U64.eq_mask a.high b.high) in
{ low = mask; high = mask } | false |
FStar.UInt128.fst | FStar.UInt128.l32 | val l32 (x: UInt.uint_t 64) : UInt.uint_t 32 | val l32 (x: UInt.uint_t 64) : UInt.uint_t 32 | let l32 (x: UInt.uint_t 64) : UInt.uint_t 32 = x % pow2 32 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 58,
"end_line": 967,
"start_col": 0,
"start_line": 967
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt.uint_t 64 -> FStar.UInt.uint_t 32 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt.uint_t",
"Prims.op_Modulus",
"Prims.pow2"
] | [] | false | false | false | false | false | let l32 (x: UInt.uint_t 64) : UInt.uint_t 32 =
| x % pow2 32 | false |
FStar.UInt128.fst | FStar.UInt128.phh | val phh (x y: U64.t) : n: UInt.uint_t 64 {n < pow2 64 - pow2 32 - 1} | val phh (x y: U64.t) : n: UInt.uint_t 64 {n < pow2 64 - pow2 32 - 1} | let phh (x y: U64.t) : n:UInt.uint_t 64{n < pow2 64 - pow2 32 - 1} =
mul32_bound (h32 (U64.v x)) (h32 (U64.v y)) | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 45,
"end_line": 983,
"start_col": 0,
"start_line": 982
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> y: FStar.UInt64.t
-> n: FStar.UInt.uint_t 64 {n < Prims.pow2 64 - Prims.pow2 32 - 1} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.mul32_bound",
"FStar.UInt128.h32",
"FStar.UInt64.v",
"FStar.UInt.uint_t",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Subtraction",
"Prims.pow2"
] | [] | false | false | false | false | false | let phh (x y: U64.t) : n: UInt.uint_t 64 {n < pow2 64 - pow2 32 - 1} =
| mul32_bound (h32 (U64.v x)) (h32 (U64.v y)) | false |
FStar.UInt128.fst | FStar.UInt128.h32 | val h32 (x: UInt.uint_t 64) : UInt.uint_t 32 | val h32 (x: UInt.uint_t 64) : UInt.uint_t 32 | let h32 (x: UInt.uint_t 64) : UInt.uint_t 32 = x / pow2 32 | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 58,
"end_line": 968,
"start_col": 0,
"start_line": 968
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt.uint_t 64 -> FStar.UInt.uint_t 32 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt.uint_t",
"Prims.op_Division",
"Prims.pow2"
] | [] | false | false | false | false | false | let h32 (x: UInt.uint_t 64) : UInt.uint_t 32 =
| x / pow2 32 | false |
FStar.UInt128.fst | FStar.UInt128.mul32 | val mul32: x:U64.t -> y:U32.t -> Pure t
(requires True)
(ensures (fun r -> v r == U64.v x * U32.v y)) | val mul32: x:U64.t -> y:U32.t -> Pure t
(requires True)
(ensures (fun r -> v r == U64.v x * U32.v y)) | let mul32 x y =
let x0 = u64_mod_32 x in
let x1 = U64.shift_right x u32_32 in
u32_product_bound (U64.v x0) (U32.v y);
let x0y = U64.mul x0 (FStar.Int.Cast.uint32_to_uint64 y) in
let x0yl = u64_mod_32 x0y in
let x0yh = U64.shift_right x0y u32_32 in
u32_product_bound (U64.v x1) (U32.v y);
// not in the or... | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 965,
"start_col": 0,
"start_line": 940
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> y: FStar.UInt32.t -> Prims.Pure FStar.UInt128.t | Prims.Pure | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"FStar.Mul.op_Star",
"FStar.UInt64.v",
"FStar.UInt32.v",
"Prims.op_Addition",
"Prims.pow2",
"FStar.UInt128.mul32_digits",
"Prims.op_Division",
"FStar.UInt128.u64_32_digits",
"FStar.UInt128.uint12... | [] | false | false | false | false | false | let mul32 x y =
| let x0 = u64_mod_32 x in
let x1 = U64.shift_right x u32_32 in
u32_product_bound (U64.v x0) (U32.v y);
let x0y = U64.mul x0 (FStar.Int.Cast.uint32_to_uint64 y) in
let x0yl = u64_mod_32 x0y in
let x0yh = U64.shift_right x0y u32_32 in
u32_product_bound (U64.v x1) (U32.v y);
let x1y' = U64.mul x1 (FStar.Int.Cast.uint32_to_... | false |
FStar.UInt128.fst | FStar.UInt128.uint64_to_uint128 | val uint64_to_uint128: a:U64.t -> b:t{v b == U64.v a} | val uint64_to_uint128: a:U64.t -> b:t{v b == U64.v a} | let uint64_to_uint128 (a:U64.t) = { low = a; high = U64.uint_to_t 0; } | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 70,
"end_line": 894,
"start_col": 0,
"start_line": 894
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: FStar.UInt64.t -> b: FStar.UInt128.t{FStar.UInt128.v b == FStar.UInt64.v a} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.UInt128.Mkuint128",
"FStar.UInt64.uint_to_t",
"FStar.UInt128.t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt128.n",
"FStar.UInt64.n",
"FStar.UInt128.v",
"FStar.UInt64.v"
] | [] | false | false | false | false | false | let uint64_to_uint128 (a: U64.t) =
| { low = a; high = U64.uint_to_t 0 } | false |
FStar.UInt128.fst | FStar.UInt128.mul32_bound | val mul32_bound : x:UInt.uint_t 32 -> y:UInt.uint_t 32 ->
n:UInt.uint_t 64{n < pow2 64 - pow2 32 - 1 /\ n == x * y} | val mul32_bound : x:UInt.uint_t 32 -> y:UInt.uint_t 32 ->
n:UInt.uint_t 64{n < pow2 64 - pow2 32 - 1 /\ n == x * y} | let mul32_bound x y =
u32_product_bound x y;
x * y | {
"file_name": "ulib/FStar.UInt128.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 7,
"end_line": 974,
"start_col": 0,
"start_line": 972
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.BV.fst.checked",
"FStar.Seq.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "FStar.Tactics.BV",
"short_module": "TBV"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt.uint_t 32 -> y: FStar.UInt.uint_t 32
-> n: FStar.UInt.uint_t 64 {n < Prims.pow2 64 - Prims.pow2 32 - 1 /\ n == x * y} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt.uint_t",
"FStar.Mul.op_Star",
"Prims.unit",
"FStar.UInt128.u32_product_bound",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Subtraction",
"Prims.pow2",
"Prims.eq2",
"Prims.int"
] | [] | false | false | false | false | false | let mul32_bound x y =
| u32_product_bound x y;
x * y | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.