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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if5 | val test_if5 (b: bool) : SteelT ref emp (fun r -> ptr r) | val test_if5 (b: bool) : SteelT ref emp (fun r -> ptr r) | let test_if5 (b:bool) : SteelT ref emp (fun r -> ptr r)
= if b then alloc 0 else alloc 1 | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 34,
"end_line": 125,
"start_col": 0,
"start_line": 124
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b: Prims.bool -> Steel.Effect.SteelT SteelFramingTestSuite.ref | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"SteelFramingTestSuite.alloc",
"SteelFramingTestSuite.ref",
"Steel.Effect.Common.emp",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if5 (b: bool) : SteelT ref emp (fun r -> ptr r) =
| if b then alloc 0 else alloc 1 | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_top_index_u64 | val bn_get_top_index_u64 (len: _) : bn_get_top_index_st U64 len | val bn_get_top_index_u64 (len: _) : bn_get_top_index_st U64 len | let bn_get_top_index_u64 len: bn_get_top_index_st U64 len = mk_bn_get_top_index #U64 len | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 88,
"end_line": 137,
"start_col": 0,
"start_line": 137
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 | len: Lib.IntTypes.size_t{0 < Lib.IntTypes.v len}
-> Hacl.Bignum.Lib.bn_get_top_index_st Lib.IntTypes.U64 len | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Lib.mk_bn_get_top_index",
"Lib.IntTypes.U64",
"Hacl.Bignum.Lib.bn_get_top_index_st"
] | [] | false | false | false | false | false | let bn_get_top_index_u64 len : bn_get_top_index_st U64 len =
| mk_bn_get_top_index #U64 len | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if1 | val test_if1 (b: bool) : SteelT unit emp (fun _ -> emp) | val test_if1 (b: bool) : SteelT unit emp (fun _ -> emp) | let test_if1 (b:bool) : SteelT unit emp (fun _ -> emp)
= if b then noop () else noop () | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 34,
"end_line": 113,
"start_col": 0,
"start_line": 112
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b: Prims.bool -> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"Steel.Effect.Atomic.noop",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Prims.unit",
"Steel.Effect.Common.emp",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if1 (b: bool) : SteelT unit emp (fun _ -> emp) =
| if b then noop () else noop () | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_bits_u32 | val bn_get_bits_u32:bn_get_bits_st U32 | val bn_get_bits_u32:bn_get_bits_st U32 | let bn_get_bits_u32: bn_get_bits_st U32 = mk_bn_get_bits | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 193,
"start_col": 0,
"start_line": 193
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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.Lib.bn_get_bits_st Lib.IntTypes.U32 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Lib.mk_bn_get_bits",
"Lib.IntTypes.U32"
] | [] | false | false | false | true | false | let bn_get_bits_u32:bn_get_bits_st U32 =
| mk_bn_get_bits | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.size32_maybe_enum_key_gen' | val size32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(f: size32 (serialize_enum_key p s e))
: Tot (size32 (serialize_maybe_enum_key p s e)) | val size32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(f: size32 (serialize_enum_key p s e))
: Tot (size32 (serialize_maybe_enum_key p s e)) | let size32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(f: size32 (serialize_enum_key p s e))
: Tot (size32 (serialize_maybe_enum_key p s e))
= fun (input: maybe_enum_key e) -> ((
[@inline_let]
let _ = seriali... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 81,
"end_line": 223,
"start_col": 0,
"start_line": 205
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.size32 s ->
e: LowParse.Spec.Enum.enum key repr ->
f: LowParse.SLow.Base.size32 (LowParse.Spec.Enum.serialize_enum_key p s e)
-> LowParse.SLow.Base.size32 (LowParse.Spec.Enum.serialize_maybe_enum_key p s e) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.size32",
"LowParse.Spec.Enum.enum",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.Enum.parse_enum_key",
"LowParse.Spec.... | [] | false | false | false | false | false | let size32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(f: size32 (serialize_enum_key p s e))
: Tot (size32 (serialize_maybe_enum_key p s e)) =
| fun (input: maybe_enum_key e) ->
(([@@ inline_let ]let _ = serialize_maybe_enum_key_eq s e input in
match input with
| Known k ->
[@@ inline_let ]let _ = serialize_enum_key_eq s e k in
f k
| Unknown r -> s32 r)
<:
(r: U32.t{size32_postcond (serialize_maybe_enum_key p s e) inp... | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_bits_u64 | val bn_get_bits_u64:bn_get_bits_st U64 | val bn_get_bits_u64:bn_get_bits_st U64 | let bn_get_bits_u64: bn_get_bits_st U64 = mk_bn_get_bits | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 195,
"start_col": 0,
"start_line": 195
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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.Lib.bn_get_bits_st Lib.IntTypes.U64 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Lib.mk_bn_get_bits",
"Lib.IntTypes.U64"
] | [] | false | false | false | true | false | let bn_get_bits_u64:bn_get_bits_st U64 =
| mk_bn_get_bits | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if2 | val test_if2 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) | val test_if2 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) | let test_if2 (b:bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r)
= if b then write r 0 else write r 1 | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 38,
"end_line": 116,
"start_col": 0,
"start_line": 115
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b: Prims.bool -> r: SteelFramingTestSuite.ref -> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"SteelFramingTestSuite.ref",
"SteelFramingTestSuite.write",
"Prims.unit",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if2 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) =
| if b then write r 0 else write r 1 | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test3 | val test3 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | val test3 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | let test3 (b1 b2 b3: ref) : SteelT int
(ptr b1 `star` ptr b2 `star` ptr b3)
(fun _ -> ptr b2 `star` ptr b1 `star` ptr b3)
=
let x = read b3 in
x | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 3,
"end_line": 66,
"start_col": 0,
"start_line": 61
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b1: SteelFramingTestSuite.ref -> b2: SteelFramingTestSuite.ref -> b3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.int | Steel.Effect.SteelT | [] | [] | [
"SteelFramingTestSuite.ref",
"Prims.int",
"SteelFramingTestSuite.read",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test3 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) =
| let x = read b3 in
x | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.serialize32_maybe_enum_key_gen' | val serialize32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(f: serializer32 (serialize_enum_key p s e))
: Tot (serializer32 (serialize_maybe_enum_key p s e)) | val serialize32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(f: serializer32 (serialize_enum_key p s e))
: Tot (serializer32 (serialize_maybe_enum_key p s e)) | let serialize32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(f: serializer32 (serialize_enum_key p s e))
: Tot (serializer32 (serialize_maybe_enum_key p s e))
= fun (input: maybe_enum_key e) -> ((
[@inline_l... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 88,
"end_line": 169,
"start_col": 0,
"start_line": 151
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.serializer32 s ->
e: LowParse.Spec.Enum.enum key repr ->
f: LowParse.SLow.Base.serializer32 (LowParse.Spec.Enum.serialize_enum_key p s e)
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.Enum.serialize_maybe_enum_key p s e) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.serializer32",
"LowParse.Spec.Enum.enum",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.Enum.parse_enum_key",
"LowParse... | [] | false | false | false | false | false | let serialize32_maybe_enum_key_gen'
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(f: serializer32 (serialize_enum_key p s e))
: Tot (serializer32 (serialize_maybe_enum_key p s e)) =
| fun (input: maybe_enum_key e) ->
(([@@ inline_let ]let _ = serialize_maybe_enum_key_eq s e input in
match input with
| Known k ->
[@@ inline_let ]let _ = serialize_enum_key_eq s e k in
f k
| Unknown r -> s32 r)
<:
(r: bytes32{serializer32_correct (serialize_maybe_enum_key p s... | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.is_permutation | val is_permutation (#a:Type) (s0:seq a) (s1:seq a) (f:index_fun s0) : prop | val is_permutation (#a:Type) (s0:seq a) (s1:seq a) (f:index_fun s0) : prop | let is_permutation (#a:Type) (s0:seq a) (s1:seq a) (f:index_fun s0) =
S.length s0 == S.length s1 /\
(forall x y. // {:pattern f x; f y}
x <> y ==> f x <> f y) /\
(forall (i:nat{i < S.length s0}). // {:pattern (S.index s1 (f i))}
S.index s0 i == S.index s1 (f i)) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 39,
"end_line": 31,
"start_col": 0,
"start_line": 26
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
f: FStar.Sequence.Permutation.index_fun s0
-> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.index_fun",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"FStar.Sequence.Base.length",
"Prims.l_Forall",
"FStar.Sequence.Permutation.nat_at_most",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.op_LessThan",
"FStar.Sequence.Base.... | [] | false | false | false | false | true | let is_permutation (#a: Type) (s0 s1: seq a) (f: index_fun s0) =
| S.length s0 == S.length s1 /\ (forall x y. x <> y ==> f x <> f y) /\
(forall (i: nat{i < S.length s0}). S.index s0 i == S.index s1 (f i)) | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test4 | val test4 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | val test4 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | let test4 (b1 b2 b3: ref) : SteelT unit
(ptr b1 `star` ptr b2 `star` ptr b3)
(fun _ -> ptr b2 `star` ptr b1 `star` ptr b3)
=
let x = read b3 in
write b2 x | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 12,
"end_line": 73,
"start_col": 0,
"start_line": 68
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b1: SteelFramingTestSuite.ref -> b2: SteelFramingTestSuite.ref -> b3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"SteelFramingTestSuite.ref",
"SteelFramingTestSuite.write",
"Prims.unit",
"Prims.int",
"SteelFramingTestSuite.read",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test4 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) =
| let x = read b3 in
write b2 x | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.serialize32_enum_key_gen | val serialize32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
... | val serialize32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
... | let serialize32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k' : parser_kind)
(t' : Type)
(p' : parser k' t')
(s' : serializer p')
(u1: unit { k' == parse_filter_kind k } )
(u15: unit { t' == enum_key e } )
... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 97,
"end_line": 101,
"start_col": 0,
"start_line": 81
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.serializer32 s ->
e: LowParse.Spec.Enum.enum key repr ->
k': LowParse.Spec.Base.parser_kind ->
t': Type0 ->
p': LowParse.Spec.Base.parser k' t' ->
s': LowParse.Spec.Base.serializer p' ->
u1: Prims.unit{k' == LowParse.Spec.Combinators.parse_filter_kind k} ->
u15: ... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.serializer32",
"LowParse.Spec.Enum.enum",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.En... | [] | false | false | false | false | false | let serialize32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
... | fun (input: enum_key e) ->
([@@ inline_let ]let _ = serialize_enum_key_eq s e input in
(s32 (f input)) <: (r: bytes32{serializer32_correct (serialize_enum_key p s e) input r})) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.reveal_is_permutation | val reveal_is_permutation (#a:Type) (s0 s1:seq a) (f:index_fun s0)
: Lemma (is_permutation s0 s1 f <==>
(* lengths of the sequences are the same *)
S.length s0 == S.length s1 /\
(* f is injective *)
(forall x y. {:pattern f x; f y}
x <> y ==> f x <> f y) /\
... | val reveal_is_permutation (#a:Type) (s0 s1:seq a) (f:index_fun s0)
: Lemma (is_permutation s0 s1 f <==>
(* lengths of the sequences are the same *)
S.length s0 == S.length s1 /\
(* f is injective *)
(forall x y. {:pattern f x; f y}
x <> y ==> f x <> f y) /\
... | let reveal_is_permutation #a (s0 s1:seq a) (f:index_fun s0)
= reveal_opaque (`%is_permutation) (is_permutation s0 s1 f) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 34,
"start_col": 0,
"start_line": 33
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
f: FStar.Sequence.Permutation.index_fun s0
-> FStar.Pervasives.Lemma
(ensures
FStar.Sequence.Permutation.is_permutation s0 s1 f <==>
FStar.Sequence.Base.length s0 == FStar.Sequence.Base.length s1 /\
(forall (x: FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.index_fun",
"FStar.Pervasives.reveal_opaque",
"Prims.prop",
"FStar.Sequence.Permutation.is_permutation",
"Prims.unit"
] | [] | true | false | true | false | false | let reveal_is_permutation #a (s0: seq a) (s1: seq a) (f: index_fun s0) =
| reveal_opaque (`%is_permutation) (is_permutation s0 s1 f) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.reveal_is_permutation_nopats | val reveal_is_permutation_nopats (#a: Type) (s0 s1: seq a) (f: index_fun s0)
: Lemma
(is_permutation s0 s1 f <==>
S.length s0 == S.length s1 /\ (forall x y. x <> y ==> f x <> f y) /\
(forall (i: nat{i < S.length s0}). S.index s0 i == S.index s1 (f i))) | val reveal_is_permutation_nopats (#a: Type) (s0 s1: seq a) (f: index_fun s0)
: Lemma
(is_permutation s0 s1 f <==>
S.length s0 == S.length s1 /\ (forall x y. x <> y ==> f x <> f y) /\
(forall (i: nat{i < S.length s0}). S.index s0 i == S.index s1 (f i))) | let reveal_is_permutation_nopats (#a:Type) (s0 s1:seq a) (f:index_fun s0)
: Lemma (is_permutation s0 s1 f <==>
S.length s0 == S.length s1 /\
(forall x y. x <> y ==> f x <> f y) /\
(forall (i:nat{i < S.length s0}).
S.index s0 i == S.index s1 (f i)))
= reveal_is_perm... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 45,
"start_col": 0,
"start_line": 36
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
f: FStar.Sequence.Permutation.index_fun s0
-> FStar.Pervasives.Lemma
(ensures
FStar.Sequence.Permutation.is_permutation s0 s1 f <==>
FStar.Sequence.Base.length s0 == FStar.Sequence.Base.length s1 /\
(forall (x: FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.index_fun",
"FStar.Sequence.Permutation.reveal_is_permutation",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_iff",
"FStar.Sequence.Permutation.is_permutation",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"FStar.Sequence.Base.length"... | [] | true | false | true | false | false | let reveal_is_permutation_nopats (#a: Type) (s0 s1: seq a) (f: index_fun s0)
: Lemma
(is_permutation s0 s1 f <==>
S.length s0 == S.length s1 /\ (forall x y. x <> y ==> f x <> f y) /\
(forall (i: nat{i < S.length s0}). S.index s0 i == S.index s1 (f i))) =
| reveal_is_permutation s0 s1 f | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.size32_enum_key_gen | val size32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
(u15:... | val size32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
(u15:... | let size32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k' : parser_kind)
(t' : Type)
(p' : parser k' t')
(s' : serializer p')
(u1: unit { k' == parse_filter_kind k } )
(u15: unit { t' == enum_key e } )
(u2: unit... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 93,
"end_line": 136,
"start_col": 0,
"start_line": 116
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.size32 s ->
e: LowParse.Spec.Enum.enum key repr ->
k': LowParse.Spec.Base.parser_kind ->
t': Type0 ->
p': LowParse.Spec.Base.parser k' t' ->
s': LowParse.Spec.Base.serializer p' ->
u1: Prims.unit{k' == LowParse.Spec.Combinators.parse_filter_kind k} ->
u15: Prims.... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.size32",
"LowParse.Spec.Enum.enum",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.Enum.par... | [] | false | false | false | false | false | let size32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k' == parse_filter_kind k})
(u15:... | fun (input: enum_key e) ->
([@@ inline_let ]let _ = serialize_enum_key_eq s e input in
(s32 (f input)) <: (r: UInt32.t{size32_postcond (serialize_enum_key p s e) input r})) | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.parse32_enum_key_gen | val parse32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(p: parser k repr)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(u1: unit{k' == parse_filter_kind k})
(u15: unit{t' == enum_key e})
(u2: unit{p' == parse_enum_key p e})
... | val parse32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(p: parser k repr)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(u1: unit{k' == parse_filter_kind k})
(u15: unit{t' == enum_key e})
(u2: unit{p' == parse_enum_key p e})
... | let parse32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(p: parser k repr)
(e: enum key repr)
(k' : parser_kind)
(t' : Type)
(p' : parser k' t')
(u1: unit { k' == parse_filter_kind k } )
(u15: unit { t' == enum_key e } )
(u2: unit { p' == parse_enum_key p e } )
(pe: parser32 (parse_maybe_e... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 96,
"end_line": 67,
"start_col": 0,
"start_line": 41
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
p: LowParse.Spec.Base.parser k repr ->
e: LowParse.Spec.Enum.enum key repr ->
k': LowParse.Spec.Base.parser_kind ->
t': Type0 ->
p': LowParse.Spec.Base.parser k' t' ->
u1: Prims.unit{k' == LowParse.Spec.Combinators.parse_filter_kind k} ->
u15: Prims.unit{t' == LowParse.Spec.Enum.enum_key e}... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Enum.enum",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.Enum.parse_enum_key",
"LowParse.SLow.Base.parser32",
"LowParse.Spec.En... | [] | false | false | false | false | false | let parse32_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(p: parser k repr)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(u1: unit{k' == parse_filter_kind k})
(u15: unit{t' == enum_key e})
(u2: unit{p' == parse_enum_key p e})
... | (fun (input: bytes32) ->
(([@@ inline_let ]let _ =
parse_enum_key_eq p e (B32.reveal input);
parse_maybe_enum_key_eq p e (B32.reveal input)
in
match pe input with
| Some (k, consumed) ->
(match k with
| Known k' -> Some (k', consumed)
| _... | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_bits_st | val bn_get_bits_st : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let bn_get_bits_st (t:limb_t) =
len:size_t
-> b:lbignum t len
-> i:size_t
-> l:size_t{v l < bits t /\ v i / bits t < v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> h0 == h1 /\
r == S.bn_get_bits (as_seq h0 b) (v i) (v l)) | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 182,
"start_col": 0,
"start_line": 174
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.bits",
"Prims.op_Division",
"Hacl.Bignum.Definitions.limb",
"FStar.Monotonic.Hy... | [] | false | false | false | true | true | let bn_get_bits_st (t: limb_t) =
| len: size_t -> b: lbignum t len -> i: size_t -> l: size_t{v l < bits t /\ v i / bits t < v len}
-> Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> h0 == h1 /\ r == S.bn_get_bits (as_seq h0 b) (v i) (v l)) | false | |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test2 | val test2 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b3) `star` (ptr b2)) `star` (ptr b1)) | val test2 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b3) `star` (ptr b2)) `star` (ptr b1)) | let test2 (b1 b2 b3: ref) : SteelT int
(ptr b1 `star` ptr b2 `star` ptr b3)
(fun _ -> ptr b3 `star` ptr b2 `star` ptr b1)
=
let x = read b1 in
x | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 3,
"end_line": 59,
"start_col": 0,
"start_line": 54
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b1: SteelFramingTestSuite.ref -> b2: SteelFramingTestSuite.ref -> b3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.int | Steel.Effect.SteelT | [] | [] | [
"SteelFramingTestSuite.ref",
"Prims.int",
"SteelFramingTestSuite.read",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test2 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b3) `star` (ptr b2)) `star` (ptr b1)) =
| let x = read b1 in
x | false |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.size32_maybe_enum_key_gen | val size32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: unit{t' == ... | val size32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: unit{t' == ... | let size32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k' : parser_kind)
(t' : Type)
(p' : parser k' t')
(s' : serializer p')
(u1: unit { k == k' } )
(u15: unit { t' == maybe_enum_key e } )
(u2: unit { p' ... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 78,
"end_line": 244,
"start_col": 0,
"start_line": 226
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.size32 s ->
e: LowParse.Spec.Enum.enum key repr ->
k': LowParse.Spec.Base.parser_kind ->
t': Type0 ->
p': LowParse.Spec.Base.parser k' t' ->
s': LowParse.Spec.Base.serializer p' ->
u1: Prims.unit{k == k'} ->
u15: Prims.unit{t' == LowParse.Spec.Enum.maybe_enum_key... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.size32",
"LowParse.Spec.Enum.enum",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Enum.maybe_enum_key",
"LowParse.Spec.Enum.parse_maybe_enum_key",
"LowParse.Spec.Enum.s... | [] | false | false | false | false | false | let size32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: size32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: unit{t' == ... | size32_maybe_enum_key_gen' s32
e
(size32_enum_key_gen s32 e _ _ _ (serialize_enum_key _ s e) () () () () f) | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test0 | val test0 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b1) `star` (ptr b2)) `star` (ptr b3)) | val test0 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b1) `star` (ptr b2)) `star` (ptr b3)) | let test0 (b1 b2 b3: ref) : SteelT int
(ptr b1 `star` ptr b2 `star` ptr b3)
(fun _ -> ptr b1 `star` ptr b2 `star` ptr b3)
=
let x = read b1 in
x | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 3,
"end_line": 45,
"start_col": 0,
"start_line": 40
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b1: SteelFramingTestSuite.ref -> b2: SteelFramingTestSuite.ref -> b3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.int | Steel.Effect.SteelT | [] | [] | [
"SteelFramingTestSuite.ref",
"Prims.int",
"SteelFramingTestSuite.read",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test0 (b1 b2 b3: ref)
: SteelT int
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b1) `star` (ptr b2)) `star` (ptr b3)) =
| let x = read b1 in
x | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.split3_index | val split3_index (#a: eqtype) (s0: seq a) (x: a) (s1: seq a) (j: nat)
: Lemma (requires j < S.length (S.append s0 s1))
(ensures
(let s = S.append s0 (cons x s1) in
let s' = S.append s0 s1 in
let n = S.length s0 in
if j < n then S.index s' j == S.index s j else S.index s' ... | val split3_index (#a: eqtype) (s0: seq a) (x: a) (s1: seq a) (j: nat)
: Lemma (requires j < S.length (S.append s0 s1))
(ensures
(let s = S.append s0 (cons x s1) in
let s' = S.append s0 s1 in
let n = S.length s0 in
if j < n then S.index s' j == S.index s j else S.index s' ... | let split3_index (#a:eqtype) (s0:seq a) (x:a) (s1:seq a) (j:nat)
: Lemma
(requires j < S.length (S.append s0 s1))
(ensures (
let s = S.append s0 (cons x s1) in
let s' = S.append s0 s1 in
let n = S.length s0 in
if j < n then S.index s' j == S.index s j
else S.index s' j == S.index... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 11,
"end_line": 61,
"start_col": 0,
"start_line": 49
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | s0: FStar.Sequence.Base.seq a -> x: a -> s1: FStar.Sequence.Base.seq a -> j: Prims.nat
-> FStar.Pervasives.Lemma
(requires j < FStar.Sequence.Base.length (FStar.Sequence.Base.append s0 s1))
(ensures
(let s = FStar.Sequence.Base.append s0 (FStar.Sequence.Util.cons x s1) in
let s' = FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.eqtype",
"FStar.Sequence.Base.seq",
"Prims.nat",
"Prims.op_LessThan",
"Prims.bool",
"Prims.unit",
"FStar.Sequence.Base.length",
"FStar.Sequence.Base.append",
"Prims.b2t",
"Prims.squash",
"Prims.eq2",
"FStar.Sequence.Base.index",
"Prims.op_Addition",
"FStar.Sequence.Util.cons",
"Pr... | [] | false | false | true | false | false | let split3_index (#a: eqtype) (s0: seq a) (x: a) (s1: seq a) (j: nat)
: Lemma (requires j < S.length (S.append s0 s1))
(ensures
(let s = S.append s0 (cons x s1) in
let s' = S.append s0 s1 in
let n = S.length s0 in
if j < n then S.index s' j == S.index s j else S.index s' ... | let n = S.length (S.append s0 s1) in
if j < n then () | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_top_index_st | val bn_get_top_index_st : t: Hacl.Bignum.Definitions.limb_t -> len: Lib.IntTypes.size_t{0 < Lib.IntTypes.v len} -> Type0 | let bn_get_top_index_st (t:limb_t) (len:size_t{0 < v len}) =
b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
v r == S.bn_get_top_index (as_seq h0 b)) | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 102,
"start_col": 0,
"start_line": 97
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Lib.IntTypes.size_t{0 < Lib.IntTypes.v len} -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"FStar.Monotonic.HyperStack.mem",
"Lib.Buffer.live",
"Lib.Buffer.MUT",
"Prim... | [] | false | false | false | false | true | let bn_get_top_index_st (t: limb_t) (len: size_t{0 < v len}) =
| b: lbignum t len
-> Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\ v r == S.bn_get_top_index (as_seq h0 b)) | false | |
Hacl.Streaming.Poly1305_32.fst | Hacl.Streaming.Poly1305_32.mac | val mac: poly1305_mac_st M32 | val mac: poly1305_mac_st M32 | let mac = poly1305_poly1305_mac_higher #M32 True poly1305_finish poly1305_update poly1305_init | {
"file_name": "code/streaming/Hacl.Streaming.Poly1305_32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 94,
"end_line": 9,
"start_col": 0,
"start_line": 9
} | module Hacl.Streaming.Poly1305_32
open Hacl.Meta.Poly1305
open Hacl.Poly1305_32
friend Hacl.Meta.Poly1305 | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Hacl.Poly1305_32.fsti.checked",
"Hacl.Meta.Poly1305.fst.checked",
"Hacl.Meta.Poly1305.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.Streaming.Poly1305_32.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Poly1305_32",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Meta.Poly1305",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.Impl.Poly1305.poly1305_mac_st Hacl.Impl.Poly1305.Fields.M32 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Meta.Poly1305.poly1305_poly1305_mac_higher",
"Hacl.Impl.Poly1305.Fields.M32",
"Prims.l_True",
"Hacl.Poly1305_32.poly1305_finish",
"Hacl.Poly1305_32.poly1305_update",
"Hacl.Poly1305_32.poly1305_init"
] | [] | false | false | false | true | false | let mac =
| poly1305_poly1305_mac_higher #M32 True poly1305_finish poly1305_update poly1305_init | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.count_singleton_one | val count_singleton_one (#a: eqtype) (x: a) : Lemma (count x (singleton x) == 1) | val count_singleton_one (#a: eqtype) (x: a) : Lemma (count x (singleton x) == 1) | let count_singleton_one (#a:eqtype) (x:a)
: Lemma (count x (singleton x) == 1)
= reveal_opaque (`%count) (count #a) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 84,
"start_col": 0,
"start_line": 82
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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: a
-> FStar.Pervasives.Lemma
(ensures FStar.Sequence.Util.count x (FStar.Sequence.Base.singleton x) == 1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.eqtype",
"FStar.Pervasives.reveal_opaque",
"FStar.Sequence.Base.seq",
"Prims.nat",
"FStar.Sequence.Util.count",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"FStar.Sequence.Base.singleton",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let count_singleton_one (#a: eqtype) (x: a) : Lemma (count x (singleton x) == 1) =
| reveal_opaque (`%count) (count #a) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.count_singleton_zero | val count_singleton_zero (#a: eqtype) (x y: a) : Lemma (x =!= y ==> count x (singleton y) == 0) | val count_singleton_zero (#a: eqtype) (x y: a) : Lemma (x =!= y ==> count x (singleton y) == 0) | let count_singleton_zero (#a:eqtype) (x y:a)
: Lemma (x =!= y ==> count x (singleton y) == 0)
= reveal_opaque (`%count) (count #a) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 87,
"start_col": 0,
"start_line": 85
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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: a -> y: a
-> FStar.Pervasives.Lemma
(ensures ~(x == y) ==> FStar.Sequence.Util.count x (FStar.Sequence.Base.singleton y) == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.eqtype",
"FStar.Pervasives.reveal_opaque",
"FStar.Sequence.Base.seq",
"Prims.nat",
"FStar.Sequence.Util.count",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_imp",
"Prims.l_not",
"Prims.eq2",
"Prims.int",
"FStar.Sequence.Base.singleton",
"Prims.Nil",
"FStar.Pervasives.pat... | [] | true | false | true | false | false | let count_singleton_zero (#a: eqtype) (x y: a) : Lemma (x =!= y ==> count x (singleton y) == 0) =
| reveal_opaque (`%count) (count #a) | false |
Hacl.HPKE.Curve64_CP256_SHA256.fsti | Hacl.HPKE.Curve64_CP256_SHA256.vale_p | val vale_p : Prims.logical | let vale_p = Vale.X64.CPU_Features_s.(adx_enabled /\ bmi2_enabled) | {
"file_name": "code/hpke/Hacl.HPKE.Curve64_CP256_SHA256.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 13,
"start_col": 0,
"start_line": 13
} | module Hacl.HPKE.Curve64_CP256_SHA256
open Hacl.Impl.HPKE
module S = Spec.Agile.HPKE
module DH = Spec.Agile.DH
module AEAD = Spec.Agile.AEAD
module Hash = Spec.Agile.Hash
noextract unfold
let cs:S.ciphersuite = (DH.DH_Curve25519, Hash.SHA2_256, S.Seal AEAD.CHACHA20_POLY1305, Hash.SHA2_256) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.CPU_Features_s.fst.checked",
"Spec.Agile.HPKE.fsti.checked",
"Spec.Agile.Hash.fsti.checked",
"Spec.Agile.DH.fst.checked",
"Spec.Agile.AEAD.fsti.checked",
"prims.fst.checked",
"Hacl.Impl.HPKE.fsti.checked",
"FStar.Pervasives.Native.fs... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Spec.Agile.AEAD",
"short_module": "AEAD"
},
{
"abbrev": true,
"full_module": "Spec.Agile.DH",
"short_module": "DH"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_and",
"Prims.b2t",
"Vale.X64.CPU_Features_s.adx_enabled",
"Vale.X64.CPU_Features_s.bmi2_enabled"
] | [] | false | false | false | true | true | let vale_p =
| let open Vale.X64.CPU_Features_s in adx_enabled /\ bmi2_enabled | false | |
LowParse.SLow.Enum.fst | LowParse.SLow.Enum.serialize32_maybe_enum_key_gen | val serialize32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: ... | val serialize32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: ... | let serialize32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k' : parser_kind)
(t' : Type)
(p' : parser k' t')
(s' : serializer p')
(u1: unit { k == k' } )
(u15: unit { t' == maybe_enum_key e } )
(u2:... | {
"file_name": "src/lowparse/LowParse.SLow.Enum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 83,
"end_line": 190,
"start_col": 0,
"start_line": 172
} | module LowParse.SLow.Enum
include LowParse.Spec.Enum
include LowParse.SLow.Combinators
module L = FStar.List.Tot
module U32 = FStar.UInt32
(* Parser for enums *)
inline_for_extraction
let parse32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(p32: parser32 p)
(e: enum key re... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Enum.fst.checked",
"LowParse.SLow.Combinators.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.To... | [
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
s32: LowParse.SLow.Base.serializer32 s ->
e: LowParse.Spec.Enum.enum key repr ->
k': LowParse.Spec.Base.parser_kind ->
t': Type0 ->
p': LowParse.Spec.Base.parser k' t' ->
s': LowParse.Spec.Base.serializer p' ->
u1: Prims.unit{k == k'} ->
u15: Prims.unit{t' == LowParse.Spec.Enum.maybe_en... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.eqtype",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.serializer32",
"LowParse.Spec.Enum.enum",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Enum.maybe_enum_key",
"LowParse.Spec.Enum.parse_maybe_enum_key",
"LowParse.Spec.... | [] | false | false | false | false | false | let serialize32_maybe_enum_key_gen
(#k: parser_kind)
(#key #repr: eqtype)
(#p: parser k repr)
(#s: serializer p)
(s32: serializer32 s)
(e: enum key repr)
(k': parser_kind)
(t': Type)
(p': parser k' t')
(s': serializer p')
(u1: unit{k == k'})
(u15: ... | serialize32_maybe_enum_key_gen' s32
e
(serialize32_enum_key_gen s32 e _ _ _ (serialize_enum_key _ s e) () () () () f) | false |
Hacl.Spec.Bignum.fst | Hacl.Spec.Bignum.bn_sub_mask_lemma | val bn_sub_mask_lemma:
#t:limb_t
-> #len:size_nat
-> n:lbignum t len
-> a:lbignum t len -> Lemma
(requires bn_v a <= bn_v n)
(ensures bn_v (bn_sub_mask n a) == (if bn_v a = bn_v n then 0 else bn_v a)) | val bn_sub_mask_lemma:
#t:limb_t
-> #len:size_nat
-> n:lbignum t len
-> a:lbignum t len -> Lemma
(requires bn_v a <= bn_v n)
(ensures bn_v (bn_sub_mask n a) == (if bn_v a = bn_v n then 0 else bn_v a)) | let bn_sub_mask_lemma #t #len n a =
let mask = Lib.ByteSequence.seq_eq_mask n a len in
assert (n == a ==> v mask == v (ones t SEC));
assert (n =!= a ==> v mask == v (zeros t SEC));
let mod_mask = map (logand mask) n in
bn_mask_lemma n mask;
assert (n == a ==> bn_v mod_mask == bn_v n);
assert (n =!= a ==> ... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 180,
"start_col": 0,
"start_line": 165
} | module Hacl.Spec.Bignum
module Loops = Lib.LoopCombinators
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let bn_add1 #t #aLen a b1 =
Hacl.Spec.Bignum.Addition.bn_add1 a b1
let bn_add1_lemma #t #aLen a b1 =
Hacl.Spec.Bignum.Addition.bn_add1_lemma a b1
let bn_sub1 #t #aLen a b1 =
Hacl.Spec.Bignum.Addition... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Squaring.fst.checked",
"Hacl.Spec.Bignum.Multiplication.fst.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Spec.Bignum.Karatsuba.fst.c... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": ... | {
"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 | n: Hacl.Spec.Bignum.Definitions.lbignum t len -> a: Hacl.Spec.Bignum.Definitions.lbignum t len
-> FStar.Pervasives.Lemma
(requires Hacl.Spec.Bignum.Definitions.bn_v a <= Hacl.Spec.Bignum.Definitions.bn_v n)
(ensures
Hacl.Spec.Bignum.Definitions.bn_v (Hacl.Spec.Bignum.bn_sub_mask n a) ==
(m... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Base.carry",
"FStar.Classical.move_requires_2",
"Prims.eq2",
"Prims.nat",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Lib.Sequence.equal",
"Hacl.Spec.Bignum.Definitions.limb",
"Hac... | [] | false | false | true | false | false | let bn_sub_mask_lemma #t #len n a =
| let mask = Lib.ByteSequence.seq_eq_mask n a len in
assert (n == a ==> v mask == v (ones t SEC));
assert (n =!= a ==> v mask == v (zeros t SEC));
let mod_mask = map (logand mask) n in
bn_mask_lemma n mask;
assert (n == a ==> bn_v mod_mask == bn_v n);
assert (n =!= a ==> bn_v mod_mask == 0);
let c, res = Hacl.Spec.Bignum... | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.elim_lift_binrel | val elim_lift_binrel (#a:Type) (r:binrel a) (y:top) (x:a)
: Lemma
(requires lift_binrel r y (| a, x |))
(ensures dfst y == a /\ r (dsnd y) x) | val elim_lift_binrel (#a:Type) (r:binrel a) (y:top) (x:a)
: Lemma
(requires lift_binrel r y (| a, x |))
(ensures dfst y == a /\ r (dsnd y) x) | let elim_lift_binrel (#a:Type) (r:binrel a) (y:top) (x:a)
: Lemma
(requires lift_binrel r y (| a, x |))
(ensures dfst y == a /\ r (dsnd y) x)
= let s : squash (lift_binrel r y (| a, x |)) = FStar.Squash.get_proof (lift_binrel r y (| a, x |)) in
let s : squash (dfst y == a /\ r (dsnd y) x) = FStar.Squash... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 36,
"start_col": 0,
"start_line": 22
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | r: FStar.WellFounded.binrel a -> y: FStar.WellFounded.Util.top -> x: a
-> FStar.Pervasives.Lemma (requires FStar.WellFounded.Util.lift_binrel r y (| a, x |))
(ensures FStar.Pervasives.dfst y == a /\ r (FStar.Pervasives.dsnd y) x) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.Util.top",
"Prims.squash",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.dfst",
"FStar.Pervasives.dsnd",
"FStar.Squash.bind_squash",
"FStar.WellFounded.Util.lift_binrel",
"Prims.Mkdtuple2",
"FStar.Classical.Sugar.and_intro",
"Prims.unit",
"FStar... | [] | false | false | true | false | false | let elim_lift_binrel (#a: Type) (r: binrel a) (y: top) (x: a)
: Lemma (requires lift_binrel r y (| a, x |)) (ensures dfst y == a /\ r (dsnd y) x) =
| let s:squash (lift_binrel r y (| a, x |)) = FStar.Squash.get_proof (lift_binrel r y (| a, x |)) in
let s:squash (dfst y == a /\ r (dsnd y) x) =
FStar.Squash.bind_squash s
(fun (pf: lift_binrel r y (| a, x |)) ->
let p1:(dfst y == a /\ a == a) = dfst pf in
let p2:r (dsnd y) x = dsnd pf in
i... | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.equal_counts_empty | val equal_counts_empty (#a: eqtype) (s0 s1: seq a)
: Lemma (requires S.length s0 == 0 /\ (forall x. count x s0 == count x s1))
(ensures S.length s1 == 0) | val equal_counts_empty (#a: eqtype) (s0 s1: seq a)
: Lemma (requires S.length s0 == 0 /\ (forall x. count x s0 == count x s1))
(ensures S.length s1 == 0) | let equal_counts_empty (#a:eqtype) (s0 s1:seq a)
: Lemma
(requires S.length s0 == 0 /\ (forall x. count x s0 == count x s1))
(ensures S.length s1 == 0)
= reveal_opaque (`%count) (count #a);
if S.length s1 > 0 then
assert (count (head s1) s1 > 0) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 94,
"start_col": 0,
"start_line": 88
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | s0: FStar.Sequence.Base.seq a -> s1: FStar.Sequence.Base.seq a
-> FStar.Pervasives.Lemma
(requires
FStar.Sequence.Base.length s0 == 0 /\
(forall (x: a). FStar.Sequence.Util.count x s0 == FStar.Sequence.Util.count x s1))
(ensures FStar.Sequence.Base.length s1 == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.eqtype",
"FStar.Sequence.Base.seq",
"Prims.op_GreaterThan",
"FStar.Sequence.Base.length",
"Prims._assert",
"Prims.b2t",
"FStar.Sequence.Util.count",
"FStar.Sequence.Util.head",
"Prims.bool",
"Prims.unit",
"FStar.Pervasives.reveal_opaque",
"Prims.nat",
"Prims.l_and",
"Prims.eq2",
"... | [] | false | false | true | false | false | let equal_counts_empty (#a: eqtype) (s0 s1: seq a)
: Lemma (requires S.length s0 == 0 /\ (forall x. count x s0 == count x s1))
(ensures S.length s1 == 0) =
| reveal_opaque (`%count) (count #a);
if S.length s1 > 0 then assert (count (head s1) s1 > 0) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.find | val find (#a: eqtype) (x: a) (s: seq a {count x s > 0})
: Tot
(frags:
(seq a & seq a)
{ let s' = S.append (fst frags) (snd frags) in
let n = S.length (fst frags) in
s `S.equal` (S.append (fst frags) (cons x (snd frags))) }) (decreases (S.length s)) | val find (#a: eqtype) (x: a) (s: seq a {count x s > 0})
: Tot
(frags:
(seq a & seq a)
{ let s' = S.append (fst frags) (snd frags) in
let n = S.length (fst frags) in
s `S.equal` (S.append (fst frags) (cons x (snd frags))) }) (decreases (S.length s)) | let rec find (#a:eqtype) (x:a) (s:seq a{ count x s > 0 })
: Tot (frags:(seq a & seq a) {
let s' = S.append (fst frags) (snd frags) in
let n = S.length (fst frags) in
s `S.equal` S.append (fst frags) (cons x (snd frags))
}) (decreases (S.length s))
= reveal_opaque (`%count) (count #a);
if h... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 80,
"start_col": 0,
"start_line": 64
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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: a -> s: FStar.Sequence.Base.seq a {FStar.Sequence.Util.count x s > 0}
-> Prims.Tot
(frags:
(FStar.Sequence.Base.seq a * FStar.Sequence.Base.seq a)
{ let s' =
FStar.Sequence.Base.append (FStar.Pervasives.Native.fst frags)
(FStar.Pervasives.Native.snd frags)
in
... | Prims.Tot | [
"total",
""
] | [] | [
"Prims.eqtype",
"FStar.Sequence.Base.seq",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Sequence.Util.count",
"Prims.op_Equality",
"FStar.Sequence.Util.head",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Sequence.Base.empty",
"FStar.Sequence.Util.tail",
"Prims.bool",
"FStar.Sequence.Util.cons",
... | [
"recursion"
] | false | false | false | false | false | let rec find (#a: eqtype) (x: a) (s: seq a {count x s > 0})
: Tot
(frags:
(seq a & seq a)
{ let s' = S.append (fst frags) (snd frags) in
let n = S.length (fst frags) in
s `S.equal` (S.append (fst frags) (cons x (snd frags))) }) (decreases (S.length s)) =
| reveal_opaque (`%count) (count #a);
if head s = x
then S.empty, tail s
else
(let pfx, sfx = find x (tail s) in
assert (S.equal (tail s) (S.append pfx (cons x sfx)));
assert (S.equal s (cons (head s) (tail s)));
cons (head s) pfx, sfx) | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.cswap2_st | val cswap2_st:
#t:limb_t
-> len:size_t
-> bit:limb t
-> b1:lbignum t len
-> b2:lbignum t len ->
Stack unit
(requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2)
(ensures fun h0 _ h1 -> modifies (loc b1 |+| loc b2) h0 h1 /\
(as_seq h1 b1, as_seq h1 b2) == S.cswap2 bit (as_seq h0 b1) (as_seq... | val cswap2_st:
#t:limb_t
-> len:size_t
-> bit:limb t
-> b1:lbignum t len
-> b2:lbignum t len ->
Stack unit
(requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2)
(ensures fun h0 _ h1 -> modifies (loc b1 |+| loc b2) h0 h1 /\
(as_seq h1 b1, as_seq h1 b2) == S.cswap2 bit (as_seq h0 b1) (as_seq... | let cswap2_st #t len bit b1 b2 =
[@inline_let]
let mask = uint #t 0 -. bit in
[@inline_let]
let spec h0 = S.cswap2_f mask in
let h0 = ST.get () in
loop2 h0 len b1 b2 spec
(fun i ->
Loops.unfold_repeati (v len) (spec h0) (as_seq h0 b1, as_seq h0 b2) (v i);
let dummy = mask &. (b1.(i) ^. b2.(i)) in... | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 93,
"start_col": 0,
"start_line": 80
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 |
len: Lib.IntTypes.size_t ->
bit: Hacl.Bignum.Definitions.limb t ->
b1: Hacl.Bignum.Definitions.lbignum t len ->
b2: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.limb",
"Hacl.Bignum.Definitions.lbignum",
"Lib.Buffer.loop2",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.Buffer.op_Array_Assignment",
"Prims.unit",
"Lib.Int... | [] | false | true | false | false | false | let cswap2_st #t len bit b1 b2 =
| [@@ inline_let ]let mask = uint #t 0 -. bit in
[@@ inline_let ]let spec h0 = S.cswap2_f mask in
let h0 = ST.get () in
loop2 h0
len
b1
b2
spec
(fun i ->
Loops.unfold_repeati (v len) (spec h0) (as_seq h0 b1, as_seq h0 b2) (v i);
let dummy = mask &. (b1.(i) ^. b2.(i)) in
b1.(i) <- b1.(i) ^. dum... | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.count_head | val count_head (#a: eqtype) (x: seq a {S.length x > 0}) : Lemma (count (head x) x > 0) | val count_head (#a: eqtype) (x: seq a {S.length x > 0}) : Lemma (count (head x) x > 0) | let count_head (#a:eqtype) (x:seq a{ S.length x > 0 })
: Lemma (count (head x) x > 0)
= reveal_opaque (`%count) (count #a) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 97,
"start_col": 0,
"start_line": 95
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Sequence.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.Sequence.Base.seq a {FStar.Sequence.Base.length x > 0}
-> FStar.Pervasives.Lemma (ensures FStar.Sequence.Util.count (FStar.Sequence.Util.head x) x > 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.eqtype",
"FStar.Sequence.Base.seq",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Sequence.Base.length",
"FStar.Pervasives.reveal_opaque",
"Prims.nat",
"FStar.Sequence.Util.count",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.Sequence.Util.head",
"Prims.Nil",
"FStar.Pervasives... | [] | true | false | true | false | false | let count_head (#a: eqtype) (x: seq a {S.length x > 0}) : Lemma (count (head x) x > 0) =
| reveal_opaque (`%count) (count #a) | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_top_index | val bn_get_top_index: #t:_ -> len:_ -> bn_get_top_index_st t len | val bn_get_top_index: #t:_ -> len:_ -> bn_get_top_index_st t len | let bn_get_top_index #t =
match t with
| U32 -> bn_get_top_index_u32
| U64 -> bn_get_top_index_u64 | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 145,
"start_col": 0,
"start_line": 142
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 | len: Lib.IntTypes.size_t{0 < Lib.IntTypes.v len} -> Hacl.Bignum.Lib.bn_get_top_index_st t len | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Lib.bn_get_top_index_u32",
"Hacl.Bignum.Lib.bn_get_top_index_u64",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Lib.bn_get_top_index_st"
] | [] | false | false | false | false | false | let bn_get_top_index #t =
| match t with
| U32 -> bn_get_top_index_u32
| U64 -> bn_get_top_index_u64 | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.lift_binrel_well_founded | val lift_binrel_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded r)
: well_founded (lift_binrel r) | val lift_binrel_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded r)
: well_founded (lift_binrel r) | let lift_binrel_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded r)
: well_founded (lift_binrel r)
= let rec aux (y:top{dfst y == a})
(pf:acc r (dsnd y))
: Tot (acc (lift_binrel r) y)
(decreases pf)
... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 65,
"start_col": 0,
"start_line": 46
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | wf_r: FStar.WellFounded.well_founded r
-> FStar.WellFounded.well_founded (FStar.WellFounded.Util.lift_binrel r) | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.Util.top",
"FStar.Pervasives.dsnd",
"Prims.bool",
"FStar.WellFounded.acc",
"FStar.WellFounded.Util.lift_binrel",
"Prims.l_iff",
"Prims.b2t",
"Prims.op_Equality",
"Prims.eq2",
"FStar.Pervasives.dfst",
"FStar.Stro... | [] | false | false | false | false | false | let lift_binrel_well_founded (#a: Type u#a) (#r: binrel u#a u#r a) (wf_r: well_founded r)
: well_founded (lift_binrel r) =
| let rec aux (y: top{dfst y == a}) (pf: acc r (dsnd y)) : Tot (acc (lift_binrel r) y) (decreases pf)
=
AccIntro
(fun (z: top) (p: lift_binrel r z y) -> aux z (pf.access_smaller (dsnd z) (lower_binrel z y p)))
in
let aux' (y: top{dfst y =!= a}) : acc (lift_binrel r) y = AccIntro (fun y p -> false_elim ()) in
fun (x: ... | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.unsquash_well_founded | val unsquash_well_founded (#a:Type u#a) (r:binrel u#a u#r a) (wf_r:well_founded (squash_binrel r))
: well_founded u#a u#r r | val unsquash_well_founded (#a:Type u#a) (r:binrel u#a u#r a) (wf_r:well_founded (squash_binrel r))
: well_founded u#a u#r r | let unsquash_well_founded (#a:Type u#a) (r:binrel u#a u#r a) (wf_r:well_founded (squash_binrel r))
: well_founded u#a u#r r
= let rec f (x:a)
: Tot (acc r x)
(decreases {:well-founded (lift_binrel_squashed_as_well_founded_relation wf_r) (| a, x |)})
= AccIntro (let g_smaller (y: a) (u: r y x... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 121,
"start_col": 0,
"start_line": 111
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
r: FStar.WellFounded.binrel a ->
wf_r: FStar.WellFounded.well_founded (FStar.WellFounded.Util.squash_binrel r)
-> FStar.WellFounded.well_founded r | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.Util.squash_binrel",
"FStar.WellFounded.acc",
"FStar.WellFounded.Util.lift_binrel_squashed_as_well_founded_relation",
"Prims.Mkdtuple2",
"FStar.WellFounded.AccIntro",
"Prims.unit",
"FStar.WellFounded.Util.lift_binrel_sq... | [] | false | false | false | false | false | let unsquash_well_founded
(#a: Type u#a)
(r: binrel u#a u#r a)
(wf_r: well_founded (squash_binrel r))
: well_founded u#a u#r r =
| let rec f (x: a)
: Tot (acc r x)
(decreases {:well-founded (lift_binrel_squashed_as_well_founded_relation wf_r) (| a, x |) }) =
AccIntro
(let g_smaller (y: a) (u: r y x) : acc r y =
lift_binrel_squashed_intro wf_r y x (FStar.Squash.return_squash u);
f y
in
g_smaller)
in
f | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.elim_monoid_laws | val elim_monoid_laws (#a: _) (m: CM.cm a)
: Lemma
((forall x y. {:pattern m.mult x y} m.mult x y == m.mult y x) /\
(forall x y z. {:pattern (m.mult x (m.mult y z))}
m.mult x (m.mult y z) == m.mult (m.mult x y) z) /\
(forall x. {:pattern (m.mult x m.unit)} m.mult x m.unit == x)) | val elim_monoid_laws (#a: _) (m: CM.cm a)
: Lemma
((forall x y. {:pattern m.mult x y} m.mult x y == m.mult y x) /\
(forall x y z. {:pattern (m.mult x (m.mult y z))}
m.mult x (m.mult y z) == m.mult (m.mult x y) z) /\
(forall x. {:pattern (m.mult x m.unit)} m.mult x m.unit == x)) | let elim_monoid_laws #a (m:CM.cm a)
: Lemma (
(forall x y. {:pattern m.mult x y} m.mult x y == m.mult y x) /\
(forall x y z.{:pattern (m.mult x (m.mult y z))} m.mult x (m.mult y z) == m.mult (m.mult x y) z) /\
(forall x.{:pattern (m.mult x m.unit)} m.mult x m.unit == x)
)
= introd... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 215,
"start_col": 0,
"start_line": 202
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"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 | m: FStar.Algebra.CommMonoid.cm a
-> FStar.Pervasives.Lemma
(ensures
(forall (x: a) (y: a). {:pattern CM?.mult m x y} CM?.mult m x y == CM?.mult m y x) /\
(forall (x: a) (y: a) (z: a). {:pattern CM?.mult m x (CM?.mult m y z)}
CM?.mult m x (CM?.mult m y z) == CM?.mult m (CM?.mult m x y) z) /\
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Algebra.CommMonoid.cm",
"FStar.Classical.Sugar.forall_intro",
"Prims.eq2",
"FStar.Algebra.CommMonoid.__proj__CM__item__mult",
"FStar.Algebra.CommMonoid.__proj__CM__item__unit",
"FStar.Algebra.CommMonoid.__proj__CM__item__identity",
"Prims.squash",
"Prims.unit",
"Prims.l_Forall",
"FStar.Alge... | [] | false | false | true | false | false | let elim_monoid_laws #a (m: CM.cm a)
: Lemma
((forall x y. {:pattern m.mult x y} m.mult x y == m.mult y x) /\
(forall x y z. {:pattern (m.mult x (m.mult y z))}
m.mult x (m.mult y z) == m.mult (m.mult x y) z) /\
(forall x. {:pattern (m.mult x m.unit)} m.mult x m.unit == x)) =
| introduce forall x y . m.mult x y == m.mult y x
with (m.commutativity x y);
introduce forall x y z . m.mult x (m.mult y z) == m.mult (m.mult x y) z
with (m.associativity x y z);
introduce forall x . m.mult x m.unit == x
with (m.identity x) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.foldm_back_sym | val foldm_back_sym (#a:Type) (m:CM.cm a) (s1 s2: seq a)
: Lemma
(ensures foldm_back m (append s1 s2) == foldm_back m (append s2 s1)) | val foldm_back_sym (#a:Type) (m:CM.cm a) (s1 s2: seq a)
: Lemma
(ensures foldm_back m (append s1 s2) == foldm_back m (append s2 s1)) | let foldm_back_sym #a (m:CM.cm a) (s1 s2: seq a)
: Lemma
(ensures foldm_back m (append s1 s2) == foldm_back m (append s2 s1))
= elim_monoid_laws m;
foldm_back_append m s1 s2;
foldm_back_append m s2 s1 | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 253,
"start_col": 0,
"start_line": 248
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 | m: FStar.Algebra.CommMonoid.cm a -> s1: FStar.Sequence.Base.seq a -> s2: FStar.Sequence.Base.seq a
-> FStar.Pervasives.Lemma
(ensures
FStar.Sequence.Permutation.foldm_back m (FStar.Sequence.Base.append s1 s2) ==
FStar.Sequence.Permutation.foldm_back m (FStar.Sequence.Base.append s2 s1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Algebra.CommMonoid.cm",
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.foldm_back_append",
"Prims.unit",
"FStar.Sequence.Permutation.elim_monoid_laws",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Sequence.Permutation.foldm_back",
"FStar.Sequence.Base.append",
"Prims.Nil",
... | [] | true | false | true | false | false | let foldm_back_sym #a (m: CM.cm a) (s1: seq a) (s2: seq a)
: Lemma (ensures foldm_back m (append s1 s2) == foldm_back m (append s2 s1)) =
| elim_monoid_laws m;
foldm_back_append m s1 s2;
foldm_back_append m s2 s1 | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.intro_lift_binrel | val intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |)) | val intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |)) | let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (| a, x |) in
let pf1 : squash (dfst t0 == a /\ dfst t1 == a) = () in
let pf2 : squash (r (dsnd t0) (dsnd t1)) = () in
... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 20,
"start_col": 0,
"start_line": 6
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | r: FStar.WellFounded.binrel a -> y: a -> x: a
-> FStar.Pervasives.Lemma (requires r y x)
(ensures FStar.WellFounded.Util.lift_binrel r (| a, y |) (| a, x |)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.WellFounded.binrel",
"Prims.squash",
"FStar.WellFounded.Util.lift_binrel",
"FStar.Squash.bind_squash",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.dfst",
"FStar.Pervasives.dsnd",
"FStar.Squash.return_squash",
"Prims.Mkdtuple2",
"FStar.WellFounded.Util.top",
"Prims.unit",
"Prims.Nil"... | [] | false | false | true | false | false | let intro_lift_binrel (#a: Type) (r: binrel a) (y x: a)
: Lemma (requires r y x) (ensures lift_binrel r (| a, y |) (| a, x |)) =
| let t0:top = (| a, y |) in
let t1:top = (| a, x |) in
let pf1:squash (dfst t0 == a /\ dfst t1 == a) = () in
let pf2:squash (r (dsnd t0) (dsnd t1)) = () in
let pf:squash (lift_binrel r t0 t1) =
FStar.Squash.bind_squash pf1
(fun (pf1: (dfst t0 == a /\ dfst t1 == a)) ->
FStar.Squash.bind_squash pf2
... | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.remove_i | val remove_i (#a: _) (s: seq a) (i: nat{i < S.length s}) : a & seq a | val remove_i (#a: _) (s: seq a) (i: nat{i < S.length s}) : a & seq a | let remove_i #a (s:seq a) (i:nat{i < S.length s})
: a & seq a
= let s0, s1 = split s i in
head s1, append s0 (tail s1) | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 32,
"end_line": 285,
"start_col": 0,
"start_line": 282
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 | s: FStar.Sequence.Base.seq a -> i: Prims.nat{i < FStar.Sequence.Base.length s}
-> a * FStar.Sequence.Base.seq a | Prims.Tot | [
"total"
] | [] | [
"FStar.Sequence.Base.seq",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Sequence.Base.length",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Sequence.Util.head",
"FStar.Sequence.Base.append",
"FStar.Sequence.Util.tail",
"FStar.Pervasives.Native.tuple2",
"FStar.Sequence.Util.split"
] | [] | false | false | false | false | false | let remove_i #a (s: seq a) (i: nat{i < S.length s}) : a & seq a =
| let s0, s1 = split s i in
head s1, append s0 (tail s1) | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_ith_bit | val bn_get_ith_bit:
#t:limb_t
-> len:size_t
-> b:lbignum t len
-> i:size_t{v i / bits t < v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> h0 == h1 /\
r == S.bn_get_ith_bit (as_seq h0 b) (v i)) | val bn_get_ith_bit:
#t:limb_t
-> len:size_t
-> b:lbignum t len
-> i:size_t{v i / bits t < v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> h0 == h1 /\
r == S.bn_get_ith_bit (as_seq h0 b) (v i)) | let bn_get_ith_bit #t len input ind =
[@inline_let]
let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
let tmp = input.(i) in
(tmp >>. j) &. uint #t 1 | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 44,
"start_col": 0,
"start_line": 36
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 |
len: Lib.IntTypes.size_t ->
b: Hacl.Bignum.Definitions.lbignum t len ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i / Lib.IntTypes.bits t < Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.bits",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Gr... | [] | false | true | false | false | false | let bn_get_ith_bit #t len input ind =
| [@@ inline_let ]let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
let tmp = input.(i) in
(tmp >>. j) &. uint #t 1 | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.lower_binrel | val lower_binrel (#a:Type)
(#r:binrel a)
(x y:top)
(p:lift_binrel r x y)
: r (dsnd x) (dsnd y) | val lower_binrel (#a:Type)
(#r:binrel a)
(x y:top)
(p:lift_binrel r x y)
: r (dsnd x) (dsnd y) | let lower_binrel (#a:Type)
(#r:binrel a)
(x y:top)
(p:lift_binrel r x y)
: r (dsnd x) (dsnd y)
= dsnd p | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 43,
"start_col": 0,
"start_line": 38
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.WellFounded.Util.top ->
y: FStar.WellFounded.Util.top ->
p: FStar.WellFounded.Util.lift_binrel r x y
-> r (FStar.Pervasives.dsnd x) (FStar.Pervasives.dsnd y) | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.Util.top",
"FStar.WellFounded.Util.lift_binrel",
"FStar.Pervasives.dsnd",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.dfst"
] | [] | false | false | false | false | false | let lower_binrel (#a: Type) (#r: binrel a) (x y: top) (p: lift_binrel r x y) : r (dsnd x) (dsnd y) =
| dsnd p | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.seqperm_len | val seqperm_len (#a: _) (s0 s1: seq a) (p: seqperm s0 s1)
: Lemma (ensures S.length s0 == S.length s1) | val seqperm_len (#a: _) (s0 s1: seq a) (p: seqperm s0 s1)
: Lemma (ensures S.length s0 == S.length s1) | let seqperm_len #a (s0 s1:seq a)
(p:seqperm s0 s1)
: Lemma
(ensures S.length s0 == S.length s1)
= reveal_is_permutation s0 s1 p | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 321,
"start_col": 0,
"start_line": 317
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
p: FStar.Sequence.Permutation.seqperm s0 s1
-> FStar.Pervasives.Lemma (ensures FStar.Sequence.Base.length s0 == FStar.Sequence.Base.length s1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.seqperm",
"FStar.Sequence.Permutation.reveal_is_permutation",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.nat",
"FStar.Sequence.Base.length",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let seqperm_len #a (s0: seq a) (s1: seq a) (p: seqperm s0 s1)
: Lemma (ensures S.length s0 == S.length s1) =
| reveal_is_permutation s0 s1 p | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.lower_binrel_squashed | val lower_binrel_squashed (#a:Type u#a)
(#r:binrel u#a u#r a)
(x y:top u#a)
(p:lift_binrel_squashed r x y)
: squash (r (dsnd x) (dsnd y)) | val lower_binrel_squashed (#a:Type u#a)
(#r:binrel u#a u#r a)
(x y:top u#a)
(p:lift_binrel_squashed r x y)
: squash (r (dsnd x) (dsnd y)) | let lower_binrel_squashed (#a:Type u#a)
(#r:binrel u#a u#r a)
(x y:top u#a)
(p:lift_binrel_squashed r x y)
: squash (r (dsnd x) (dsnd y))
= assert (dfst x==a /\ dfst y==a /\ squash (r (dsnd x) (dsnd y)))
by FStar.Tactics.(exact (q... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 71,
"end_line": 73,
"start_col": 0,
"start_line": 67
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.WellFounded.Util.top ->
y: FStar.WellFounded.Util.top ->
p: FStar.WellFounded.Util.lift_binrel_squashed r x y
-> Prims.squash (r (FStar.Pervasives.dsnd x) (FStar.Pervasives.dsnd y)) | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.Util.top",
"FStar.WellFounded.Util.lift_binrel_squashed",
"FStar.Tactics.Effect.assert_by_tactic",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.dfst",
"Prims.squash",
"FStar.Pervasives.dsnd",
"Prims.unit",
"FStar.Tactics.V1.Derived.exact",
"FStar... | [] | false | false | true | false | false | let lower_binrel_squashed
(#a: Type u#a)
(#r: binrel u#a u#r a)
(x y: top u#a)
(p: lift_binrel_squashed r x y)
: squash (r (dsnd x) (dsnd y)) =
| FStar.Tactics.Effect.assert_by_tactic (dfst x == a /\ dfst y == a /\ squash (r (dsnd x) (dsnd y)))
(fun _ ->
();
let open FStar.Tactics in exact (quote (FStar.Squash.return_squash p))) | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.lift_binrel_squashed_well_founded | val lift_binrel_squashed_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded (squash_binrel r))
: well_founded (lift_binrel_squashed r) | val lift_binrel_squashed_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded (squash_binrel r))
: well_founded (lift_binrel_squashed r) | let lift_binrel_squashed_well_founded (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded (squash_binrel r))
: well_founded (lift_binrel_squashed r)
= let rec aux (y:top{dfst y == a})
(pf:acc (squash_binrel r) (dsnd y))
... | {
"file_name": "ulib/FStar.WellFounded.Util.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": 76
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | wf_r: FStar.WellFounded.well_founded (FStar.WellFounded.Util.squash_binrel r)
-> FStar.WellFounded.well_founded (FStar.WellFounded.Util.lift_binrel_squashed r) | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.Util.squash_binrel",
"FStar.WellFounded.Util.top",
"FStar.Pervasives.dsnd",
"Prims.bool",
"FStar.WellFounded.acc",
"FStar.WellFounded.Util.lift_binrel_squashed",
"Prims.l_iff",
"Prims.b2t",
"Prims.op_Equality",
"P... | [] | false | false | false | false | false | let lift_binrel_squashed_well_founded
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded (squash_binrel r))
: well_founded (lift_binrel_squashed r) =
| let rec aux (y: top{dfst y == a}) (pf: acc (squash_binrel r) (dsnd y))
: Tot (acc (lift_binrel_squashed r) y) (decreases pf) =
AccIntro
(fun (z: top) (p: lift_binrel_squashed r z y) ->
let p = lower_binrel_squashed z y p in
aux z (pf.access_smaller (dsnd z) (FStar.Squash.join_squash p)))
in
let aux'... | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.foldm_back_singleton | val foldm_back_singleton (#a: _) (m: CM.cm a) (x: a) : Lemma (foldm_back m (singleton x) == x) | val foldm_back_singleton (#a: _) (m: CM.cm a) (x: a) : Lemma (foldm_back m (singleton x) == x) | let foldm_back_singleton (#a:_) (m:CM.cm a) (x:a)
: Lemma (foldm_back m (singleton x) == x)
= elim_monoid_laws m | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 258,
"start_col": 0,
"start_line": 256
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 2,
"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 | m: FStar.Algebra.CommMonoid.cm a -> x: a
-> FStar.Pervasives.Lemma
(ensures FStar.Sequence.Permutation.foldm_back m (FStar.Sequence.Base.singleton x) == x) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Algebra.CommMonoid.cm",
"FStar.Sequence.Permutation.elim_monoid_laws",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Sequence.Permutation.foldm_back",
"FStar.Sequence.Base.singleton",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let foldm_back_singleton (#a: _) (m: CM.cm a) (x: a) : Lemma (foldm_back m (singleton x) == x) =
| elim_monoid_laws m | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.foldm_back3 | val foldm_back3 (#a: _) (m: CM.cm a) (s1: seq a) (x: a) (s2: seq a)
: Lemma (foldm_back m (S.append s1 (cons x s2)) == m.mult x (foldm_back m (S.append s1 s2))) | val foldm_back3 (#a: _) (m: CM.cm a) (s1: seq a) (x: a) (s2: seq a)
: Lemma (foldm_back m (S.append s1 (cons x s2)) == m.mult x (foldm_back m (S.append s1 s2))) | let foldm_back3 #a (m:CM.cm a) (s1:seq a) (x:a) (s2:seq a)
: Lemma (foldm_back m (S.append s1 (cons x s2)) ==
m.mult x (foldm_back m (S.append s1 s2)))
= calc (==)
{
foldm_back m (S.append s1 (cons x s2));
(==) { foldm_back_append m s1 (cons x s2) }
m.mult (foldm_back m s1) (foldm_b... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 278,
"start_col": 0,
"start_line": 262
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"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 |
m: FStar.Algebra.CommMonoid.cm a ->
s1: FStar.Sequence.Base.seq a ->
x: a ->
s2: FStar.Sequence.Base.seq a
-> FStar.Pervasives.Lemma
(ensures
FStar.Sequence.Permutation.foldm_back m
(FStar.Sequence.Base.append s1 (FStar.Sequence.Util.cons x s2)) ==
CM?.mult m x (FStar.Sequence... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Algebra.CommMonoid.cm",
"FStar.Sequence.Base.seq",
"FStar.Calc.calc_finish",
"Prims.eq2",
"FStar.Sequence.Permutation.foldm_back",
"FStar.Sequence.Base.append",
"FStar.Sequence.Util.cons",
"FStar.Algebra.CommMonoid.__proj__CM__item__mult",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.N... | [] | false | false | true | false | false | let foldm_back3 #a (m: CM.cm a) (s1: seq a) (x: a) (s2: seq a)
: Lemma (foldm_back m (S.append s1 (cons x s2)) == m.mult x (foldm_back m (S.append s1 s2))) =
| calc ( == ) {
foldm_back m (S.append s1 (cons x s2));
( == ) { foldm_back_append m s1 (cons x s2) }
m.mult (foldm_back m s1) (foldm_back m (cons x s2));
( == ) { foldm_back_append m (singleton x) s2 }
m.mult (foldm_back m s1) (m.mult (foldm_back m (singleton x)) (foldm_back m s2));
( == ) { foldm_back_singl... | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_bits | val bn_get_bits: #t:_ -> bn_get_bits_st t | val bn_get_bits: #t:_ -> bn_get_bits_st t | let bn_get_bits #t =
match t with
| U32 -> bn_get_bits_u32
| U64 -> bn_get_bits_u64 | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 202,
"start_col": 0,
"start_line": 199
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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.Lib.bn_get_bits_st t | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Lib.bn_get_bits_u32",
"Hacl.Bignum.Lib.bn_get_bits_u64",
"Hacl.Bignum.Lib.bn_get_bits_st"
] | [] | false | false | false | false | false | let bn_get_bits #t =
| match t with
| U32 -> bn_get_bits_u32
| U64 -> bn_get_bits_u64 | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.mk_bn_get_bits | val mk_bn_get_bits: #t:limb_t -> bn_get_bits_st t | val mk_bn_get_bits: #t:limb_t -> bn_get_bits_st t | let mk_bn_get_bits #t len b i l =
[@inline_let] let mask_l = (uint #t #SEC 1 <<. l) -. uint #t 1 in
bn_get_bits_limb len b i &. mask_l | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 189,
"start_col": 0,
"start_line": 187
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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.Lib.bn_get_bits_st t | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.bits",
"Prims.op_Division",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"H... | [] | false | false | false | false | false | let mk_bn_get_bits #t len b i l =
| [@@ inline_let ]let mask_l = (uint #t #SEC 1 <<. l) -. uint #t 1 in
bn_get_bits_limb len b i &. mask_l | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.shift_perm' | val shift_perm':
#a: _ ->
s0: seq a ->
s1: seq a ->
squash (S.length s0 == S.length s1 /\ S.length s0 > 0) ->
p: seqperm s0 s1
-> Tot (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1))))) | val shift_perm':
#a: _ ->
s0: seq a ->
s1: seq a ->
squash (S.length s0 == S.length s1 /\ S.length s0 > 0) ->
p: seqperm s0 s1
-> Tot (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1))))) | let shift_perm' #a
(s0 s1:seq a)
(_:squash (S.length s0 == S.length s1 /\ S.length s0 > 0))
(p:seqperm s0 s1)
: Tot (seqperm (fst (un_build s0))
(snd (remove_i s1 (p (S.length s0 - 1)))))
= reveal_is_permutation s0 s1 p;
let s0', last = un_build s0 i... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 302,
"start_col": 0,
"start_line": 287
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
_:
Prims.squash (FStar.Sequence.Base.length s0 == FStar.Sequence.Base.length s1 /\
FStar.Sequence.Base.length s0 > 0) ->
p: FStar.Sequence.Permutation.seqperm s0 s1
-> FStar.Sequence.Permutation.seqperm (FStar.Pervasive... | Prims.Tot | [
"total"
] | [] | [
"FStar.Sequence.Base.seq",
"Prims.squash",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"FStar.Sequence.Base.length",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Sequence.Permutation.seqperm",
"Prims.unit",
"FStar.Sequence.Permutation.reveal_is_permutation_nopats",
"FStar.Pervasives.Native.fst",
... | [] | false | false | false | false | false | let shift_perm'
#a
(s0: seq a)
(s1: seq a)
(_: squash (S.length s0 == S.length s1 /\ S.length s0 > 0))
(p: seqperm s0 s1)
: Tot (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1))))) =
| reveal_is_permutation s0 s1 p;
let s0', last = un_build s0 in
let n = S.length s0' in
let p' (i: nat{i < n}) : j: nat{j < n} = if p i < p n then p i else p i - 1 in
let _, s1' = remove_i s1 (p n) in
reveal_is_permutation_nopats s0' s1' p';
p' | false |
FStar.WellFounded.Util.fst | FStar.WellFounded.Util.lift_binrel_squashed_intro | val lift_binrel_squashed_intro (#a:Type)
(#r:binrel a)
(wf_r:well_founded (squash_binrel r))
(x y:a)
(sqr:squash (r x y))
: Lemma
(ensures lift_binrel_squashed r (|a, x|) (|a, y|)) | val lift_binrel_squashed_intro (#a:Type)
(#r:binrel a)
(wf_r:well_founded (squash_binrel r))
(x y:a)
(sqr:squash (r x y))
: Lemma
(ensures lift_binrel_squashed r (|a, x|) (|a, y|)) | let lift_binrel_squashed_intro (#a:Type) (#r:binrel a)
(wf_r:well_founded (squash_binrel r))
(x y:a)
(sqr:squash (r x y))
: Lemma
(ensures lift_binrel_squashed r (|a, x|) (|a, y|))
= assert (lift_binrel_squashed r (| a,... | {
"file_name": "ulib/FStar.WellFounded.Util.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 12,
"end_line": 109,
"start_col": 0,
"start_line": 98
} | module FStar.WellFounded.Util
open FStar.WellFounded
#push-options "--warn_error -242" //inner let recs not encoded to SMT; ok
let intro_lift_binrel (#a:Type) (r:binrel a) (y:a) (x:a)
: Lemma
(requires r y x)
(ensures lift_binrel r (| a, y |) (| a, x |))
= let t0 : top = (| a, y |) in
let t1 : top = (... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Squash.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Su... | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 |
wf_r: FStar.WellFounded.well_founded (FStar.WellFounded.Util.squash_binrel r) ->
x: a ->
y: a ->
sqr: Prims.squash (r x y)
-> FStar.Pervasives.Lemma
(ensures FStar.WellFounded.Util.lift_binrel_squashed r (| a, x |) (| a, y |)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.Util.squash_binrel",
"Prims.squash",
"FStar.Tactics.Effect.assert_by_tactic",
"FStar.WellFounded.Util.lift_binrel_squashed",
"Prims.Mkdtuple2",
"Prims.unit",
"FStar.Tactics.V1.Derived.mapply",
"FStar.Tactics.V1.Derive... | [] | false | false | true | false | false | let lift_binrel_squashed_intro
(#a: Type)
(#r: binrel a)
(wf_r: well_founded (squash_binrel r))
(x y: a)
(sqr: squash (r x y))
: Lemma (ensures lift_binrel_squashed r (| a, x |) (| a, y |)) =
| FStar.Tactics.Effect.assert_by_tactic (lift_binrel_squashed r (| a, x |) (| a, y |))
(fun _ ->
();
let open FStar.Tactics in
norm [delta_only [`%lift_binrel_squashed]];
split ();
split ();
trefl ();
trefl ();
mapply (`FStar.Squash.join_squash)) | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.shift_perm | val shift_perm:
#a: _ ->
s0: seq a ->
s1: seq a ->
squash (S.length s0 == S.length s1 /\ S.length s0 > 0) ->
p: seqperm s0 s1
-> Pure (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1)))))
(requires True)
(ensures
fun _ ->
let n = S.length s0 - 1 in
... | val shift_perm:
#a: _ ->
s0: seq a ->
s1: seq a ->
squash (S.length s0 == S.length s1 /\ S.length s0 > 0) ->
p: seqperm s0 s1
-> Pure (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1)))))
(requires True)
(ensures
fun _ ->
let n = S.length s0 - 1 in
... | let shift_perm #a
(s0 s1:seq a)
(_:squash (S.length s0 == S.length s1 /\ S.length s0 > 0))
(p:seqperm s0 s1)
: Pure (seqperm (fst (un_build s0))
(snd (remove_i s1 (p (S.length s0 - 1)))))
(requires True)
(ensures fun _ -> let n = S.lengt... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 26,
"end_line": 315,
"start_col": 0,
"start_line": 304
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 |
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
_:
Prims.squash (FStar.Sequence.Base.length s0 == FStar.Sequence.Base.length s1 /\
FStar.Sequence.Base.length s0 > 0) ->
p: FStar.Sequence.Permutation.seqperm s0 s1
-> Prims.Pure
(FStar.Sequence.Permutation.seqperm ... | Prims.Pure | [] | [] | [
"FStar.Sequence.Base.seq",
"Prims.squash",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"FStar.Sequence.Base.length",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Sequence.Permutation.seqperm",
"FStar.Sequence.Permutation.shift_perm'",
"Prims.unit",
"FStar.Sequence.Permutation.reveal_is_permutation... | [] | false | false | false | false | false | let shift_perm
#a
(s0: seq a)
(s1: seq a)
(_: squash (S.length s0 == S.length s1 /\ S.length s0 > 0))
(p: seqperm s0 s1)
: Pure (seqperm (fst (un_build s0)) (snd (remove_i s1 (p (S.length s0 - 1)))))
(requires True)
(ensures
fun _ ->
let n = S.length s0 - ... | reveal_is_permutation s0 s1 p;
shift_perm' s0 s1 () p | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.mk_bn_get_top_index | val mk_bn_get_top_index: #t:limb_t -> len:size_t{0 < v len} -> bn_get_top_index_st t len | val mk_bn_get_top_index: #t:limb_t -> len:size_t{0 < v len} -> bn_get_top_index_st t len | let mk_bn_get_top_index #t len b =
push_frame ();
let priv = create 1ul (uint #t 0) in
let h0 = ST.get () in
[@ inline_let]
let refl h i = v (LSeq.index (as_seq h priv) 0) in
[@ inline_let]
let spec h0 = S.bn_get_top_index_f (as_seq h0 b) in
[@ inline_let]
let inv h (i:nat{i <= v len}) =
modifie... | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 133,
"start_col": 0,
"start_line": 107
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 | len: Lib.IntTypes.size_t{0 < Lib.IntTypes.v len} -> Hacl.Bignum.Lib.bn_get_top_index_st t len | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.IntTypes.int_t",
"Lib.In... | [] | false | false | false | false | false | let mk_bn_get_top_index #t len b =
| push_frame ();
let priv = create 1ul (uint #t 0) in
let h0 = ST.get () in
[@@ inline_let ]let refl h i = v (LSeq.index (as_seq h priv) 0) in
[@@ inline_let ]let spec h0 = S.bn_get_top_index_f (as_seq h0 b) in
[@@ inline_let ]let inv h (i: nat{i <= v len}) =
modifies1 priv h0 h /\ live h priv /\ live h b /\ disjoint p... | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_set_ith_bit | val bn_set_ith_bit:
#t:limb_t
-> len:size_t
-> b:lbignum t len
-> i:size_t{v i / bits t < v len} ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == S.bn_set_ith_bit (as_seq h0 b) (v i)) | val bn_set_ith_bit:
#t:limb_t
-> len:size_t
-> b:lbignum t len
-> i:size_t{v i / bits t < v len} ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == S.bn_set_ith_bit (as_seq h0 b) (v i)) | let bn_set_ith_bit #t len input ind =
[@inline_let]
let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
input.(i) <- input.(i) |. (uint #t 1 <<. j) | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 65,
"start_col": 0,
"start_line": 58
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 |
len: Lib.IntTypes.size_t ->
b: Hacl.Bignum.Definitions.lbignum t len ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i / Lib.IntTypes.bits t < Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.bits",
"Lib.Buffer.op_Array_Assignment",
"Hacl.Bignum.Definitions.limb",
... | [] | false | true | false | false | false | let bn_set_ith_bit #t len input ind =
| [@@ inline_let ]let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
input.(i) <- input.(i) |. (uint #t 1 <<. j) | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if3 | val test_if3 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) | val test_if3 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) | let test_if3 (b:bool) (r:ref) : SteelT unit (ptr r) (fun _ -> ptr r)
= if b then noop () else noop () | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 34,
"end_line": 119,
"start_col": 0,
"start_line": 118
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b: Prims.bool -> r: SteelFramingTestSuite.ref -> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"SteelFramingTestSuite.ref",
"Steel.Effect.Atomic.noop",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Prims.unit",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if3 (b: bool) (r: ref) : SteelT unit (ptr r) (fun _ -> ptr r) =
| if b then noop () else noop () | false |
Lib.NatMod.fst | Lib.NatMod.pow_mod | val pow_mod: #m:pos{1 < m} -> a:nat_mod m -> b:nat -> nat_mod m | val pow_mod: #m:pos{1 < m} -> a:nat_mod m -> b:nat -> nat_mod m | let pow_mod #m a b = pow_mod_ #m a b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 122,
"start_col": 0,
"start_line": 122
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Prims.nat -> Lib.NatMod.nat_mod m | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.NatMod.nat_mod",
"Prims.nat",
"Lib.NatMod.pow_mod_"
] | [] | false | false | false | false | false | let pow_mod #m a b =
| pow_mod_ #m a b | false |
FStar.Sequence.Permutation.fst | FStar.Sequence.Permutation.foldm_back_perm | val foldm_back_perm (#a:_)
(m:CM.cm a)
(s0:seq a)
(s1:seq a)
(p:seqperm s0 s1)
: Lemma
(ensures foldm_back m s0 == foldm_back m s1) | val foldm_back_perm (#a:_)
(m:CM.cm a)
(s0:seq a)
(s1:seq a)
(p:seqperm s0 s1)
: Lemma
(ensures foldm_back m s0 == foldm_back m s1) | let rec foldm_back_perm #a m s0 s1 p
: Lemma
(ensures foldm_back m s0 == foldm_back m s1)
(decreases (S.length s0))
= seqperm_len s0 s1 p;
if S.length s0 = 0 then (
assert (S.equal s0 s1)
)
else (
let n0 = S.length s0 - 1 in
let prefix, last = un_build s0 in
let prefix',... | {
"file_name": "ulib/experimental/FStar.Sequence.Permutation.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 354,
"start_col": 0,
"start_line": 323
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Sequence.Util.fst.checked",
"FStar.Sequence.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Calc.fsti.checked",
"FStar.Algebra.CommM... | [
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Algebra.CommMonoid",
"short_module": "CM"
},
{
"abbrev": true,
"full_module": "FStar.Sequence",
"short_module": "S"
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 |
m: FStar.Algebra.CommMonoid.cm a ->
s0: FStar.Sequence.Base.seq a ->
s1: FStar.Sequence.Base.seq a ->
p: FStar.Sequence.Permutation.seqperm s0 s1
-> FStar.Pervasives.Lemma
(ensures
FStar.Sequence.Permutation.foldm_back m s0 == FStar.Sequence.Permutation.foldm_back m s1)
(decreases... | FStar.Pervasives.Lemma | [
"",
"lemma"
] | [] | [
"FStar.Algebra.CommMonoid.cm",
"FStar.Sequence.Base.seq",
"FStar.Sequence.Permutation.seqperm",
"Prims.op_Equality",
"Prims.int",
"FStar.Sequence.Base.length",
"Prims._assert",
"FStar.Sequence.Base.equal",
"Prims.bool",
"FStar.Calc.calc_finish",
"Prims.eq2",
"FStar.Sequence.Permutation.foldm_b... | [
"recursion"
] | false | false | true | false | false | let rec foldm_back_perm #a m s0 s1 p
: Lemma (ensures foldm_back m s0 == foldm_back m s1) (decreases (S.length s0)) =
| seqperm_len s0 s1 p;
if S.length s0 = 0
then (assert (S.equal s0 s1))
else
(let n0 = S.length s0 - 1 in
let prefix, last = un_build s0 in
let prefix', suffix' = split s1 (p n0) in
let last', suffix' = suffix' $@ 0, drop suffix' 1 in
let s1' = snd (remove_i s1 (p n0)) in
let p':seqperm prefix s1' =... | false |
Hacl.Bignum.Lib.fst | Hacl.Bignum.Lib.bn_get_bits_limb | val bn_get_bits_limb:
#t:limb_t
-> len:size_t
-> n:lbignum t len
-> ind:size_t{v ind / bits t < v len} ->
Stack (limb t)
(requires fun h -> live h n)
(ensures fun h0 r h1 -> h0 == h1 /\
r == S.bn_get_bits_limb (as_seq h0 n) (v ind)) | val bn_get_bits_limb:
#t:limb_t
-> len:size_t
-> n:lbignum t len
-> ind:size_t{v ind / bits t < v len} ->
Stack (limb t)
(requires fun h -> live h n)
(ensures fun h0 r h1 -> h0 == h1 /\
r == S.bn_get_bits_limb (as_seq h0 n) (v ind)) | let bn_get_bits_limb #t len n ind =
[@inline_let]
let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
let p1 = n.(i) >>. j in
if i +! 1ul <. len && 0ul <. j then
p1 |. (n.(i +! 1ul) <<. (pbits -! j))
else
... | {
"file_name": "code/bignum/Hacl.Bignum.Lib.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 170,
"start_col": 0,
"start_line": 159
} | module Hacl.Bignum.Lib
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
module S = Hacl.Spec.Bignum.Lib
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
#set-options "--z3... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Lib.fst.checked",
"Hacl.Bignum.Definitions.fst.checked",
... | [
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"ful... | {
"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 |
len: Lib.IntTypes.size_t ->
n: Hacl.Bignum.Definitions.lbignum t len ->
ind: Lib.IntTypes.size_t{Lib.IntTypes.v ind / Lib.IntTypes.bits t < Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.bits",
"Prims.op_AmpAmp",
"Lib.IntTypes.op_Less_Dot",
"Lib.IntTypes.op_Pl... | [] | false | true | false | false | false | let bn_get_bits_limb #t len n ind =
| [@@ inline_let ]let pbits = size (bits t) in
let i = ind /. pbits in
assert (v i == v ind / bits t);
let j = ind %. pbits in
assert (v j == v ind % bits t);
let p1 = n.(i) >>. j in
if i +! 1ul <. len && 0ul <. j then p1 |. (n.(i +! 1ul) <<. (pbits -! j)) else p1 | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test5 | val test5 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | val test5 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) | let test5 (b1 b2 b3: ref) : SteelT unit
(ptr b1 `star` ptr b2 `star` ptr b3)
(fun _ -> ptr b2 `star` ptr b1 `star` ptr b3)
=
let x = read b3 in
write b2 (x + 1) | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 18,
"end_line": 80,
"start_col": 0,
"start_line": 75
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | b1: SteelFramingTestSuite.ref -> b2: SteelFramingTestSuite.ref -> b3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"SteelFramingTestSuite.ref",
"SteelFramingTestSuite.write",
"Prims.op_Addition",
"Prims.unit",
"Prims.int",
"SteelFramingTestSuite.read",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test5 (b1 b2 b3: ref)
: SteelT unit
(((ptr b1) `star` (ptr b2)) `star` (ptr b3))
(fun _ -> ((ptr b2) `star` (ptr b1)) `star` (ptr b3)) =
| let x = read b3 in
write b2 (x + 1) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_nat_is_pow | val lemma_pow_nat_is_pow: a:int -> b:nat ->
Lemma (pow a b == LE.pow mk_nat_comm_monoid a b) | val lemma_pow_nat_is_pow: a:int -> b:nat ->
Lemma (pow a b == LE.pow mk_nat_comm_monoid a b) | let rec lemma_pow_nat_is_pow a b =
let k = mk_nat_comm_monoid in
if b = 0 then begin
lemma_pow0 a;
LE.lemma_pow0 k a end
else begin
lemma_pow_unfold a b;
lemma_pow_nat_is_pow a (b - 1);
LE.lemma_pow_unfold k a b;
() end | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 38,
"start_col": 0,
"start_line": 29
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.int -> b: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.pow a b == Lib.Exponentiation.Definition.pow Lib.NatMod.mk_nat_comm_monoid a b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Prims.op_Equality",
"Lib.Exponentiation.Definition.lemma_pow0",
"Prims.unit",
"Lib.NatMod.lemma_pow0",
"Prims.bool",
"Lib.Exponentiation.Definition.lemma_pow_unfold",
"Lib.NatMod.lemma_pow_nat_is_pow",
"Prims.op_Subtraction",
"Lib.NatMod.lemma_pow_unfold",
"Lib.Expon... | [
"recursion"
] | false | false | true | false | false | let rec lemma_pow_nat_is_pow a b =
| let k = mk_nat_comm_monoid in
if b = 0
then
(lemma_pow0 a;
LE.lemma_pow0 k a)
else
(lemma_pow_unfold a b;
lemma_pow_nat_is_pow a (b - 1);
LE.lemma_pow_unfold k a b;
()) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_gt_zero | val lemma_pow_gt_zero: a:pos -> b:nat -> Lemma (pow a b > 0) [SMTPat (pow a b)] | val lemma_pow_gt_zero: a:pos -> b:nat -> Lemma (pow a b > 0) [SMTPat (pow a b)] | let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold a b;
lemma_pow_gt_zero a (b - 1) end | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 19,
"start_col": 0,
"start_line": 15
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.pos -> b: Prims.nat
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow a b > 0) [SMTPat (Lib.NatMod.pow a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Lib.NatMod.lemma_pow0",
"Prims.bool",
"Lib.NatMod.lemma_pow_gt_zero",
"Prims.op_Subtraction",
"Prims.unit",
"Lib.NatMod.lemma_pow_unfold"
] | [
"recursion"
] | false | false | true | false | false | let rec lemma_pow_gt_zero a b =
| if b = 0
then lemma_pow0 a
else
(lemma_pow_unfold a b;
lemma_pow_gt_zero a (b - 1)) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_zero | val lemma_pow_zero: b:pos -> Lemma (pow 0 b = 0) | val lemma_pow_zero: b:pos -> Lemma (pow 0 b = 0) | let lemma_pow_zero b =
lemma_pow_unfold 0 b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 42,
"start_col": 0,
"start_line": 41
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | b: Prims.pos -> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow 0 b = 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.lemma_pow_unfold",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_pow_zero b =
| lemma_pow_unfold 0 b | false |
Hacl.HPKE.Curve64_CP256_SHA256.fsti | Hacl.HPKE.Curve64_CP256_SHA256.cs | val cs:S.ciphersuite | val cs:S.ciphersuite | let cs:S.ciphersuite = (DH.DH_Curve25519, Hash.SHA2_256, S.Seal AEAD.CHACHA20_POLY1305, Hash.SHA2_256) | {
"file_name": "code/hpke/Hacl.HPKE.Curve64_CP256_SHA256.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 102,
"end_line": 10,
"start_col": 0,
"start_line": 10
} | module Hacl.HPKE.Curve64_CP256_SHA256
open Hacl.Impl.HPKE
module S = Spec.Agile.HPKE
module DH = Spec.Agile.DH
module AEAD = Spec.Agile.AEAD
module Hash = Spec.Agile.Hash | {
"checked_file": "/",
"dependencies": [
"Vale.X64.CPU_Features_s.fst.checked",
"Spec.Agile.HPKE.fsti.checked",
"Spec.Agile.Hash.fsti.checked",
"Spec.Agile.DH.fst.checked",
"Spec.Agile.AEAD.fsti.checked",
"prims.fst.checked",
"Hacl.Impl.HPKE.fsti.checked",
"FStar.Pervasives.Native.fs... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Spec.Agile.AEAD",
"short_module": "AEAD"
},
{
"abbrev": true,
"full_module": "Spec.Agile.DH",
"short_module": "DH"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | Spec.Agile.HPKE.ciphersuite | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.Mktuple4",
"Spec.Agile.DH.algorithm",
"Spec.Agile.HPKE.hash_algorithm",
"Spec.Agile.HPKE.aead",
"Spec.Hash.Definitions.hash_alg",
"Spec.Agile.DH.DH_Curve25519",
"Spec.Hash.Definitions.SHA2_256",
"Spec.Agile.HPKE.Seal",
"Spec.Agile.AEAD.CHACHA20_POLY1305"
] | [] | false | false | false | true | false | let cs:S.ciphersuite =
| (DH.DH_Curve25519, Hash.SHA2_256, S.Seal AEAD.CHACHA20_POLY1305, Hash.SHA2_256) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_ge_zero | val lemma_pow_ge_zero: a:nat -> b:nat -> Lemma (pow a b >= 0) [SMTPat (pow a b)] | val lemma_pow_ge_zero: a:nat -> b:nat -> Lemma (pow a b >= 0) [SMTPat (pow a b)] | let rec lemma_pow_ge_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold a b;
lemma_pow_ge_zero a (b - 1) end | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 26,
"start_col": 0,
"start_line": 22
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.nat -> b: Prims.nat
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow a b >= 0) [SMTPat (Lib.NatMod.pow a b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Lib.NatMod.lemma_pow0",
"Prims.bool",
"Lib.NatMod.lemma_pow_ge_zero",
"Prims.op_Subtraction",
"Prims.unit",
"Lib.NatMod.lemma_pow_unfold"
] | [
"recursion"
] | false | false | true | false | false | let rec lemma_pow_ge_zero a b =
| if b = 0
then lemma_pow0 a
else
(lemma_pow_unfold a b;
lemma_pow_ge_zero a (b - 1)) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_one | val lemma_pow_one: b:nat -> Lemma (pow 1 b = 1) | val lemma_pow_one: b:nat -> Lemma (pow 1 b = 1) | let lemma_pow_one b =
let k = mk_nat_comm_monoid in
LE.lemma_pow_one k b;
lemma_pow_nat_is_pow 1 b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 48,
"start_col": 0,
"start_line": 45
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | b: Prims.nat -> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow 1 b = 1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.NatMod.lemma_pow_nat_is_pow",
"Prims.unit",
"Lib.Exponentiation.Definition.lemma_pow_one",
"Prims.int",
"Lib.Exponentiation.Definition.comm_monoid",
"Lib.NatMod.mk_nat_comm_monoid"
] | [] | true | false | true | false | false | let lemma_pow_one b =
| let k = mk_nat_comm_monoid in
LE.lemma_pow_one k b;
lemma_pow_nat_is_pow 1 b | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_mul | val lemma_pow_mul: x:int -> n:nat -> m:nat -> Lemma (pow (pow x n) m = pow x (n * m)) | val lemma_pow_mul: x:int -> n:nat -> m:nat -> Lemma (pow (pow x n) m = pow x (n * m)) | let lemma_pow_mul x n m =
let k = mk_nat_comm_monoid in
LE.lemma_pow_mul k x n m;
lemma_pow_nat_is_pow x n;
lemma_pow_nat_is_pow (pow x n) m;
lemma_pow_nat_is_pow x (n * m) | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 64,
"start_col": 0,
"start_line": 59
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | x: Prims.int -> n: Prims.nat -> m: Prims.nat
-> FStar.Pervasives.Lemma
(ensures Lib.NatMod.pow (Lib.NatMod.pow x n) m = Lib.NatMod.pow x (n * m)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Lib.NatMod.lemma_pow_nat_is_pow",
"FStar.Mul.op_Star",
"Prims.unit",
"Lib.NatMod.pow",
"Lib.Exponentiation.Definition.lemma_pow_mul",
"Lib.Exponentiation.Definition.comm_monoid",
"Lib.NatMod.mk_nat_comm_monoid"
] | [] | true | false | true | false | false | let lemma_pow_mul x n m =
| let k = mk_nat_comm_monoid in
LE.lemma_pow_mul k x n m;
lemma_pow_nat_is_pow x n;
lemma_pow_nat_is_pow (pow x n) m;
lemma_pow_nat_is_pow x (n * m) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_mul_base | val lemma_pow_mul_base: a:int -> b:int -> n:nat -> Lemma (pow a n * pow b n == pow (a * b) n) | val lemma_pow_mul_base: a:int -> b:int -> n:nat -> Lemma (pow a n * pow b n == pow (a * b) n) | let lemma_pow_mul_base a b n =
let k = mk_nat_comm_monoid in
LE.lemma_pow_mul_base k a b n;
lemma_pow_nat_is_pow a n;
lemma_pow_nat_is_pow b n;
lemma_pow_nat_is_pow (a * b) n | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 79,
"start_col": 0,
"start_line": 74
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.int -> b: Prims.int -> n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures Lib.NatMod.pow a n * Lib.NatMod.pow b n == Lib.NatMod.pow (a * b) n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Lib.NatMod.lemma_pow_nat_is_pow",
"FStar.Mul.op_Star",
"Prims.unit",
"Lib.Exponentiation.Definition.lemma_pow_mul_base",
"Lib.Exponentiation.Definition.comm_monoid",
"Lib.NatMod.mk_nat_comm_monoid"
] | [] | true | false | true | false | false | let lemma_pow_mul_base a b n =
| let k = mk_nat_comm_monoid in
LE.lemma_pow_mul_base k a b n;
lemma_pow_nat_is_pow a n;
lemma_pow_nat_is_pow b n;
lemma_pow_nat_is_pow (a * b) n | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_double | val lemma_pow_double: a:int -> b:nat -> Lemma (pow (a * a) b == pow a (b + b)) | val lemma_pow_double: a:int -> b:nat -> Lemma (pow (a * a) b == pow a (b + b)) | let lemma_pow_double a b =
let k = mk_nat_comm_monoid in
LE.lemma_pow_double k a b;
lemma_pow_nat_is_pow (a * a) b;
lemma_pow_nat_is_pow a (b + b) | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 71,
"start_col": 0,
"start_line": 67
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.int -> b: Prims.nat
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow (a * a) b == Lib.NatMod.pow a (b + b)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Lib.NatMod.lemma_pow_nat_is_pow",
"Prims.op_Addition",
"Prims.unit",
"FStar.Mul.op_Star",
"Lib.Exponentiation.Definition.lemma_pow_double",
"Lib.Exponentiation.Definition.comm_monoid",
"Lib.NatMod.mk_nat_comm_monoid"
] | [] | true | false | true | false | false | let lemma_pow_double a b =
| let k = mk_nat_comm_monoid in
LE.lemma_pow_double k a b;
lemma_pow_nat_is_pow (a * a) b;
lemma_pow_nat_is_pow a (b + b) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_add | val lemma_pow_add: x:int -> n:nat -> m:nat -> Lemma (pow x n * pow x m = pow x (n + m)) | val lemma_pow_add: x:int -> n:nat -> m:nat -> Lemma (pow x n * pow x m = pow x (n + m)) | let lemma_pow_add x n m =
let k = mk_nat_comm_monoid in
LE.lemma_pow_add k x n m;
lemma_pow_nat_is_pow x n;
lemma_pow_nat_is_pow x m;
lemma_pow_nat_is_pow x (n + m) | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 56,
"start_col": 0,
"start_line": 51
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | x: Prims.int -> n: Prims.nat -> m: Prims.nat
-> FStar.Pervasives.Lemma
(ensures Lib.NatMod.pow x n * Lib.NatMod.pow x m = Lib.NatMod.pow x (n + m)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Lib.NatMod.lemma_pow_nat_is_pow",
"Prims.op_Addition",
"Prims.unit",
"Lib.Exponentiation.Definition.lemma_pow_add",
"Lib.Exponentiation.Definition.comm_monoid",
"Lib.NatMod.mk_nat_comm_monoid"
] | [] | true | false | true | false | false | let lemma_pow_add x n m =
| let k = mk_nat_comm_monoid in
LE.lemma_pow_add k x n m;
lemma_pow_nat_is_pow x n;
lemma_pow_nat_is_pow x m;
lemma_pow_nat_is_pow x (n + m) | false |
LList.ST.fst | LList.ST.elim_aux | val elim_aux (#opened: _) (#a: Type0) (hd: G.erased a) (tl: G.erased (list a)) (ll: llist a)
: STGhost (G.erased (llist_node a))
opened
(is_list ll (G.reveal hd :: tl))
(fun node -> (pts_to ll full_perm node) `star` (is_list node.next tl))
(requires True)
(ensures fun node -> eq2 #a no... | val elim_aux (#opened: _) (#a: Type0) (hd: G.erased a) (tl: G.erased (list a)) (ll: llist a)
: STGhost (G.erased (llist_node a))
opened
(is_list ll (G.reveal hd :: tl))
(fun node -> (pts_to ll full_perm node) `star` (is_list node.next tl))
(requires True)
(ensures fun node -> eq2 #a no... | let elim_aux (#opened:_) (#a:Type0)
(hd:G.erased a)
(tl:G.erased (list a))
(ll:llist a)
: STGhost (G.erased (llist_node a)) opened
(is_list ll (G.reveal hd::tl))
(fun node ->
pts_to ll full_perm node
`star`
is_list node.next tl)
(requires True)
(ensures fun node ->... | {
"file_name": "share/steel/examples/steel/LList.ST.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 8,
"end_line": 98,
"start_col": 0,
"start_line": 70
} | (*
Copyright 2021 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Reference.fsti.checked",
"Steel.ST.Effect.fsti.checked",
"Steel.Memory.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Tactics.fst.checked",
"FStar.Pervasives.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST.Util",
"short_module": null
},
{
"abbrev": false,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | hd: FStar.Ghost.erased a -> tl: FStar.Ghost.erased (Prims.list a) -> ll: LList.ST.llist a
-> Steel.ST.Effect.Ghost.STGhost (FStar.Ghost.erased (LList.ST.llist_node a)) | Steel.ST.Effect.Ghost.STGhost | [] | [] | [
"Steel.Memory.inames",
"FStar.Ghost.erased",
"Prims.list",
"LList.ST.llist",
"LList.ST.llist_node",
"Prims.unit",
"Steel.ST.Util.elim_pure",
"Prims.eq2",
"LList.ST.__proj__Mkllist_node__item__data",
"FStar.Ghost.reveal",
"Steel.ST.Util.elim_exists",
"Steel.Effect.Common.VStar",
"Steel.ST.Ref... | [] | false | true | false | false | false | let elim_aux (#opened: _) (#a: Type0) (hd: G.erased a) (tl: G.erased (list a)) (ll: llist a)
: STGhost (G.erased (llist_node a))
opened
(is_list ll (G.reveal hd :: tl))
(fun node -> (pts_to ll full_perm node) `star` (is_list node.next tl))
(requires True)
(ensures fun node -> eq2 #a no... | FStar.Tactics.Effect.assert_by_tactic (is_list ll (G.reveal hd :: tl) ==
exists_ (fun node ->
((pts_to ll full_perm node) `star` (pure (eq2 #a node.data hd)))
`star`
(is_list node.next tl)))
(fun _ ->
();
(T.norm [delta_only [`%is_list]; zeta; iota]));
rewrite (is_list ll... | false |
Lib.NatMod.fst | Lib.NatMod.lemma_mul_mod_assoc | val lemma_mul_mod_assoc: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (mul_mod a b) c == mul_mod a (mul_mod b c)) | val lemma_mul_mod_assoc: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (mul_mod a b) c == mul_mod a (mul_mod b c)) | let lemma_mul_mod_assoc #m a b c =
calc (==) {
(a * b % m) * c % m;
(==) { Math.Lemmas.lemma_mod_mul_distr_l (a * b) c m }
(a * b) * c % m;
(==) { Math.Lemmas.paren_mul_right a b c }
a * (b * c) % m;
(==) { Math.Lemmas.lemma_mod_mul_distr_r a (b * c) m }
a * (b * c % m) % m;
} | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 118,
"start_col": 0,
"start_line": 109
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.mul_mod (Lib.NatMod.mul_mod a b) c == Lib.NatMod.mul_mod a (Lib.NatMod.mul_mod b c)
) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"FStar.Math.Lemmas.l... | [] | false | false | true | false | false | let lemma_mul_mod_assoc #m a b c =
| calc ( == ) {
(a * b % m) * c % m;
( == ) { Math.Lemmas.lemma_mod_mul_distr_l (a * b) c m }
(a * b) * c % m;
( == ) { Math.Lemmas.paren_mul_right a b c }
a * (b * c) % m;
( == ) { Math.Lemmas.lemma_mod_mul_distr_r a (b * c) m }
a * (b * c % m) % m;
} | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if11 | val test_if11: Prims.unit -> SteelT ref emp ptr | val test_if11: Prims.unit -> SteelT ref emp ptr | let test_if11 () : SteelT ref emp ptr =
let r = alloc 0 in
if true then return r else return r | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 37,
"end_line": 166,
"start_col": 0,
"start_line": 164
} | (*
Copyright 2020 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | _: Prims.unit -> Steel.Effect.SteelT SteelFramingTestSuite.ref | Steel.Effect.SteelT | [] | [] | [
"Prims.unit",
"Steel.Effect.Atomic.return",
"SteelFramingTestSuite.ref",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop",
"SteelFramingTestSuite.alloc",
"Steel.Effect.Common.emp"
] | [] | false | true | false | false | false | let test_if11 () : SteelT ref emp ptr =
| let r = alloc 0 in
if true then return r else return r | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_mod_base | val lemma_pow_mod_base: a:int -> b:nat -> n:pos -> Lemma (pow a b % n == pow (a % n) b % n) | val lemma_pow_mod_base: a:int -> b:nat -> n:pos -> Lemma (pow a b % n == pow (a % n) b % n) | let rec lemma_pow_mod_base a b n =
if b = 0 then begin
lemma_pow0 a;
lemma_pow0 (a % n) end
else begin
calc (==) {
pow a b % n;
(==) { lemma_pow_unfold a b }
a * pow a (b - 1) % n;
(==) { Math.Lemmas.lemma_mod_mul_distr_r a (pow a (b - 1)) n }
a * (pow a (b - 1) % n) % n;
... | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 103,
"start_col": 0,
"start_line": 82
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Prims.int -> b: Prims.nat -> n: Prims.pos
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow a b % n == Lib.NatMod.pow (a % n) b % n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.nat",
"Prims.pos",
"Prims.op_Equality",
"Lib.NatMod.lemma_pow0",
"Prims.op_Modulus",
"Prims.unit",
"Prims.bool",
"Prims._assert",
"Prims.eq2",
"Lib.NatMod.pow",
"FStar.Calc.calc_finish",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"FStar.Calc.calc_step",
... | [
"recursion"
] | false | false | true | false | false | let rec lemma_pow_mod_base a b n =
| if b = 0
then
(lemma_pow0 a;
lemma_pow0 (a % n))
else
(calc ( == ) {
pow a b % n;
( == ) { lemma_pow_unfold a b }
a * pow a (b - 1) % n;
( == ) { Math.Lemmas.lemma_mod_mul_distr_r a (pow a (b - 1)) n }
a * (pow a (b - 1) % n) % n;
( == ) { lemma_pow_mod_base a (b - 1) n }
... | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_mod | val lemma_pow_mod: #m:pos{1 < m} -> a:nat_mod m -> b:nat -> Lemma (pow a b % m == pow_mod #m a b) | val lemma_pow_mod: #m:pos{1 < m} -> a:nat_mod m -> b:nat -> Lemma (pow a b % m == pow_mod #m a b) | let lemma_pow_mod #n a b = lemma_pow_mod_ n a b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 47,
"end_line": 186,
"start_col": 0,
"start_line": 186
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Prims.nat
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow a b % m == Lib.NatMod.pow_mod a b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.NatMod.nat_mod",
"Prims.nat",
"Lib.NatMod.lemma_pow_mod_",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_pow_mod #n a b =
| lemma_pow_mod_ n a b | false |
Lib.NatMod.fst | Lib.NatMod.lemma_add_mod_one | val lemma_add_mod_one: #m:pos -> a:nat_mod m -> Lemma (add_mod a 0 == a) | val lemma_add_mod_one: #m:pos -> a:nat_mod m -> Lemma (add_mod a 0 == a) | let lemma_add_mod_one #m a =
Math.Lemmas.small_mod a m | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 211,
"start_col": 0,
"start_line": 210
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> FStar.Pervasives.Lemma (ensures Lib.NatMod.add_mod a 0 == a) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"FStar.Math.Lemmas.small_mod",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_add_mod_one #m a =
| Math.Lemmas.small_mod a m | false |
FStar.UInt8.fsti | FStar.UInt8.eq | val eq (a b: t) : Tot bool | val eq (a b: t) : Tot bool | let eq (a:t) (b:t) : Tot bool = eq #n (v a) (v b) | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 223,
"start_col": 0,
"start_line": 223
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"FStar.UInt.eq",
"FStar.UInt8.n",
"FStar.UInt8.v",
"Prims.bool"
] | [] | false | false | false | true | false | let eq (a b: t) : Tot bool =
| eq #n (v a) (v b) | false |
FStar.UInt8.fsti | FStar.UInt8.n | val n : Prims.int | let n = 8 | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 16,
"end_line": 20,
"start_col": 7,
"start_line": 20
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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 | Prims.int | Prims.Tot | [
"total"
] | [] | [] | [] | false | false | false | true | false | let n =
| 8 | false | |
FStar.UInt8.fsti | FStar.UInt8.gte | val gte (a b: t) : Tot bool | val gte (a b: t) : Tot bool | let gte (a:t) (b:t) : Tot bool = gte #n (v a) (v b) | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 51,
"end_line": 229,
"start_col": 0,
"start_line": 229
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"FStar.UInt.gte",
"FStar.UInt8.n",
"FStar.UInt8.v",
"Prims.bool"
] | [] | false | false | false | true | false | let gte (a b: t) : Tot bool =
| gte #n (v a) (v b) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_mod_distributivity_add_left | val lemma_mod_distributivity_add_left: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (add_mod a b) c == add_mod (mul_mod a c) (mul_mod b c)) | val lemma_mod_distributivity_add_left: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (add_mod a b) c == add_mod (mul_mod a c) (mul_mod b c)) | let lemma_mod_distributivity_add_left #m a b c =
lemma_mod_distributivity_add_right c a b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 244,
"start_col": 0,
"start_line": 243
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.mul_mod (Lib.NatMod.add_mod a b) c ==
Lib.NatMod.add_mod (Lib.NatMod.mul_mod a c) (Lib.NatMod.mul_mod b c)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"Lib.NatMod.lemma_mod_distributivity_add_right",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_mod_distributivity_add_left #m a b c =
| lemma_mod_distributivity_add_right c a b | false |
FStar.UInt8.fsti | FStar.UInt8.gt | val gt (a b: t) : Tot bool | val gt (a b: t) : Tot bool | let gt (a:t) (b:t) : Tot bool = gt #n (v a) (v b) | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 226,
"start_col": 0,
"start_line": 226
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"FStar.UInt.gt",
"FStar.UInt8.n",
"FStar.UInt8.v",
"Prims.bool"
] | [] | false | false | false | true | false | let gt (a b: t) : Tot bool =
| gt #n (v a) (v b) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_add_mod_assoc | val lemma_add_mod_assoc: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (add_mod (add_mod a b) c == add_mod a (add_mod b c)) | val lemma_add_mod_assoc: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (add_mod (add_mod a b) c == add_mod a (add_mod b c)) | let lemma_add_mod_assoc #m a b c =
calc (==) {
add_mod (add_mod a b) c;
(==) { Math.Lemmas.lemma_mod_plus_distr_l (a + b) c m }
((a + b) + c) % m;
(==) { }
(a + (b + c)) % m;
(==) { Math.Lemmas.lemma_mod_plus_distr_r a (b + c) m }
add_mod a (add_mod b c);
} | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 223,
"start_col": 0,
"start_line": 214
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.add_mod (Lib.NatMod.add_mod a b) c == Lib.NatMod.add_mod a (Lib.NatMod.add_mod b c)
) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Lib.NatMod.add_mod",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"Prims.op_Modulus",
"Prims.op_Addition",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"FStar.Math... | [] | false | false | true | false | false | let lemma_add_mod_assoc #m a b c =
| calc ( == ) {
add_mod (add_mod a b) c;
( == ) { Math.Lemmas.lemma_mod_plus_distr_l (a + b) c m }
((a + b) + c) % m;
( == ) { () }
(a + (b + c)) % m;
( == ) { Math.Lemmas.lemma_mod_plus_distr_r a (b + c) m }
add_mod a (add_mod b c);
} | false |
Lib.NatMod.fst | Lib.NatMod.lemma_mod_distributivity_sub_left | val lemma_mod_distributivity_sub_left: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (sub_mod a b) c == sub_mod (mul_mod a c) (mul_mod b c)) | val lemma_mod_distributivity_sub_left: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod (sub_mod a b) c == sub_mod (mul_mod a c) (mul_mod b c)) | let lemma_mod_distributivity_sub_left #m a b c =
lemma_mod_distributivity_sub_right c a b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 264,
"start_col": 0,
"start_line": 263
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.mul_mod (Lib.NatMod.sub_mod a b) c ==
Lib.NatMod.sub_mod (Lib.NatMod.mul_mod a c) (Lib.NatMod.mul_mod b c)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"Lib.NatMod.lemma_mod_distributivity_sub_right",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_mod_distributivity_sub_left #m a b c =
| lemma_mod_distributivity_sub_right c a b | false |
FStar.UInt8.fsti | FStar.UInt8.lte | val lte (a b: t) : Tot bool | val lte (a b: t) : Tot bool | let lte (a:t) (b:t) : Tot bool = lte #n (v a) (v b) | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 51,
"end_line": 235,
"start_col": 0,
"start_line": 235
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"FStar.UInt.lte",
"FStar.UInt8.n",
"FStar.UInt8.v",
"Prims.bool"
] | [] | false | false | false | true | false | let lte (a b: t) : Tot bool =
| lte #n (v a) (v b) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_mod_distributivity_add_right | val lemma_mod_distributivity_add_right: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod a (add_mod b c) == add_mod (mul_mod a b) (mul_mod a c)) | val lemma_mod_distributivity_add_right: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod a (add_mod b c) == add_mod (mul_mod a b) (mul_mod a c)) | let lemma_mod_distributivity_add_right #m a b c =
calc (==) {
mul_mod a (add_mod b c);
(==) { }
a * ((b + c) % m) % m;
(==) { Math.Lemmas.lemma_mod_mul_distr_r a (b + c) m }
a * (b + c) % m;
(==) { Math.Lemmas.distributivity_add_right a b c }
(a * b + a * c) % m;
(==) { Math.Lemmas.mod... | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 240,
"start_col": 0,
"start_line": 229
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.mul_mod a (Lib.NatMod.add_mod b c) ==
Lib.NatMod.add_mod (Lib.NatMod.mul_mod a b) (Lib.NatMod.mul_mod a c)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Lib.NatMod.mul_mod",
"Lib.NatMod.add_mod",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"Prims.op_Modulus",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"FStar.Calc.calc... | [] | false | false | true | false | false | let lemma_mod_distributivity_add_right #m a b c =
| calc ( == ) {
mul_mod a (add_mod b c);
( == ) { () }
a * ((b + c) % m) % m;
( == ) { Math.Lemmas.lemma_mod_mul_distr_r a (b + c) m }
a * (b + c) % m;
( == ) { Math.Lemmas.distributivity_add_right a b c }
(a * b + a * c) % m;
( == ) { Math.Lemmas.modulo_distributivity (a * b) (a * c) m }
add_mod (mul_m... | false |
FStar.UInt8.fsti | FStar.UInt8.lt | val lt (a b: t) : Tot bool | val lt (a b: t) : Tot bool | let lt (a:t) (b:t) : Tot bool = lt #n (v a) (v b) | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 232,
"start_col": 0,
"start_line": 232
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"FStar.UInt.lt",
"FStar.UInt8.n",
"FStar.UInt8.v",
"Prims.bool"
] | [] | false | false | false | true | false | let lt (a b: t) : Tot bool =
| lt #n (v a) (v b) | false |
Lib.NatMod.fst | Lib.NatMod.pow_eq | val pow_eq: a:nat -> n:nat -> Lemma (Fermat.pow a n == pow a n) | val pow_eq: a:nat -> n:nat -> Lemma (Fermat.pow a n == pow a n) | let rec pow_eq a n =
if n = 0 then ()
else pow_eq a (n - 1) | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 292,
"start_col": 0,
"start_line": 290
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"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 -> n: Prims.nat
-> FStar.Pervasives.Lemma (ensures FStar.Math.Fermat.pow a n == Lib.NatMod.pow a n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Lib.NatMod.pow_eq",
"Prims.op_Subtraction",
"Prims.unit"
] | [
"recursion"
] | false | false | true | false | false | let rec pow_eq a n =
| if n = 0 then () else pow_eq a (n - 1) | false |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_nat_mod_is_pow | val lemma_pow_nat_mod_is_pow: #n:pos{1 < n} -> a:nat_mod n -> b:nat ->
Lemma (pow a b % n == LE.pow (mk_nat_mod_comm_monoid n) a b) | val lemma_pow_nat_mod_is_pow: #n:pos{1 < n} -> a:nat_mod n -> b:nat ->
Lemma (pow a b % n == LE.pow (mk_nat_mod_comm_monoid n) a b) | let rec lemma_pow_nat_mod_is_pow #n a b =
let k = mk_nat_mod_comm_monoid n in
if b = 0 then begin
lemma_pow0 a;
LE.lemma_pow0 k a end
else begin
calc (==) {
pow a b % n;
(==) { lemma_pow_unfold a b }
a * pow a (b - 1) % n;
(==) { Math.Lemmas.lemma_mod_mul_distr_r a (pow a (b - ... | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 207,
"start_col": 0,
"start_line": 189
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod n -> b: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.pow a b % n ==
Lib.Exponentiation.Definition.pow (Lib.NatMod.mk_nat_mod_comm_monoid n) a b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.NatMod.nat_mod",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Lib.Exponentiation.Definition.lemma_pow0",
"Prims.unit",
"Lib.NatMod.lemma_pow0",
"Prims.bool",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Prims.op_Modulus",
"Lib.NatMod.pow"... | [
"recursion"
] | false | false | true | false | false | let rec lemma_pow_nat_mod_is_pow #n a b =
| let k = mk_nat_mod_comm_monoid n in
if b = 0
then
(lemma_pow0 a;
LE.lemma_pow0 k a)
else
(calc ( == ) {
pow a b % n;
( == ) { lemma_pow_unfold a b }
a * pow a (b - 1) % n;
( == ) { Math.Lemmas.lemma_mod_mul_distr_r a (pow a (b - 1)) n }
a * (pow a (b - 1) % n) % n;
( == ) { l... | false |
FStar.UInt8.fsti | FStar.UInt8.op_Plus_Hat | val op_Plus_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Plus_Hat = add | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 316,
"start_col": 7,
"start_line": 316
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.add"
] | [] | false | false | false | false | false | let op_Plus_Hat =
| add | false | |
Lib.NatMod.fst | Lib.NatMod.lemma_mod_distributivity_sub_right | val lemma_mod_distributivity_sub_right: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod a (sub_mod b c) == sub_mod (mul_mod a b) (mul_mod a c)) | val lemma_mod_distributivity_sub_right: #m:pos -> a:nat_mod m -> b:nat_mod m -> c:nat_mod m ->
Lemma (mul_mod a (sub_mod b c) == sub_mod (mul_mod a b) (mul_mod a c)) | let lemma_mod_distributivity_sub_right #m a b c =
calc (==) {
mul_mod a (sub_mod b c);
(==) { }
a * ((b - c) % m) % m;
(==) { Math.Lemmas.lemma_mod_mul_distr_r a (b - c) m }
a * (b - c) % m;
(==) { Math.Lemmas.distributivity_sub_right a b c }
(a * b - a * c) % m;
(==) { Math.Lemmas.lem... | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 260,
"start_col": 0,
"start_line": 247
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma
(ensures
Lib.NatMod.mul_mod a (Lib.NatMod.sub_mod b c) ==
Lib.NatMod.sub_mod (Lib.NatMod.mul_mod a b) (Lib.NatMod.mul_mod a c)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.NatMod.nat_mod",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Lib.NatMod.mul_mod",
"Lib.NatMod.sub_mod",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"Prims.op_Modulus",
"Prims.op_Subtraction",
"FStar.Mul.op_Star",
"FStar.Calc.c... | [] | false | false | true | false | false | let lemma_mod_distributivity_sub_right #m a b c =
| calc ( == ) {
mul_mod a (sub_mod b c);
( == ) { () }
a * ((b - c) % m) % m;
( == ) { Math.Lemmas.lemma_mod_mul_distr_r a (b - c) m }
a * (b - c) % m;
( == ) { Math.Lemmas.distributivity_sub_right a b c }
(a * b - a * c) % m;
( == ) { Math.Lemmas.lemma_mod_plus_distr_l (a * b) (- a * c) m }
(mul_mod a ... | false |
Lib.NatMod.fst | Lib.NatMod.lemma_div_mod_prime_one | val lemma_div_mod_prime_one: #m:pos{1 < m} -> a:nat_mod m -> Lemma (div_mod a 1 == a) | val lemma_div_mod_prime_one: #m:pos{1 < m} -> a:nat_mod m -> Lemma (div_mod a 1 == a) | let lemma_div_mod_prime_one #m a =
lemma_pow_mod #m 1 (m - 2);
lemma_pow_one (m - 2);
Math.Lemmas.small_mod 1 m | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 319,
"start_col": 0,
"start_line": 316
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> FStar.Pervasives.Lemma (ensures Lib.NatMod.div_mod a 1 == a) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.NatMod.nat_mod",
"FStar.Math.Lemmas.small_mod",
"Prims.unit",
"Lib.NatMod.lemma_pow_one",
"Prims.op_Subtraction",
"Lib.NatMod.lemma_pow_mod"
] | [] | true | false | true | false | false | let lemma_div_mod_prime_one #m a =
| lemma_pow_mod #m 1 (m - 2);
lemma_pow_one (m - 2);
Math.Lemmas.small_mod 1 m | false |
FStar.UInt8.fsti | FStar.UInt8.op_Plus_Percent_Hat | val op_Plus_Percent_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Plus_Percent_Hat = add_mod | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 40,
"end_line": 318,
"start_col": 7,
"start_line": 318
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.add_mod"
] | [] | false | false | false | false | false | let op_Plus_Percent_Hat =
| add_mod | false | |
FStar.UInt8.fsti | FStar.UInt8.op_Subtraction_Hat | val op_Subtraction_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Subtraction_Hat = sub | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 319,
"start_col": 7,
"start_line": 319
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.sub"
] | [] | false | false | false | false | false | let op_Subtraction_Hat =
| sub | false | |
FStar.UInt8.fsti | FStar.UInt8.op_Plus_Question_Hat | val op_Plus_Question_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Plus_Question_Hat = add_underspec | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 317,
"start_col": 7,
"start_line": 317
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.add_underspec"
] | [] | false | false | false | false | false | let op_Plus_Question_Hat =
| add_underspec | false | |
FStar.UInt8.fsti | FStar.UInt8.op_Subtraction_Percent_Hat | val op_Subtraction_Percent_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Subtraction_Percent_Hat = sub_mod | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 321,
"start_col": 7,
"start_line": 321
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.sub_mod"
] | [] | false | false | false | false | false | let op_Subtraction_Percent_Hat =
| sub_mod | false | |
Lib.NatMod.fst | Lib.NatMod.lemma_div_mod_eq_mul_mod | val lemma_div_mod_eq_mul_mod: #m:prime -> a:nat_mod m -> b:nat_mod m{b <> 0} -> c:nat_mod m ->
Lemma ((div_mod a b = c) == (a = mul_mod c b)) | val lemma_div_mod_eq_mul_mod: #m:prime -> a:nat_mod m -> b:nat_mod m{b <> 0} -> c:nat_mod m ->
Lemma ((div_mod a b = c) == (a = mul_mod c b)) | let lemma_div_mod_eq_mul_mod #m a b c =
lemma_div_mod_eq_mul_mod1 a b c;
lemma_div_mod_eq_mul_mod2 a b c | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 399,
"start_col": 0,
"start_line": 397
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Lib.NatMod.nat_mod m {b <> 0} -> c: Lib.NatMod.nat_mod m
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.div_mod a b = c == (a = Lib.NatMod.mul_mod c b)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.NatMod.prime",
"Lib.NatMod.nat_mod",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"Lib.NatMod.lemma_div_mod_eq_mul_mod2",
"Prims.unit",
"Lib.NatMod.lemma_div_mod_eq_mul_mod1"
] | [] | true | false | true | false | false | let lemma_div_mod_eq_mul_mod #m a b c =
| lemma_div_mod_eq_mul_mod1 a b c;
lemma_div_mod_eq_mul_mod2 a b c | false |
FStar.UInt8.fsti | FStar.UInt8.op_Subtraction_Question_Hat | val op_Subtraction_Question_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | let op_Subtraction_Question_Hat = sub_underspec | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 54,
"end_line": 320,
"start_col": 7,
"start_line": 320
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.sub_underspec"
] | [] | false | false | false | false | false | let op_Subtraction_Question_Hat =
| sub_underspec | false | |
Lib.NatMod.fst | Lib.NatMod.lemma_mul_mod_zero2 | val lemma_mul_mod_zero2: n:pos -> x:int -> y:int -> Lemma
(requires x % n == 0 \/ y % n == 0)
(ensures x * y % n == 0) | val lemma_mul_mod_zero2: n:pos -> x:int -> y:int -> Lemma
(requires x % n == 0 \/ y % n == 0)
(ensures x * y % n == 0) | let lemma_mul_mod_zero2 n x y =
if x % n = 0 then
Math.Lemmas.lemma_mod_mul_distr_l x y n
else
Math.Lemmas.lemma_mod_mul_distr_r x y n | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 410,
"start_col": 0,
"start_line": 406
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
... | {
"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 | n: Prims.pos -> x: Prims.int -> y: Prims.int
-> FStar.Pervasives.Lemma (requires x % n == 0 \/ y % n == 0) (ensures x * y % n == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.int",
"Prims.op_Equality",
"Prims.op_Modulus",
"FStar.Math.Lemmas.lemma_mod_mul_distr_l",
"Prims.bool",
"FStar.Math.Lemmas.lemma_mod_mul_distr_r",
"Prims.unit"
] | [] | false | false | true | false | false | let lemma_mul_mod_zero2 n x y =
| if x % n = 0
then Math.Lemmas.lemma_mod_mul_distr_l x y n
else Math.Lemmas.lemma_mod_mul_distr_r x y n | false |
Lib.NatMod.fst | Lib.NatMod.lemma_div_mod_prime | val lemma_div_mod_prime: #m:prime -> a:nat_mod m{a <> 0} -> Lemma (div_mod a a == 1) | val lemma_div_mod_prime: #m:prime -> a:nat_mod m{a <> 0} -> Lemma (div_mod a a == 1) | let lemma_div_mod_prime #m a =
Math.Lemmas.small_mod a m;
assert (a == a % m);
assert (a <> 0 /\ a % m <> 0);
calc (==) {
pow_mod #m a (m - 2) * a % m;
(==) { lemma_pow_mod #m a (m - 2) }
pow a (m - 2) % m * a % m;
(==) { Math.Lemmas.lemma_mod_mul_distr_l (pow a (m - 2)) a m }
pow a (m - 2)... | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 313,
"start_col": 0,
"start_line": 296
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m {a <> 0} -> FStar.Pervasives.Lemma (ensures Lib.NatMod.div_mod a a == 1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.NatMod.prime",
"Lib.NatMod.nat_mod",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Lib.NatMod.pow_mod",
"Prims.op_Subtraction",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
... | [] | false | false | true | false | false | let lemma_div_mod_prime #m a =
| Math.Lemmas.small_mod a m;
assert (a == a % m);
assert (a <> 0 /\ a % m <> 0);
calc ( == ) {
pow_mod #m a (m - 2) * a % m;
( == ) { lemma_pow_mod #m a (m - 2) }
(pow a (m - 2) % m) * a % m;
( == ) { Math.Lemmas.lemma_mod_mul_distr_l (pow a (m - 2)) a m }
pow a (m - 2) * a % m;
( == ) { (lemma_pow1 a;
le... | false |
FStar.UInt8.fsti | FStar.UInt8.op_Slash_Hat | val op_Slash_Hat : a: FStar.UInt8.t -> b: FStar.UInt8.t{FStar.UInt8.v b <> 0} -> Prims.Pure FStar.UInt8.t | let op_Slash_Hat = div | {
"file_name": "ulib/FStar.UInt8.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 325,
"start_col": 7,
"start_line": 325
} | (*
Copyright 2008-2019 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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "FStar.UInt8.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"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.UInt8.t -> b: FStar.UInt8.t{FStar.UInt8.v b <> 0} -> Prims.Pure FStar.UInt8.t | Prims.Pure | [] | [] | [
"FStar.UInt8.div"
] | [] | false | false | false | false | false | let op_Slash_Hat =
| div | false | |
Lib.NatMod.fst | Lib.NatMod.lemma_pow_mod_prime_zero | val lemma_pow_mod_prime_zero: #m:prime -> a:nat_mod m -> b:pos ->
Lemma (pow_mod #m a b = 0 <==> a = 0) | val lemma_pow_mod_prime_zero: #m:prime -> a:nat_mod m -> b:pos ->
Lemma (pow_mod #m a b = 0 <==> a = 0) | let lemma_pow_mod_prime_zero #m a b =
lemma_pow_mod #m a b;
Classical.move_requires_2 lemma_pow_mod_prime_zero_ a b;
Classical.move_requires lemma_pow_zero b | {
"file_name": "lib/Lib.NatMod.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 438,
"start_col": 0,
"start_line": 435
} | module Lib.NatMod
module LE = Lib.Exponentiation.Definition
#set-options "--z3rlimit 30 --fuel 0 --ifuel 0"
#push-options "--fuel 2"
let lemma_pow0 a = ()
let lemma_pow1 a = ()
let lemma_pow_unfold a b = ()
#pop-options
let rec lemma_pow_gt_zero a b =
if b = 0 then lemma_pow0 a
else begin
lemma_pow_unfold... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": true,
"source_file": "Lib.NatMod.... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation.Definition",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "FStar.Math.Euclid",
"short_module": "Euclid"
},
{
"abbrev": true,
"full_module": "FStar.Math.Fermat",
"short_module": "Fermat"
},
{
"abbrev"... | {
"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 | a: Lib.NatMod.nat_mod m -> b: Prims.pos
-> FStar.Pervasives.Lemma (ensures Lib.NatMod.pow_mod a b = 0 <==> a = 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.NatMod.prime",
"Lib.NatMod.nat_mod",
"Prims.pos",
"FStar.Classical.move_requires",
"Prims.l_True",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Lib.NatMod.pow",
"Lib.NatMod.lemma_pow_zero",
"Prims.unit",
"FStar.Classical.move_requires_2",
"Prims.op_Modulus",
"Lib.NatMod.lemma_pow_m... | [] | false | false | true | false | false | let lemma_pow_mod_prime_zero #m a b =
| lemma_pow_mod #m a b;
Classical.move_requires_2 lemma_pow_mod_prime_zero_ a b;
Classical.move_requires lemma_pow_zero b | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.