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
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.set
val set: s:state -> x:index -> y:index -> v:uint64 -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.set (as_seq h0 s) (size_v x) (size_v y) v)
val set: s:state -> x:index -> y:index -> v:uint64 -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.set (as_seq h0 s) (size_v x) (size_v y) v)
let set s x y v = s.(x +! 5ul *! y) <- v
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 40, "end_line": 65, "start_col": 0, "start_line": 65 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> x: Hacl.Impl.SHA3.index -> y: Hacl.Impl.SHA3.index -> v: Lib.IntTypes.uint64 -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Hacl.Impl.SHA3.index", "Lib.IntTypes.uint64", "Lib.Buffer.op_Array_Assignment", "FStar.UInt32.__uint_to_t", "Lib.IntTypes.op_Plus_Bang", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.op_Star_Bang", "Prims.unit" ]
[]
false
true
false
false
false
let set s x y v =
s.(x +! 5ul *! y) <- v
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_theta0
val state_theta0: s:state -> _C:lbuffer uint64 5ul -> Stack unit (requires fun h -> live h s /\ live h _C /\ disjoint _C s) (ensures fun h0 _ h1 -> modifies (loc _C) h0 h1 /\ as_seq h1 _C == S.state_theta0 (as_seq h0 s) (as_seq h0 _C))
val state_theta0: s:state -> _C:lbuffer uint64 5ul -> Stack unit (requires fun h -> live h s /\ live h _C /\ disjoint _C s) (ensures fun h0 _ h1 -> modifies (loc _C) h0 h1 /\ as_seq h1 _C == S.state_theta0 (as_seq h0 s) (as_seq h0 _C))
let state_theta0 s _C = [@ inline_let] let spec h0 = S.state_theta_inner_C (as_seq h0 s) in let h0 = ST.get () in loop1 h0 5ul _C spec (fun x -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 _C) (v x); _C.(x) <- get s x 0ul ^. get s x 1ul ^. get s x 2ul ^. get s x 3ul ^. get...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.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.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> _C: Lib.Buffer.lbuffer Lib.IntTypes.uint64 5ul -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.loop1", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.op_Array_Assignment", "Prims.unit", "Lib.IntTy...
[]
false
true
false
false
false
let state_theta0 s _C =
[@@ inline_let ]let spec h0 = S.state_theta_inner_C (as_seq h0 s) in let h0 = ST.get () in loop1 h0 5ul _C spec (fun x -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 _C) (v x); _C.(x) <- get s x 0ul ^. get s x 1ul ^. get s x 2ul ^. get s x 3ul ^. get s x 4ul)
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.index_map
val index_map: #a:Type -> #b:Type -> f:(a -> b) -> l:list a -> i:nat{i < List.Tot.length l} -> Lemma (List.Tot.index (List.Tot.map f l) i == f (List.Tot.index l i))
val index_map: #a:Type -> #b:Type -> f:(a -> b) -> l:list a -> i:nat{i < List.Tot.length l} -> Lemma (List.Tot.index (List.Tot.map f l) i == f (List.Tot.index l i))
let rec index_map #a #b f l i = if i = 0 then () else match l with | [] -> () | _ :: l' -> index_map f l' (i - 1)
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 39, "end_line": 161, "start_col": 0, "start_line": 156 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 1, "max_ifuel": 1, "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
f: (_: a -> b) -> l: Prims.list a -> i: Prims.nat{i < FStar.List.Tot.Base.length l} -> FStar.Pervasives.Lemma (ensures FStar.List.Tot.Base.index (FStar.List.Tot.Base.map f l) i == f (FStar.List.Tot.Base.index l i) )
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.list", "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "FStar.List.Tot.Base.length", "Prims.op_Equality", "Prims.int", "Prims.bool", "Hacl.Impl.SHA3.index_map", "Prims.op_Subtraction", "Prims.unit" ]
[ "recursion" ]
false
false
true
false
false
let rec index_map #a #b f l i =
if i = 0 then () else match l with | [] -> () | _ :: l' -> index_map f l' (i - 1)
false
Pulse.Soundness.Common.fst
Pulse.Soundness.Common.elab_comp_post
val elab_comp_post (c: comp_st) : R.term
val elab_comp_post (c: comp_st) : R.term
let elab_comp_post (c:comp_st) : R.term = let t = elab_term (comp_res c) in let post = elab_term (comp_post c) in mk_abs t R.Q_Explicit post
{ "file_name": "lib/steel/pulse/Pulse.Soundness.Common.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 28, "end_line": 353, "start_col": 0, "start_line": 350 }
(* Copyright 2023 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": [ "Pulse.Typing.fst.checked", "Pulse.Syntax.fst.checked", "Pulse.Reflection.Util.fst.checked", "Pulse.Elaborate.fsti.checked", "prims.fst.checked", "FStar.Tactics.V2.fst.checked", "FStar.Set.fsti.checked", "FStar.Reflection.V2.fst.checked", ...
[ { "abbrev": false, "full_module": "Pulse.Elaborate", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Typing", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Reflection.Util", "short_module": null }, { "abbrev": false, "full_m...
{ "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
c: Pulse.Syntax.Base.comp_st -> FStar.Stubs.Reflection.Types.term
Prims.Tot
[ "total" ]
[]
[ "Pulse.Syntax.Base.comp_st", "Pulse.Reflection.Util.mk_abs", "FStar.Stubs.Reflection.V2.Data.Q_Explicit", "FStar.Stubs.Reflection.Types.term", "Pulse.Elaborate.Pure.elab_term", "Pulse.Syntax.Base.comp_post", "Pulse.Syntax.Base.comp_res" ]
[]
false
false
false
true
false
let elab_comp_post (c: comp_st) : R.term =
let t = elab_term (comp_res c) in let post = elab_term (comp_post c) in mk_abs t R.Q_Explicit post
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.keccak_rotc
val keccak_rotc:x: glbuffer rotc_t 24ul {witnessed x keccak_rotc /\ recallable x}
val keccak_rotc:x: glbuffer rotc_t 24ul {witnessed x keccak_rotc /\ recallable x}
let keccak_rotc :x:glbuffer rotc_t 24ul{witnessed x keccak_rotc /\ recallable x} = createL_global rotc_list
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 28, "end_line": 26, "start_col": 8, "start_line": 25 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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: (c: Lib.Buffer.lbuffer_t Lib.Buffer.CONST Spec.SHA3.Constants.rotc_t (24ul <: FStar.UInt32.t) {LowStar.ConstBuffer.qual_of c == LowStar.ConstBuffer.IMMUTABLE}) {Lib.Buffer.witnessed x Spec.SHA3.Constants.keccak_rotc /\ Lib.Buffer.recallable x}
Prims.Tot
[ "total" ]
[]
[ "Lib.Buffer.createL_global", "Spec.SHA3.Constants.rotc_t", "Spec.SHA3.Constants.rotc_list", "Lib.Buffer.glbuffer", "Lib.IntTypes.size", "FStar.Pervasives.normalize_term", "Lib.IntTypes.size_nat", "FStar.List.Tot.Base.length" ]
[]
false
false
false
false
false
let keccak_rotc:x: glbuffer rotc_t 24ul {witnessed x keccak_rotc /\ recallable x} =
createL_global rotc_list
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.keccak_piln
val keccak_piln:x: glbuffer piln_t 24ul {witnessed x keccak_piln /\ recallable x}
val keccak_piln:x: glbuffer piln_t 24ul {witnessed x keccak_piln /\ recallable x}
let keccak_piln :x:glbuffer piln_t 24ul{witnessed x keccak_piln /\ recallable x} = createL_global piln_list
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 28, "end_line": 29, "start_col": 8, "start_line": 28 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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: (c: Lib.Buffer.lbuffer_t Lib.Buffer.CONST Spec.SHA3.Constants.piln_t (24ul <: FStar.UInt32.t) {LowStar.ConstBuffer.qual_of c == LowStar.ConstBuffer.IMMUTABLE}) {Lib.Buffer.witnessed x Spec.SHA3.Constants.keccak_piln /\ Lib.Buffer.recallable x}
Prims.Tot
[ "total" ]
[]
[ "Lib.Buffer.createL_global", "Spec.SHA3.Constants.piln_t", "Spec.SHA3.Constants.piln_list", "Lib.Buffer.glbuffer", "Lib.IntTypes.size", "FStar.Pervasives.normalize_term", "Lib.IntTypes.size_nat", "FStar.List.Tot.Base.length" ]
[]
false
false
false
false
false
let keccak_piln:x: glbuffer piln_t 24ul {witnessed x keccak_piln /\ recallable x} =
createL_global piln_list
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_theta
val state_theta: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_theta (as_seq h0 s))
val state_theta: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_theta (as_seq h0 s))
let state_theta s = push_frame (); let h0 = ST.get() in let _C = create 5ul (u64 0) in state_theta0 s _C; state_theta1 s _C; pop_frame()
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 148, "start_col": 0, "start_line": 143 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Impl.SHA3.state_theta1", "Hacl.Impl.SHA3.state_theta0", "Lib.Buffer.lbuffer_t", "Lib.Buffer.MUT", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Lib.Buffer...
[]
false
true
false
false
false
let state_theta s =
push_frame (); let h0 = ST.get () in let _C = create 5ul (u64 0) in state_theta0 s _C; state_theta1 s _C; pop_frame ()
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.storeState_inner
val storeState_inner: s:state -> j:size_t{v j < 25} -> block:lbuffer uint8 200ul -> Stack unit (requires fun h0 -> live h0 s /\ live h0 block /\ disjoint s block) (ensures fun h0 _ h1 -> modifies (loc block) h0 h1 /\ as_seq h1 block == S.storeState_inner (as_seq h0 s) (v j) (as_seq h0 blo...
val storeState_inner: s:state -> j:size_t{v j < 25} -> block:lbuffer uint8 200ul -> Stack unit (requires fun h0 -> live h0 s /\ live h0 block /\ disjoint s block) (ensures fun h0 _ h1 -> modifies (loc block) h0 h1 /\ as_seq h1 block == S.storeState_inner (as_seq h0 s) (v j) (as_seq h0 blo...
let storeState_inner s j block = let sj = s.(j) in let h0 = ST.get () in update_sub_f h0 block (j *! 8ul) 8ul (fun h -> Lib.ByteSequence.uint_to_bytes_le sj) (fun _ -> uint_to_bytes_le #U64 (sub block (j *! 8ul) 8ul) sj)
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 66, "end_line": 340, "start_col": 0, "start_line": 335 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> j: Lib.IntTypes.size_t{Lib.IntTypes.v j < 25} -> block: Lib.Buffer.lbuffer Lib.IntTypes.uint8 200ul -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Lib.Buffer.update_sub_f", "Lib.IntTypes.op_Star_Bang", "FStar.Monotonic.HyperSta...
[]
false
true
false
false
false
let storeState_inner s j block =
let sj = s.(j) in let h0 = ST.get () in update_sub_f h0 block (j *! 8ul) 8ul (fun h -> Lib.ByteSequence.uint_to_bytes_le sj) (fun _ -> uint_to_bytes_le #U64 (sub block (j *! 8ul) 8ul) sj)
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.keccak_rndc
val keccak_rndc:x: glbuffer pub_uint64 24ul {witnessed x keccak_rndc /\ recallable x}
val keccak_rndc:x: glbuffer pub_uint64 24ul {witnessed x keccak_rndc /\ recallable x}
let keccak_rndc :x:glbuffer pub_uint64 24ul{witnessed x keccak_rndc /\ recallable x} = createL_global rndc_list
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 28, "end_line": 32, "start_col": 8, "start_line": 31 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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: (c: Lib.Buffer.lbuffer_t Lib.Buffer.CONST (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.PUB) (24ul <: FStar.UInt32.t) {LowStar.ConstBuffer.qual_of c == LowStar.ConstBuffer.IMMUTABLE}) {Lib.Buffer.witnessed x Spec.SHA3.Constants.keccak_rndc /\ Lib.Buffer.recallable x}
Prims.Tot
[ "total" ]
[]
[ "Lib.Buffer.createL_global", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.PUB", "Spec.SHA3.Constants.rndc_list", "Lib.Buffer.glbuffer", "Lib.IntTypes.size", "FStar.Pervasives.normalize_term", "Lib.IntTypes.size_nat", "FStar.List.Tot.Base.length" ]
[]
false
false
false
false
false
let keccak_rndc:x: glbuffer pub_uint64 24ul {witnessed x keccak_rndc /\ recallable x} =
createL_global rndc_list
false
Pulse.Soundness.Common.fst
Pulse.Soundness.Common.elab_term_opt
val elab_term_opt : b: FStar.Pervasives.Native.option Pulse.Syntax.Base.term -> FStar.Pervasives.Native.option FStar.Stubs.Reflection.Types.term
let elab_term_opt (b:option term) = match b with | Some b -> Some (elab_term b) | None -> None
{ "file_name": "lib/steel/pulse/Pulse.Soundness.Common.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 16, "end_line": 44, "start_col": 0, "start_line": 41 }
(* Copyright 2023 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": [ "Pulse.Typing.fst.checked", "Pulse.Syntax.fst.checked", "Pulse.Reflection.Util.fst.checked", "Pulse.Elaborate.fsti.checked", "prims.fst.checked", "FStar.Tactics.V2.fst.checked", "FStar.Set.fsti.checked", "FStar.Reflection.V2.fst.checked", ...
[ { "abbrev": false, "full_module": "Pulse.Elaborate", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Typing", "short_module": null }, { "abbrev": false, "full_module": "Pulse.Reflection.Util", "short_module": null }, { "abbrev": false, "full_m...
{ "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: FStar.Pervasives.Native.option Pulse.Syntax.Base.term -> FStar.Pervasives.Native.option FStar.Stubs.Reflection.Types.term
Prims.Tot
[ "total" ]
[]
[ "FStar.Pervasives.Native.option", "Pulse.Syntax.Base.term", "FStar.Pervasives.Native.Some", "FStar.Stubs.Reflection.Types.term", "Pulse.Elaborate.Pure.elab_term", "FStar.Pervasives.Native.None" ]
[]
false
false
false
true
false
let elab_term_opt (b: option term) =
match b with | Some b -> Some (elab_term b) | None -> None
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.squeeze_inner
val squeeze_inner: rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> outputByteLen:size_t -> s:state -> output:lbuffer uint8 rateInBytes -> i:size_t{v i < v (outputByteLen /. rateInBytes)} -> Stack unit (requires fun h0 -> live h0 s /\ live h0 output /\ disjoint s output) (ensures ...
val squeeze_inner: rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> outputByteLen:size_t -> s:state -> output:lbuffer uint8 rateInBytes -> i:size_t{v i < v (outputByteLen /. rateInBytes)} -> Stack unit (requires fun h0 -> live h0 s /\ live h0 output /\ disjoint s output) (ensures ...
let squeeze_inner rateInBytes outputByteLen s output i = storeState rateInBytes s output; state_permute s
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 17, "end_line": 474, "start_col": 0, "start_line": 472 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
rateInBytes: Lib.IntTypes.size_t{0 < Lib.IntTypes.v rateInBytes /\ Lib.IntTypes.v rateInBytes <= 200} -> outputByteLen: Lib.IntTypes.size_t -> s: Hacl.Impl.SHA3.state -> output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 rateInBytes -> i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v (outp...
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "Hacl.Impl.SHA3.state", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.IntTypes.op_Slash_Dot", "Hacl.Impl.SHA3.state_permute", "Pr...
[]
false
true
false
false
false
let squeeze_inner rateInBytes outputByteLen s output i =
storeState rateInBytes s output; state_permute s
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_chi
val state_chi: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_chi (as_seq h0 s))
val state_chi: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_chi (as_seq h0 s))
let state_chi st = let h0 = ST.get() in [@ inline_let] let spec h0 = Equiv.state_chi_inner in let h0 = ST.get () in loop1 h0 5ul st spec (fun y -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 st) (v y); state_chi_inner st y ); let h1 = ST.get() in assert(as_seq h1 st == Equiv.state_chi (as_se...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 264, "start_col": 0, "start_line": 252 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Spec.SHA3.Equivalence.state_chi_equivalence", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Prims.unit", "Prims._assert", "Prims.eq2", "Lib.Sequence.lseq", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Spec....
[]
false
true
false
false
false
let state_chi st =
let h0 = ST.get () in [@@ inline_let ]let spec h0 = Equiv.state_chi_inner in let h0 = ST.get () in loop1 h0 5ul st spec (fun y -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 st) (v y); state_chi_inner st y); let h1 = ST.get () in assert (as_seq h1 st == Equiv.state_chi (as_seq h0 st)); Equiv.state_ch...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.absorb
val absorb: s:state -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> inputByteLen:size_t -> input:lbuffer uint8 inputByteLen -> delimitedSuffix:byte_t -> Stack unit (requires fun h0 -> live h0 s /\ live h0 input /\ disjoint s input) (ensures fun h0 _ h1 -> modifies (loc s...
val absorb: s:state -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> inputByteLen:size_t -> input:lbuffer uint8 inputByteLen -> delimitedSuffix:byte_t -> Stack unit (requires fun h0 -> live h0 s /\ live h0 input /\ disjoint s input) (ensures fun h0 _ h1 -> modifies (loc s...
let absorb s rateInBytes inputByteLen input delimitedSuffix = let n_blocks = inputByteLen /. rateInBytes in let rem = inputByteLen %. rateInBytes in loop_blocks rateInBytes n_blocks rem input (S.absorb_inner (v rateInBytes)) (S.absorb_last delimitedSuffix (v rateInBytes)) (absorb_inner rateInBytes) (absor...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 457, "start_col": 0, "start_line": 450 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> rateInBytes: Lib.IntTypes.size_t{0 < Lib.IntTypes.v rateInBytes /\ Lib.IntTypes.v rateInBytes <= 200} -> inputByteLen: Lib.IntTypes.size_t -> input: Lib.Buffer.lbuffer Lib.IntTypes.uint8 inputByteLen -> delimitedSuffix: Lib.IntTypes.byte_t -> FStar.HyperStack.ST.S...
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.IntTypes.byte_t", "Lib.Buffer.loop_blocks", "Lib.IntTypes.u...
[]
false
true
false
false
false
let absorb s rateInBytes inputByteLen input delimitedSuffix =
let n_blocks = inputByteLen /. rateInBytes in let rem = inputByteLen %. rateInBytes in loop_blocks rateInBytes n_blocks rem input (S.absorb_inner (v rateInBytes)) (S.absorb_last delimitedSuffix (v rateInBytes)) (absorb_inner rateInBytes) (absorb_last delimitedSuffix rateInBytes) s
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_theta_inner_s
val state_theta_inner_s: _C:lbuffer uint64 5ul -> x:index -> s:state -> Stack unit (requires fun h0 -> live h0 s /\ live h0 _C /\ disjoint _C s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_theta_inner_s (as_seq h0 _C) (v x) (as_seq h0 s))
val state_theta_inner_s: _C:lbuffer uint64 5ul -> x:index -> s:state -> Stack unit (requires fun h0 -> live h0 s /\ live h0 _C /\ disjoint _C s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_theta_inner_s (as_seq h0 _C) (v x) (as_seq h0 s))
let state_theta_inner_s _C x s = let _D = _C.((x +. 4ul) %. 5ul) ^. rotl _C.((x +. 1ul) %. 5ul) 1ul in [@ inline_let] let spec h0 = S.state_theta_inner_s_inner (v x) _D in let h0 = ST.get () in loop1 h0 5ul s spec (fun y -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 s) (v y); set s x y (get s x y ^....
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 114, "start_col": 0, "start_line": 105 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
_C: Lib.Buffer.lbuffer Lib.IntTypes.uint64 5ul -> x: Hacl.Impl.SHA3.index -> s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.SHA3.index", "Hacl.Impl.SHA3.state", "Lib.Buffer.loop1", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Hacl.Impl.SHA3.set", "Prims.unit"...
[]
false
true
false
false
false
let state_theta_inner_s _C x s =
let _D = _C.((x +. 4ul) %. 5ul) ^. rotl _C.((x +. 1ul) %. 5ul) 1ul in [@@ inline_let ]let spec h0 = S.state_theta_inner_s_inner (v x) _D in let h0 = ST.get () in loop1 h0 5ul s spec (fun y -> Loop.unfold_repeati 5 (spec h0) (as_seq h0 s) (v y); set s x y (get s x y ^. _D))
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.storeState
val storeState: rateInBytes:size_t{v rateInBytes <= 200} -> s:state -> res:lbuffer uint8 rateInBytes -> Stack unit (requires fun h0 -> live h0 s /\ live h0 res) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.storeState (v rateInBytes) (as_seq h0 s))
val storeState: rateInBytes:size_t{v rateInBytes <= 200} -> s:state -> res:lbuffer uint8 rateInBytes -> Stack unit (requires fun h0 -> live h0 s /\ live h0 res) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.storeState (v rateInBytes) (as_seq h0 s))
let storeState rateInBytes s res = push_frame(); let h0 = ST.get() in let block = create 200ul (u8 0) in [@ inline_let] let spec h0 = S.storeState_inner (as_seq h0 s) in let h0 = ST.get () in loop1 h0 25ul block spec (fun j -> Loop.unfold_repeati 25 (spec h0) (as_seq h0 block) (v j); storeState_...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 364, "start_col": 0, "start_line": 351 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
rateInBytes: Lib.IntTypes.size_t{Lib.IntTypes.v rateInBytes <= 200} -> s: Hacl.Impl.SHA3.state -> res: Lib.Buffer.lbuffer Lib.IntTypes.uint8 rateInBytes -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Hacl.Impl.SHA3.state", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Lib.Buffer.copy", "Lib.Buffer.MUT", "Lib.Buffer.lbuf...
[]
false
true
false
false
false
let storeState rateInBytes s res =
push_frame (); let h0 = ST.get () in let block = create 200ul (u8 0) in [@@ inline_let ]let spec h0 = S.storeState_inner (as_seq h0 s) in let h0 = ST.get () in loop1 h0 25ul block spec (fun j -> Loop.unfold_repeati 25 (spec h0) (as_seq h0 block) (v j); storeState_inner s j block); copy res (sub bloc...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_pi_rho_inner
val state_pi_rho_inner: i:size_t{v i < 24} -> current:lbuffer uint64 1ul -> s:state -> Stack unit (requires fun h -> live h s /\ live h current /\ disjoint current s) (ensures fun h0 _ h1 -> modifies (loc_union (loc s) (loc current)) h0 h1 /\ (let c', s' = S.state_pi_rho_inner (v i) (bget...
val state_pi_rho_inner: i:size_t{v i < 24} -> current:lbuffer uint64 1ul -> s:state -> Stack unit (requires fun h -> live h s /\ live h current /\ disjoint current s) (ensures fun h0 _ h1 -> modifies (loc_union (loc s) (loc current)) h0 h1 /\ (let c', s' = S.state_pi_rho_inner (v i) (bget...
let state_pi_rho_inner i current s = assert_norm (List.Tot.length piln_list == 24); let h0 = ST.get () in recall_contents keccak_rotc Spec.SHA3.Constants.keccak_rotc; recall_contents keccak_piln Spec.SHA3.Constants.keccak_piln; index_map v piln_list (v i); let _Y = keccak_piln.(i) in let r = keccak_rotc.(...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 23, "end_line": 187, "start_col": 0, "start_line": 177 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < 24} -> current: Lib.Buffer.lbuffer Lib.IntTypes.uint64 1ul -> s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.SHA3.state", "Lib.Buffer.op_Array_Assignment", "Prims.unit", "Lib.IntTypes.int_t", "Lib.Int...
[]
false
true
false
false
false
let state_pi_rho_inner i current s =
assert_norm (List.Tot.length piln_list == 24); let h0 = ST.get () in recall_contents keccak_rotc Spec.SHA3.Constants.keccak_rotc; recall_contents keccak_piln Spec.SHA3.Constants.keccak_piln; index_map v piln_list (v i); let _Y = keccak_piln.(i) in let r = keccak_rotc.(i) in let temp = s.(_Y) in s.(_Y) <- rotl current.(...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.keccak
val keccak: rate:size_t{v rate % 8 == 0 /\ v rate / 8 > 0 /\ v rate <= 1600} -> capacity:size_t{v capacity + v rate == 1600} -> inputByteLen:size_t -> input:lbuffer uint8 inputByteLen -> delimitedSuffix:byte_t -> outputByteLen:size_t -> output:lbuffer uint8 outputByteLen -> Stack unit (requires fu...
val keccak: rate:size_t{v rate % 8 == 0 /\ v rate / 8 > 0 /\ v rate <= 1600} -> capacity:size_t{v capacity + v rate == 1600} -> inputByteLen:size_t -> input:lbuffer uint8 inputByteLen -> delimitedSuffix:byte_t -> outputByteLen:size_t -> output:lbuffer uint8 outputByteLen -> Stack unit (requires fu...
let keccak rate capacity inputByteLen input delimitedSuffix outputByteLen output = push_frame(); let rateInBytes = rate /. size 8 in let s:state = create 25ul (u64 0) in absorb s rateInBytes inputByteLen input delimitedSuffix; squeeze s rateInBytes outputByteLen output; pop_frame()
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 532, "start_col": 0, "start_line": 526 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
rate: Lib.IntTypes.size_t {Lib.IntTypes.v rate % 8 == 0 /\ Lib.IntTypes.v rate / 8 > 0 /\ Lib.IntTypes.v rate <= 1600} -> capacity: Lib.IntTypes.size_t{Lib.IntTypes.v capacity + Lib.IntTypes.v rate == 1600} -> inputByteLen: Lib.IntTypes.size_t -> input: Lib.Buffer.lbuffer Lib.IntTypes.uin...
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.size_t", "Prims.l_and", "Prims.eq2", "Prims.int", "Prims.op_Modulus", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.b2t", "Prims.op_GreaterThan", "Prims.op_Division", "Prims.op_LessThanOrEqual", "Prims.op_Addition", "Lib.Buffer.lbuffer", "Lib.IntTypes.uin...
[]
false
true
false
false
false
let keccak rate capacity inputByteLen input delimitedSuffix outputByteLen output =
push_frame (); let rateInBytes = rate /. size 8 in let s:state = create 25ul (u64 0) in absorb s rateInBytes inputByteLen input delimitedSuffix; squeeze s rateInBytes outputByteLen output; pop_frame ()
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.loadState
val loadState: rateInBytes:size_t{v rateInBytes <= 200} -> input:lbuffer uint8 rateInBytes -> s:state -> Stack unit (requires fun h -> live h input /\ live h s /\ disjoint input s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.loadState (v rateInBytes) (as_seq h0 inpu...
val loadState: rateInBytes:size_t{v rateInBytes <= 200} -> input:lbuffer uint8 rateInBytes -> s:state -> Stack unit (requires fun h -> live h input /\ live h s /\ disjoint input s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.loadState (v rateInBytes) (as_seq h0 inpu...
let loadState rateInBytes input s = push_frame(); let h0 = ST.get() in let block = create 200ul (u8 0) in update_sub block 0ul rateInBytes input; [@ inline_let] let spec h0 = S.loadState_inner (as_seq h0 block) in let h0 = ST.get () in loop1 h0 25ul s spec (fun j -> Loop.unfold_repeati 25 (spec h0...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 323, "start_col": 0, "start_line": 308 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
rateInBytes: Lib.IntTypes.size_t{Lib.IntTypes.v rateInBytes <= 200} -> input: Lib.Buffer.lbuffer Lib.IntTypes.uint8 rateInBytes -> s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Hacl.Impl.SHA3.state", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Lib.Buffer.loop1", "Lib.IntTypes.uint64", "FStar.UIn...
[]
false
true
false
false
false
let loadState rateInBytes input s =
push_frame (); let h0 = ST.get () in let block = create 200ul (u8 0) in update_sub block 0ul rateInBytes input; [@@ inline_let ]let spec h0 = S.loadState_inner (as_seq h0 block) in let h0 = ST.get () in loop1 h0 25ul s spec (fun j -> Loop.unfold_repeati 25 (spec h0) (as_seq h0 s) (v j); let h0 = ST....
false
Spec.SHA3.Equivalence.fst
Spec.SHA3.Equivalence.state_chi_inner_equivalence0
val state_chi_inner_equivalence0 (st_old: state) (y: index) (st: state) : Lemma (requires (forall y'. (y' >= y /\ y' < 5) ==> get st_old 0 y' == get st 0 y' /\ get st_old 1 y' == get st 1 y' /\ get st_old 2 y' == get st 2 y' /\ get st_old 3 y' == get st 3 y' /\ ...
val state_chi_inner_equivalence0 (st_old: state) (y: index) (st: state) : Lemma (requires (forall y'. (y' >= y /\ y' < 5) ==> get st_old 0 y' == get st 0 y' /\ get st_old 1 y' == get st 1 y' /\ get st_old 2 y' == get st 2 y' /\ get st_old 3 y' == get st 3 y' /\ ...
let state_chi_inner_equivalence0 (st_old:state) (y:index) (st:state) : Lemma (requires (forall y'. (y' >= y /\ y' < 5) ==> get st_old 0 y' == get st 0 y' /\ get st_old 1 y' == get st 1 y' /\ get st_old 2 y' == get st 2 y' /\ get st_old 3 y' =...
{ "file_name": "specs/lemmas/Spec.SHA3.Equivalence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 11, "end_line": 48, "start_col": 0, "start_line": 30 }
module Spec.SHA3.Equivalence open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open FStar.Mul open Lib.LoopCombinators open Spec.SHA3.Constants open Spec.SHA3 #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let state_chi_inner (y:index) (s:state) : Tot state = let v0 = get s 0 y ^. ((lognot (ge...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "FStar.Pervasives.fsti.checked", ...
[ { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3.Constants", "short_module": null }, { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
st_old: Spec.SHA3.state -> y: Spec.SHA3.index -> st: Spec.SHA3.state -> FStar.Pervasives.Lemma (requires forall (y': i: Prims.int { i >= 0 /\ i <= Lib.IntTypes.max_size_t /\ i < 5 /\ (i >= 0) /\ (i <= Lib.IntTypes.max_size_t) /\ (i < 5) /\ (i >...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.SHA3.state", "Spec.SHA3.index", "Prims.unit", "Prims._assert", "Prims.eq2", "Lib.LoopCombinators.repeati", "Spec.SHA3.state_chi_inner0", "Lib.LoopCombinators.unfold_repeati", "Lib.LoopCombinators.eq_repeati0", "Prims.l_Forall", "Prims.int", "Prims.l_and", "Prims.b2t", "Prims.op_Great...
[]
true
false
true
false
false
let state_chi_inner_equivalence0 (st_old: state) (y: index) (st: state) : Lemma (requires (forall y'. (y' >= y /\ y' < 5) ==> get st_old 0 y' == get st 0 y' /\ get st_old 1 y' == get st 1 y' /\ get st_old 2 y' == get st 2 y' /\ get st_old 3 y' == get st 3 y' /\ ...
Lib.LoopCombinators.eq_repeati0 5 (state_chi_inner0 st_old y) st; Lib.LoopCombinators.unfold_repeati 5 (state_chi_inner0 st_old y) st 0; Lib.LoopCombinators.unfold_repeati 5 (state_chi_inner0 st_old y) st 1; Lib.LoopCombinators.unfold_repeati 5 (state_chi_inner0 st_old y) st 2; Lib.LoopCombinators.unfold_repeati 5 (sta...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.absorb_next
val absorb_next: s:state -> rateInBytes:size_t{v rateInBytes > 0 /\ v rateInBytes <= 200} -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.absorb_next (as_seq h0 s) (v rateInBytes))
val absorb_next: s:state -> rateInBytes:size_t{v rateInBytes > 0 /\ v rateInBytes <= 200} -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.absorb_next (as_seq h0 s) (v rateInBytes))
let absorb_next s rateInBytes = push_frame(); let h0 = ST.get() in let nextBlock_ = create 200ul (u8 0) in let nextBlock = sub nextBlock_ 0ul rateInBytes in let h1 = ST.get () in assert (as_seq h1 nextBlock `Seq.equal` Lib.Sequence.create (v rateInBytes) (u8 0)); nextBlock.(rateInBytes -! 1ul) <- u8 0x80;...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 388, "start_col": 0, "start_line": 378 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> rateInBytes: Lib.IntTypes.size_t{Lib.IntTypes.v rateInBytes > 0 /\ Lib.IntTypes.v rateInBytes <= 200} -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Impl.SHA3.state_permute", "Hacl.Impl.SHA3.loadState", ...
[]
false
true
false
false
false
let absorb_next s rateInBytes =
push_frame (); let h0 = ST.get () in let nextBlock_ = create 200ul (u8 0) in let nextBlock = sub nextBlock_ 0ul rateInBytes in let h1 = ST.get () in assert ((as_seq h1 nextBlock) `Seq.equal` (Lib.Sequence.create (v rateInBytes) (u8 0))); nextBlock.(rateInBytes -! 1ul) <- u8 0x80; loadState rateInBytes nextBlock s; stat...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_chi_inner
val state_chi_inner: st:state -> y:index -> Stack unit (requires fun h0 -> live h0 st) (ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\ as_seq h1 st == Equiv.state_chi_inner (v y) (as_seq h0 st))
val state_chi_inner: st:state -> y:index -> Stack unit (requires fun h0 -> live h0 st) (ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\ as_seq h1 st == Equiv.state_chi_inner (v y) (as_seq h0 st))
let state_chi_inner st y = let h0 = ST.get() in let v0 = get st 0ul y ^. ((lognot (get st 1ul y)) &. get st 2ul y) in let v1 = get st 1ul y ^. ((lognot (get st 2ul y)) &. get st 3ul y) in let v2 = get st 2ul y ^. ((lognot (get st 3ul y)) &. get st 4ul y) in let v3 = get st 3ul y ^. ((lognot (get st 4ul y)...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 69, "end_line": 242, "start_col": 0, "start_line": 228 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
st: Hacl.Impl.SHA3.state -> y: Hacl.Impl.SHA3.index -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Hacl.Impl.SHA3.index", "Prims._assert", "Prims.eq2", "Lib.Sequence.lseq", "Lib.IntTypes.uint64", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "FStar.UInt32.__uint_to_t", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Spec.SHA3.Equivalence.state_chi_inner", "P...
[]
false
true
false
false
false
let state_chi_inner st y =
let h0 = ST.get () in let v0 = get st 0ul y ^. ((lognot (get st 1ul y)) &. get st 2ul y) in let v1 = get st 1ul y ^. ((lognot (get st 2ul y)) &. get st 3ul y) in let v2 = get st 2ul y ^. ((lognot (get st 3ul y)) &. get st 4ul y) in let v3 = get st 3ul y ^. ((lognot (get st 4ul y)) &. get st 0ul y) in let v4 = get st 4u...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.state_pi_rho
val state_pi_rho: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_pi_rho (as_seq h0 s))
val state_pi_rho: s:state -> Stack unit (requires fun h -> live h s) (ensures fun h0 _ h1 -> modifies (loc s) h0 h1 /\ as_seq h1 s == S.state_pi_rho (as_seq h0 s))
let state_pi_rho s = push_frame(); let x = get s 1ul 0ul in let h0 = ST.get() in let current = create 1ul x in let h1 = ST.get () in assert (bget h1 current 0 == S.get (as_seq h0 s) 1 0); [@ inline_let] let refl h i : GTot (uint64 & S.state) = bget h current 0, as_seq h s in [@ inline_let] let footp...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 216, "start_col": 0, "start_line": 197 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Lib.Buffer.loop", "FStar.UInt32.__uint_to_t", "Spec.SHA3.state_pi_rho_s", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Hacl.Impl.SHA3.state_pi_rho_in...
[]
false
true
false
false
false
let state_pi_rho s =
push_frame (); let x = get s 1ul 0ul in let h0 = ST.get () in let current = create 1ul x in let h1 = ST.get () in assert (bget h1 current 0 == S.get (as_seq h0 s) 1 0); [@@ inline_let ]let refl h i : GTot (uint64 & S.state) = bget h current 0, as_seq h s in [@@ inline_let ]let footprint i = loc_union (loc current) (loc...
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.squeeze
val squeeze: s:state -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> outputByteLen:size_t -> output:lbuffer uint8 outputByteLen -> Stack unit (requires fun h0 -> live h0 s /\ live h0 output /\ disjoint s output) (ensures fun h0 _ h1 -> modifies2 s output h0 h1 /\ as_...
val squeeze: s:state -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> outputByteLen:size_t -> output:lbuffer uint8 outputByteLen -> Stack unit (requires fun h0 -> live h0 s /\ live h0 output /\ disjoint s output) (ensures fun h0 _ h1 -> modifies2 s output h0 h1 /\ as_...
let squeeze s rateInBytes outputByteLen output = let outBlocks = outputByteLen /. rateInBytes in let remOut = outputByteLen %. rateInBytes in assert_spinoff (v outputByteLen - v remOut == v outBlocks * v rateInBytes); let last = sub output (outputByteLen -. remOut) remOut in [@ inline_let] let a_spec (i:nat...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 98, "end_line": 510, "start_col": 0, "start_line": 491 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
s: Hacl.Impl.SHA3.state -> rateInBytes: Lib.IntTypes.size_t{0 < Lib.IntTypes.v rateInBytes /\ Lib.IntTypes.v rateInBytes <= 200} -> outputByteLen: Lib.IntTypes.size_t -> output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 outputByteLen -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.SHA3.state", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.Pervasives.norm_spec", "Prims.Cons", "FStar.Pervasives.no...
[]
false
true
false
false
false
let squeeze s rateInBytes outputByteLen output =
let outBlocks = outputByteLen /. rateInBytes in let remOut = outputByteLen %. rateInBytes in assert_spinoff (v outputByteLen - v remOut == v outBlocks * v rateInBytes); let last = sub output (outputByteLen -. remOut) remOut in [@@ inline_let ]let a_spec (i: nat{i <= v outputByteLen / v rateInBytes}) = S.state in let bl...
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.nat_mod_comm_monoid
val nat_mod_comm_monoid : Lib.Exponentiation.Definition.comm_monoid (Lib.NatMod.nat_mod Spec.K256.PointOps.q)
let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 54, "end_line": 12, "start_col": 0, "start_line": 12 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
Lib.Exponentiation.Definition.comm_monoid (Lib.NatMod.nat_mod Spec.K256.PointOps.q)
Prims.Tot
[ "total" ]
[]
[ "Lib.NatMod.mk_nat_mod_comm_monoid", "Spec.K256.PointOps.q" ]
[]
false
false
false
true
false
let nat_mod_comm_monoid =
M.mk_nat_mod_comm_monoid S.q
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qsquare_times
val qsquare_times (a: S.qelem) (b: nat) : S.qelem
val qsquare_times (a: S.qelem) (b: nat) : S.qelem
let qsquare_times (a:S.qelem) (b:nat) : S.qelem = SE.exp_pow2 mk_nat_mod_concrete_ops a b
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 41, "end_line": 37, "start_col": 0, "start_line": 36 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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: Spec.K256.PointOps.qelem -> b: Prims.nat -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Prims.nat", "Spec.Exponentiation.exp_pow2", "Hacl.Spec.K256.Qinv.mk_nat_mod_concrete_ops" ]
[]
false
false
false
true
false
let qsquare_times (a: S.qelem) (b: nat) : S.qelem =
SE.exp_pow2 mk_nat_mod_concrete_ops a b
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.set_one
val set_one: #s:field_spec -> f:felem s -> Stack unit (requires fun h -> live h f) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_nat h1 f == 1)
val set_one: #s:field_spec -> f:felem s -> Stack unit (requires fun h -> live h f) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_nat h1 f == 1)
let set_one #s f = match s with | M51 -> F51.set_one f | M64 -> F64.set_one f
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 24, "end_line": 95, "start_col": 0, "start_line": 92 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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
f: Hacl.Impl.Curve25519.Fields.Core.felem s -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Hacl.Impl.Curve25519.Fields.Core.felem", "Hacl.Impl.Curve25519.Field51.set_one", "Prims.unit", "Hacl.Impl.Curve25519.Field64.set_one" ]
[]
false
true
false
false
false
let set_one #s f =
match s with | M51 -> F51.set_one f | M64 -> F64.set_one f
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r0_r1
val qinv_r0_r1 (x14: S.qelem) : S.qelem
val qinv_r0_r1 (x14: S.qelem) : S.qelem
let qinv_r0_r1 x14 = let x28 = S.qmul (qsquare_times x14 14) x14 in let x56 = S.qmul (qsquare_times x28 28) x28 in let r0 = S.qmul (qsquare_times x56 56) x56 in let r1 = S.qmul (qsquare_times r0 14) x14 in r1
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 59, "start_col": 0, "start_line": 54 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
x14: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r0_r1 x14 =
let x28 = S.qmul (qsquare_times x14 14) x14 in let x56 = S.qmul (qsquare_times x28 28) x28 in let r0 = S.qmul (qsquare_times x56 56) x56 in let r1 = S.qmul (qsquare_times r0 14) x14 in r1
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.set_zero
val set_zero: #s:field_spec -> f:felem s -> Stack unit (requires fun h -> live h f) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_nat h1 f == 0)
val set_zero: #s:field_spec -> f:felem s -> Stack unit (requires fun h -> live h f) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_nat h1 f == 0)
let set_zero #s f = match s with | M51 -> F51.set_zero f | M64 -> F64.set_zero f
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 25, "end_line": 81, "start_col": 0, "start_line": 78 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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
f: Hacl.Impl.Curve25519.Fields.Core.felem s -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Hacl.Impl.Curve25519.Fields.Core.felem", "Hacl.Impl.Curve25519.Field51.set_zero", "Prims.unit", "Hacl.Impl.Curve25519.Field64.set_zero" ]
[]
false
true
false
false
false
let set_zero #s f =
match s with | M51 -> F51.set_zero f | M64 -> F64.set_zero f
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc_ss
val crypto_kem_enc_ss: a:frodo_alg -> k:lbytes (crypto_bytes a) -> ct:lbytes (crypto_ciphertextbytes a) -> lbytes (crypto_bytes a)
val crypto_kem_enc_ss: a:frodo_alg -> k:lbytes (crypto_bytes a) -> ct:lbytes (crypto_ciphertextbytes a) -> lbytes (crypto_bytes a)
let crypto_kem_enc_ss a k ct = let shake_input_ss = concat ct k in let ss = frodo_shake a (crypto_ciphertextbytes a + crypto_bytes a) shake_input_ss (crypto_bytes a) in ss
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 136, "start_col": 0, "start_line": 133 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> k: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_bytes a) -> ct: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_ciphertextbytes a) -> Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_bytes a)
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.crypto_bytes", "Spec.Frodo.Params.crypto_ciphertextbytes", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Spec.Frodo.Params.frodo_shake", "Prims.op_Addition", "Prims.eq2", "FStar.Se...
[]
false
false
false
false
false
let crypto_kem_enc_ss a k ct =
let shake_input_ss = concat ct k in let ss = frodo_shake a (crypto_ciphertextbytes a + crypto_bytes a) shake_input_ss (crypto_bytes a) in ss
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.mul_mod
val mul_mod : SE.mul_st S.qelem mk_to_nat_mod_comm_monoid
val mul_mod : SE.mul_st S.qelem mk_to_nat_mod_comm_monoid
let mul_mod x y = S.qmul x y
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 28, "end_line": 24, "start_col": 0, "start_line": 24 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
Spec.Exponentiation.mul_st Spec.K256.PointOps.qelem Hacl.Spec.K256.Qinv.mk_to_nat_mod_comm_monoid
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul" ]
[]
false
false
false
true
false
let mul_mod x y =
S.qmul x y
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc
val crypto_kem_enc: a:frodo_alg -> gen_a:frodo_gen_a -> state:Spec.Frodo.Random.state_t -> pk:lbytes (crypto_publickeybytes a) -> lbytes (crypto_ciphertextbytes a) & lbytes (crypto_bytes a)
val crypto_kem_enc: a:frodo_alg -> gen_a:frodo_gen_a -> state:Spec.Frodo.Random.state_t -> pk:lbytes (crypto_publickeybytes a) -> lbytes (crypto_ciphertextbytes a) & lbytes (crypto_bytes a)
let crypto_kem_enc a gen_a state pk = let mu, _ = Spec.Frodo.Random.randombytes_ state (bytes_mu a) in crypto_kem_enc_ a gen_a mu pk
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 31, "end_line": 178, "start_col": 0, "start_line": 176 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a -> state: Spec.Frodo.Random.state_t -> pk: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_publickeybytes a) -> Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_ciphertextbytes a) * Lib.ByteSequence.lbytes (Spec.Frodo.Param...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Spec.Frodo.Random.state_t", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.crypto_publickeybytes", "Lib.Sequence.lseq", "Lib.IntTypes.uint8", "Spec.Frodo.Params.bytes_mu", "Spec.Frodo.KEM.Encaps.crypto_kem_enc_", "FStar.Pervasives.Nat...
[]
false
false
false
false
false
let crypto_kem_enc a gen_a state pk =
let mu, _ = Spec.Frodo.Random.randombytes_ state (bytes_mu a) in crypto_kem_enc_ a gen_a mu pk
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r24_r25
val qinv_r24_r25 (r23 x_1 x6: S.qelem) : S.qelem
val qinv_r24_r25 (r23 x_1 x6: S.qelem) : S.qelem
let qinv_r24_r25 r23 x_1 x6 = let r24 = S.qmul (qsquare_times r23 6) x_1 in let r25 = S.qmul (qsquare_times r24 8) x6 in r25
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.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": 100 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
r23: Spec.K256.PointOps.qelem -> x_1: Spec.K256.PointOps.qelem -> x6: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r24_r25 r23 x_1 x6 =
let r24 = S.qmul (qsquare_times r23 6) x_1 in let r25 = S.qmul (qsquare_times r24 8) x6 in r25
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r2_r8
val qinv_r2_r8 (r1 x_101 x_111 x_1011: S.qelem) : S.qelem
val qinv_r2_r8 (r1 x_101 x_111 x_1011: S.qelem) : S.qelem
let qinv_r2_r8 r1 x_101 x_111 x_1011 = let r2 = S.qmul (qsquare_times r1 3) x_101 in let r3 = S.qmul (qsquare_times r2 4) x_111 in let r4 = S.qmul (qsquare_times r3 4) x_101 in let r5 = S.qmul (qsquare_times r4 5) x_1011 in let r6 = S.qmul (qsquare_times r5 4) x_1011 in let r7 = S.qmul (qsquare_times r6 4) ...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 71, "start_col": 0, "start_line": 63 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
r1: Spec.K256.PointOps.qelem -> x_101: Spec.K256.PointOps.qelem -> x_111: Spec.K256.PointOps.qelem -> x_1011: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r2_r8 r1 x_101 x_111 x_1011 =
let r2 = S.qmul (qsquare_times r1 3) x_101 in let r3 = S.qmul (qsquare_times r2 4) x_111 in let r4 = S.qmul (qsquare_times r3 4) x_101 in let r5 = S.qmul (qsquare_times r4 5) x_1011 in let r6 = S.qmul (qsquare_times r5 4) x_1011 in let r7 = S.qmul (qsquare_times r6 4) x_111 in let r8 = S.qmul (qsquare_times r7 5) x_111...
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.frodo_mul_add_sb_plus_e_plus_mu
val frodo_mul_add_sb_plus_e_plus_mu: a:frodo_alg -> mu:lbytes (bytes_mu a) -> b:lbytes (publicmatrixbytes_len a) -> sp_matrix:matrix params_nbar (params_n a) -> epp_matrix:matrix params_nbar params_nbar -> matrix params_nbar params_nbar
val frodo_mul_add_sb_plus_e_plus_mu: a:frodo_alg -> mu:lbytes (bytes_mu a) -> b:lbytes (publicmatrixbytes_len a) -> sp_matrix:matrix params_nbar (params_n a) -> epp_matrix:matrix params_nbar params_nbar -> matrix params_nbar params_nbar
let frodo_mul_add_sb_plus_e_plus_mu a mu b sp_matrix epp_matrix = let v_matrix = frodo_mul_add_sb_plus_e a b sp_matrix epp_matrix in let mu_encode = frodo_key_encode (params_logq a) (params_extracted_bits a) params_nbar mu in let v_matrix = Matrix.add v_matrix mu_encode in v_matrix
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 10, "end_line": 75, "start_col": 0, "start_line": 71 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> mu: Lib.ByteSequence.lbytes (Spec.Frodo.Params.bytes_mu a) -> b: Lib.ByteSequence.lbytes (Spec.Frodo.Params.publicmatrixbytes_len a) -> sp_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a) -> epp_matrix: Spec.Matrix.matrix Spec...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_mu", "Spec.Frodo.Params.publicmatrixbytes_len", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U16", "Lib.IntTypes.SEC...
[]
false
false
false
false
false
let frodo_mul_add_sb_plus_e_plus_mu a mu b sp_matrix epp_matrix =
let v_matrix = frodo_mul_add_sb_plus_e a b sp_matrix epp_matrix in let mu_encode = frodo_key_encode (params_logq a) (params_extracted_bits a) params_nbar mu in let v_matrix = Matrix.add v_matrix mu_encode in v_matrix
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.frodo_mul_add_sa_plus_e
val frodo_mul_add_sa_plus_e: a:frodo_alg -> gen_a:frodo_gen_a -> seed_a:lbytes bytes_seed_a -> sp_matrix:matrix params_nbar (params_n a) -> ep_matrix:matrix params_nbar (params_n a) -> matrix params_nbar (params_n a)
val frodo_mul_add_sa_plus_e: a:frodo_alg -> gen_a:frodo_gen_a -> seed_a:lbytes bytes_seed_a -> sp_matrix:matrix params_nbar (params_n a) -> ep_matrix:matrix params_nbar (params_n a) -> matrix params_nbar (params_n a)
let frodo_mul_add_sa_plus_e a gen_a seed_a sp_matrix ep_matrix = let a_matrix = frodo_gen_matrix gen_a (params_n a) seed_a in let b_matrix = Matrix.add (Matrix.mul sp_matrix a_matrix) ep_matrix in b_matrix
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 10, "end_line": 33, "start_col": 0, "start_line": 30 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a -> seed_a: Lib.ByteSequence.lbytes Spec.Frodo.Params.bytes_seed_a -> sp_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a) -> ep_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_seed_a", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U16", "Lib.IntTypes.SEC", "...
[]
false
false
false
false
false
let frodo_mul_add_sa_plus_e a gen_a seed_a sp_matrix ep_matrix =
let a_matrix = frodo_gen_matrix gen_a (params_n a) seed_a in let b_matrix = Matrix.add (Matrix.mul sp_matrix a_matrix) ep_matrix in b_matrix
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.sqr_mod
val sqr_mod : SE.sqr_st S.qelem mk_to_nat_mod_comm_monoid
val sqr_mod : SE.sqr_st S.qelem mk_to_nat_mod_comm_monoid
let sqr_mod x = S.qmul x x
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 26, "end_line": 27, "start_col": 0, "start_line": 27 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
Spec.Exponentiation.sqr_st Spec.K256.PointOps.qelem Hacl.Spec.K256.Qinv.mk_to_nat_mod_comm_monoid
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul" ]
[]
false
false
false
true
false
let sqr_mod x =
S.qmul x x
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r16_r23
val qinv_r16_r23 (r15 x8 x_11 x_1001 x_1011 x_1101: S.qelem) : S.qelem
val qinv_r16_r23 (r15 x8 x_11 x_1001 x_1011 x_1101: S.qelem) : S.qelem
let qinv_r16_r23 r15 x8 x_11 x_1001 x_1011 x_1101 = let r16 = S.qmul (qsquare_times r15 9) x8 in let r17 = S.qmul (qsquare_times r16 5) x_1001 in let r18 = S.qmul (qsquare_times r17 6) x_1011 in let r19 = S.qmul (qsquare_times r18 4) x_1101 in let r20 = S.qmul (qsquare_times r19 5) x_11 in let r21 = S.qmul ...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 96, "start_col": 0, "start_line": 87 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
r15: Spec.K256.PointOps.qelem -> x8: Spec.K256.PointOps.qelem -> x_11: Spec.K256.PointOps.qelem -> x_1001: Spec.K256.PointOps.qelem -> x_1011: Spec.K256.PointOps.qelem -> x_1101: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r16_r23 r15 x8 x_11 x_1001 x_1011 x_1101 =
let r16 = S.qmul (qsquare_times r15 9) x8 in let r17 = S.qmul (qsquare_times r16 5) x_1001 in let r18 = S.qmul (qsquare_times r17 6) x_1011 in let r19 = S.qmul (qsquare_times r18 4) x_1101 in let r20 = S.qmul (qsquare_times r19 5) x_11 in let r21 = S.qmul (qsquare_times r20 6) x_1101 in let r22 = S.qmul (qsquare_times ...
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r0_r25
val qinv_r0_r25 (x_1 x_11 x_101 x_111 x_1001 x_1011 x_1101: S.qelem) : S.qelem
val qinv_r0_r25 (x_1 x_11 x_101 x_111 x_1001 x_1011 x_1101: S.qelem) : S.qelem
let qinv_r0_r25 x_1 x_11 x_101 x_111 x_1001 x_1011 x_1101 = let x6 = S.qmul (qsquare_times x_1101 2) x_1011 in let x8 = S.qmul (qsquare_times x6 2) x_11 in let x14 = S.qmul (qsquare_times x8 6) x6 in let r1 = qinv_r0_r1 x14 in let r8 = qinv_r2_r8 r1 x_101 x_111 x_1011 in let r15 = qinv_r9_r15 r8 x_101 x_11...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 25, "end_line": 116, "start_col": 0, "start_line": 107 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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_1: Spec.K256.PointOps.qelem -> x_11: Spec.K256.PointOps.qelem -> x_101: Spec.K256.PointOps.qelem -> x_111: Spec.K256.PointOps.qelem -> x_1001: Spec.K256.PointOps.qelem -> x_1011: Spec.K256.PointOps.qelem -> x_1101: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Hacl.Spec.K256.Qinv.qinv_r24_r25", "Hacl.Spec.K256.Qinv.qinv_r16_r23", "Hacl.Spec.K256.Qinv.qinv_r9_r15", "Hacl.Spec.K256.Qinv.qinv_r2_r8", "Hacl.Spec.K256.Qinv.qinv_r0_r1", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r0_r25 x_1 x_11 x_101 x_111 x_1001 x_1011 x_1101 =
let x6 = S.qmul (qsquare_times x_1101 2) x_1011 in let x8 = S.qmul (qsquare_times x6 2) x_11 in let x14 = S.qmul (qsquare_times x8 6) x6 in let r1 = qinv_r0_r1 x14 in let r8 = qinv_r2_r8 r1 x_101 x_111 x_1011 in let r15 = qinv_r9_r15 r8 x_101 x_111 x_1001 x_1101 in let r23 = qinv_r16_r23 r15 x8 x_11 x_1001 x_1011 x_110...
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.copy_felem
val copy_felem: #s:field_spec -> f:felem s -> f':felem s -> Stack unit (requires fun h -> live h f /\ live h f' /\ disjoint f f') (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_seq h1 f == as_seq h0 f')
val copy_felem: #s:field_spec -> f:felem s -> f':felem s -> Stack unit (requires fun h -> live h f /\ live h f' /\ disjoint f f') (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ as_seq h1 f == as_seq h0 f')
let copy_felem #s f f' = match s with | M51 -> F51.copy_felem f f' | M64 -> F64.copy_felem f f'
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 30, "end_line": 111, "start_col": 0, "start_line": 108 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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
f: Hacl.Impl.Curve25519.Fields.Core.felem s -> f': Hacl.Impl.Curve25519.Fields.Core.felem s -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Hacl.Impl.Curve25519.Fields.Core.felem", "Hacl.Impl.Curve25519.Field51.copy_felem", "Prims.unit", "Hacl.Impl.Curve25519.Field64.copy_felem" ]
[]
false
true
false
false
false
let copy_felem #s f f' =
match s with | M51 -> F51.copy_felem f f' | M64 -> F64.copy_felem f f'
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.one_mod
val one_mod : SE.one_st S.qelem mk_to_nat_mod_comm_monoid
val one_mod : SE.one_st S.qelem mk_to_nat_mod_comm_monoid
let one_mod _ = 1
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 17, "end_line": 21, "start_col": 0, "start_line": 21 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
Spec.Exponentiation.one_st Spec.K256.PointOps.qelem Hacl.Spec.K256.Qinv.mk_to_nat_mod_comm_monoid
Prims.Tot
[ "total" ]
[]
[ "Prims.unit", "Spec.K256.PointOps.qelem" ]
[]
false
false
false
true
false
let one_mod _ =
1
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv
val qinv: f:S.qelem -> S.qelem
val qinv: f:S.qelem -> S.qelem
let qinv f = let x_1 = f in let x_10 = qsquare_times f 1 in let x_11 = S.qmul x_10 x_1 in let x_101 = S.qmul x_10 x_11 in let x_111 = S.qmul x_10 x_101 in let x_1001 = S.qmul x_10 x_111 in let x_1011 = S.qmul x_10 x_1001 in let x_1101 = S.qmul x_10 x_1011 in qinv_r0_r25 x_1 x_11 x_101 x_111 x_1001 x_...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 55, "end_line": 130, "start_col": 0, "start_line": 120 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
f: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Hacl.Spec.K256.Qinv.qinv_r0_r25", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv f =
let x_1 = f in let x_10 = qsquare_times f 1 in let x_11 = S.qmul x_10 x_1 in let x_101 = S.qmul x_10 x_11 in let x_111 = S.qmul x_10 x_101 in let x_1001 = S.qmul x_10 x_111 in let x_1011 = S.qmul x_10 x_1001 in let x_1101 = S.qmul x_10 x_1011 in qinv_r0_r25 x_1 x_11 x_101 x_111 x_1001 x_1011 x_1101
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.frodo_mul_add_sb_plus_e
val frodo_mul_add_sb_plus_e: a:frodo_alg -> b:lbytes (publicmatrixbytes_len a) -> sp_matrix:matrix params_nbar (params_n a) -> epp_matrix:matrix params_nbar params_nbar -> matrix params_nbar params_nbar
val frodo_mul_add_sb_plus_e: a:frodo_alg -> b:lbytes (publicmatrixbytes_len a) -> sp_matrix:matrix params_nbar (params_n a) -> epp_matrix:matrix params_nbar params_nbar -> matrix params_nbar params_nbar
let frodo_mul_add_sb_plus_e a b sp_matrix epp_matrix = let b_matrix = frodo_unpack #(params_n a) #params_nbar (params_logq a) b in let v_matrix = Matrix.add (Matrix.mul sp_matrix b_matrix) epp_matrix in v_matrix
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 10, "end_line": 60, "start_col": 0, "start_line": 57 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> b: Lib.ByteSequence.lbytes (Spec.Frodo.Params.publicmatrixbytes_len a) -> sp_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a) -> epp_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar Spec.Frodo.Params.params_nbar -> Spec....
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.publicmatrixbytes_len", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U16", "Lib.IntTypes.SEC", "Prims.op_Multiply", "Pri...
[]
false
false
false
false
false
let frodo_mul_add_sb_plus_e a b sp_matrix epp_matrix =
let b_matrix = frodo_unpack #(params_n a) #params_nbar (params_logq a) b in let v_matrix = Matrix.add (Matrix.mul sp_matrix b_matrix) epp_matrix in v_matrix
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_r9_r15
val qinv_r9_r15 (r8 x_101 x_111 x_1001 x_1101: S.qelem) : S.qelem
val qinv_r9_r15 (r8 x_101 x_111 x_1001 x_1101: S.qelem) : S.qelem
let qinv_r9_r15 r8 x_101 x_111 x_1001 x_1101 = let r9 = S.qmul (qsquare_times r8 6) x_1101 in let r10 = S.qmul (qsquare_times r9 4) x_101 in let r11 = S.qmul (qsquare_times r10 3) x_111 in let r12 = S.qmul (qsquare_times r11 5) x_1001 in let r13 = S.qmul (qsquare_times r12 6) x_101 in let r14 = S.qmul (qsqu...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 83, "start_col": 0, "start_line": 75 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
r8: Spec.K256.PointOps.qelem -> x_101: Spec.K256.PointOps.qelem -> x_111: Spec.K256.PointOps.qelem -> x_1001: Spec.K256.PointOps.qelem -> x_1101: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem
Prims.Tot
[ "total" ]
[]
[ "Spec.K256.PointOps.qelem", "Spec.K256.PointOps.qmul", "Hacl.Spec.K256.Qinv.qsquare_times" ]
[]
false
false
false
true
false
let qinv_r9_r15 r8 x_101 x_111 x_1001 x_1101 =
let r9 = S.qmul (qsquare_times r8 6) x_1101 in let r10 = S.qmul (qsquare_times r9 4) x_101 in let r11 = S.qmul (qsquare_times r10 3) x_111 in let r12 = S.qmul (qsquare_times r11 5) x_1001 in let r13 = S.qmul (qsquare_times r12 6) x_101 in let r14 = S.qmul (qsquare_times r13 10) x_111 in let r15 = S.qmul (qsquare_times ...
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc_
val crypto_kem_enc_: a:frodo_alg -> gen_a:frodo_gen_a -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> lbytes (crypto_ciphertextbytes a) & lbytes (crypto_bytes a)
val crypto_kem_enc_: a:frodo_alg -> gen_a:frodo_gen_a -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> lbytes (crypto_ciphertextbytes a) & lbytes (crypto_bytes a)
let crypto_kem_enc_ a gen_a mu pk = let seed_se_k = crypto_kem_enc_seed_se_k a mu pk in let seed_se = LSeq.sub seed_se_k 0 (crypto_bytes a) in let k = LSeq.sub seed_se_k (crypto_bytes a) (crypto_bytes a) in let ct = crypto_kem_enc_ct a gen_a mu pk seed_se in let ss = crypto_kem_enc_ss a k ct in ct, ss
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 8, "end_line": 166, "start_col": 0, "start_line": 159 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a -> mu: Lib.ByteSequence.lbytes (Spec.Frodo.Params.bytes_mu a) -> pk: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_publickeybytes a) -> Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_ciphertextbytes a) * Lib.ByteSequenc...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_mu", "Spec.Frodo.Params.crypto_publickeybytes", "FStar.Pervasives.Native.Mktuple2", "Spec.Frodo.Params.crypto_ciphertextbytes", "Spec.Frodo.Params.crypto_bytes", "Lib.Sequence.lseq", ...
[]
false
false
false
false
false
let crypto_kem_enc_ a gen_a mu pk =
let seed_se_k = crypto_kem_enc_seed_se_k a mu pk in let seed_se = LSeq.sub seed_se_k 0 (crypto_bytes a) in let k = LSeq.sub seed_se_k (crypto_bytes a) (crypto_bytes a) in let ct = crypto_kem_enc_ct a gen_a mu pk seed_se in let ss = crypto_kem_enc_ss a k ct in ct, ss
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.get_sp_ep_epp_matrices
val get_sp_ep_epp_matrices: a:frodo_alg -> seed_se:lbytes (crypto_bytes a) -> matrix params_nbar (params_n a) & matrix params_nbar (params_n a) & matrix params_nbar params_nbar
val get_sp_ep_epp_matrices: a:frodo_alg -> seed_se:lbytes (crypto_bytes a) -> matrix params_nbar (params_n a) & matrix params_nbar (params_n a) & matrix params_nbar params_nbar
let get_sp_ep_epp_matrices a seed_se = let s_bytes_len = secretmatrixbytes_len a in let r = KG.frodo_shake_r a (u8 0x96) seed_se (2 * s_bytes_len + 2 * params_nbar * params_nbar) in let sp_matrix = frodo_sample_matrix a params_nbar (params_n a) (LSeq.sub r 0 s_bytes_len) in let ep_matrix = frodo_sample_matrix a...
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 34, "end_line": 103, "start_col": 0, "start_line": 97 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> seed_se: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_bytes a) -> (Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a) * Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a)) * Spec.Matrix.matrix Spec.Frodo....
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.crypto_bytes", "FStar.Pervasives.Native.Mktuple3", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U16", "Lib.IntTypes.SEC", ...
[]
false
false
false
false
false
let get_sp_ep_epp_matrices a seed_se =
let s_bytes_len = secretmatrixbytes_len a in let r = KG.frodo_shake_r a (u8 0x96) seed_se (2 * s_bytes_len + (2 * params_nbar) * params_nbar) in let sp_matrix = frodo_sample_matrix a params_nbar (params_n a) (LSeq.sub r 0 s_bytes_len) in let ep_matrix = frodo_sample_matrix a params_nbar (params_n a) (LSeq.sub r s_byt...
false
Platform.Error.fst
Platform.Error.correct
val correct (#a #r: Type) (x: r) : Tot (optResult a r)
val correct (#a #r: Type) (x: r) : Tot (optResult a r)
let correct (#a:Type) (#r:Type) (x:r) : Tot (optResult a r) = Correct x
{ "file_name": "ucontrib/Platform/fst/Platform.Error.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 71, "end_line": 32, "start_col": 0, "start_line": 32 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Platform.Error.fst" }
[ { "abbrev": false, "full_module": "Platform", "short_module": null }, { "abbrev": false, "full_module": "Platform", "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
x: r -> Platform.Error.optResult a r
Prims.Tot
[ "total" ]
[]
[ "Platform.Error.Correct", "Platform.Error.optResult" ]
[]
false
false
false
true
false
let correct (#a #r: Type) (x: r) : Tot (optResult a r) =
Correct x
false
Platform.Error.fst
Platform.Error.unreachable
val unreachable (#a: Type) (s: string) : Div a (requires False) (ensures (fun _ -> False))
val unreachable (#a: Type) (s: string) : Div a (requires False) (ensures (fun _ -> False))
let rec unreachable (#a:Type) (s:string) : Div a (requires False) (ensures (fun _ -> False)) = let _ = FStar.IO.debug_print_string ("Platform.Error.unreachable: " ^ s) in unreachable s
{ "file_name": "ucontrib/Platform/fst/Platform.Error.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 15, "end_line": 49, "start_col": 0, "start_line": 45 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Platform.Error.fst" }
[ { "abbrev": false, "full_module": "Platform", "short_module": null }, { "abbrev": false, "full_module": "Platform", "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
s: Prims.string -> FStar.Pervasives.Div a
FStar.Pervasives.Div
[]
[]
[ "Prims.string", "Platform.Error.unreachable", "Prims.bool", "FStar.IO.debug_print_string", "Prims.op_Hat", "Prims.l_False" ]
[ "recursion" ]
false
true
false
false
false
let rec unreachable (#a: Type) (s: string) : Div a (requires False) (ensures (fun _ -> False)) =
let _ = FStar.IO.debug_print_string ("Platform.Error.unreachable: " ^ s) in unreachable s
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc_ct_pack_c1
val crypto_kem_enc_ct_pack_c1: a:frodo_alg -> gen_a:frodo_gen_a -> seed_a:lbytes bytes_seed_a -> sp_matrix:matrix params_nbar (params_n a) -> ep_matrix:matrix params_nbar (params_n a) -> lbytes (ct1bytes_len a)
val crypto_kem_enc_ct_pack_c1: a:frodo_alg -> gen_a:frodo_gen_a -> seed_a:lbytes bytes_seed_a -> sp_matrix:matrix params_nbar (params_n a) -> ep_matrix:matrix params_nbar (params_n a) -> lbytes (ct1bytes_len a)
let crypto_kem_enc_ct_pack_c1 a gen_a seed_a sp_matrix ep_matrix = let bp_matrix = frodo_mul_add_sa_plus_e a gen_a seed_a sp_matrix ep_matrix in let ct1 = frodo_pack (params_logq a) bp_matrix in ct1
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 47, "start_col": 0, "start_line": 44 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a -> seed_a: Lib.ByteSequence.lbytes Spec.Frodo.Params.bytes_seed_a -> sp_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec.Frodo.Params.params_n a) -> ep_matrix: Spec.Matrix.matrix Spec.Frodo.Params.params_nbar (Spec...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_seed_a", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "P...
[]
false
false
false
false
false
let crypto_kem_enc_ct_pack_c1 a gen_a seed_a sp_matrix ep_matrix =
let bp_matrix = frodo_mul_add_sa_plus_e a gen_a seed_a sp_matrix ep_matrix in let ct1 = frodo_pack (params_logq a) bp_matrix in ct1
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.create_felem
val create_felem: s:field_spec -> StackInline (felem s) (requires fun h -> True) (ensures fun h0 f h1 -> stack_allocated f h0 h1 (LSeq.create (v (nlimb s)) (limb_zero s)) /\ as_nat h1 f == 0)
val create_felem: s:field_spec -> StackInline (felem s) (requires fun h -> True) (ensures fun h0 f h1 -> stack_allocated f h0 h1 (LSeq.create (v (nlimb s)) (limb_zero s)) /\ as_nat h1 f == 0)
let create_felem s = match s with | M51 -> (F51.create_felem ()) <: felem s | M64 -> (F64.create_felem ()) <: felem s
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 43, "end_line": 34, "start_col": 0, "start_line": 31 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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: Hacl.Impl.Curve25519.Fields.Core.field_spec -> FStar.HyperStack.ST.StackInline (Hacl.Impl.Curve25519.Fields.Core.felem s)
FStar.HyperStack.ST.StackInline
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Hacl.Impl.Curve25519.Field51.create_felem", "Hacl.Impl.Curve25519.Field51.felem", "Hacl.Impl.Curve25519.Fields.Core.felem", "Hacl.Impl.Curve25519.Field64.create_felem", "Hacl.Impl.Curve25519.Field64.felem" ]
[]
false
true
false
false
false
let create_felem s =
match s with | M51 -> (F51.create_felem ()) <: felem s | M64 -> (F64.create_felem ()) <: felem s
false
Platform.Error.fst
Platform.Error.unexpected
val unexpected (#a: Type) (s: string) : Div a (requires True) (ensures (fun _ -> True))
val unexpected (#a: Type) (s: string) : Div a (requires True) (ensures (fun _ -> True))
let rec unexpected (#a:Type) (s:string) : Div a (requires True) (ensures (fun _ -> True)) = let _ = FStar.IO.debug_print_string ("Platform.Error.unexpected: " ^ s) in unexpected s
{ "file_name": "ucontrib/Platform/fst/Platform.Error.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 14, "end_line": 43, "start_col": 0, "start_line": 39 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Platform.Error.fst" }
[ { "abbrev": false, "full_module": "Platform", "short_module": null }, { "abbrev": false, "full_module": "Platform", "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
s: Prims.string -> FStar.Pervasives.Div a
FStar.Pervasives.Div
[]
[]
[ "Prims.string", "Platform.Error.unexpected", "Prims.bool", "FStar.IO.debug_print_string", "Prims.op_Hat", "Prims.l_True" ]
[ "recursion" ]
false
true
false
false
false
let rec unexpected (#a: Type) (s: string) : Div a (requires True) (ensures (fun _ -> True)) =
let _ = FStar.IO.debug_print_string ("Platform.Error.unexpected: " ^ s) in unexpected s
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc_seed_se_k
val crypto_kem_enc_seed_se_k: a:frodo_alg -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> lbytes (2 * crypto_bytes a)
val crypto_kem_enc_seed_se_k: a:frodo_alg -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> lbytes (2 * crypto_bytes a)
let crypto_kem_enc_seed_se_k a mu pk = let pkh = frodo_shake a (crypto_publickeybytes a) pk (bytes_pkhash a) in let pkh_mu = concat pkh mu in let seed_se_k = frodo_shake a (bytes_pkhash a + bytes_mu a) pkh_mu (2 * crypto_bytes a) in seed_se_k
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 11, "end_line": 149, "start_col": 0, "start_line": 145 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> mu: Lib.ByteSequence.lbytes (Spec.Frodo.Params.bytes_mu a) -> pk: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_publickeybytes a) -> Lib.ByteSequence.lbytes (2 * Spec.Frodo.Params.crypto_bytes a)
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_mu", "Spec.Frodo.Params.crypto_publickeybytes", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Prims.op_Multiply", "Spec.Frodo.Params.crypto_bytes", "Spec.Frodo.Params.frodo_sha...
[]
false
false
false
false
false
let crypto_kem_enc_seed_se_k a mu pk =
let pkh = frodo_shake a (crypto_publickeybytes a) pk (bytes_pkhash a) in let pkh_mu = concat pkh mu in let seed_se_k = frodo_shake a (bytes_pkhash a + bytes_mu a) pkh_mu (2 * crypto_bytes a) in seed_se_k
false
Spec.Frodo.KEM.Encaps.fst
Spec.Frodo.KEM.Encaps.crypto_kem_enc_ct
val crypto_kem_enc_ct: a:frodo_alg -> gen_a:frodo_gen_a -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> seed_se:lbytes (crypto_bytes a) -> lbytes (crypto_ciphertextbytes a)
val crypto_kem_enc_ct: a:frodo_alg -> gen_a:frodo_gen_a -> mu:lbytes (bytes_mu a) -> pk:lbytes (crypto_publickeybytes a) -> seed_se:lbytes (crypto_bytes a) -> lbytes (crypto_ciphertextbytes a)
let crypto_kem_enc_ct a gen_a mu pk seed_se = expand_crypto_publickeybytes a; let seed_a = LSeq.sub pk 0 bytes_seed_a in let b = LSeq.sub pk bytes_seed_a (publicmatrixbytes_len a) in let sp_matrix, ep_matrix, epp_matrix = get_sp_ep_epp_matrices a seed_se in let c1 = crypto_kem_enc_ct_pack_c1 a gen_a seed_a s...
{ "file_name": "specs/frodo/Spec.Frodo.KEM.Encaps.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 124, "start_col": 0, "start_line": 114 }
module Spec.Frodo.KEM.Encaps open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.ByteSequence open Spec.Matrix open Spec.Frodo.Lemmas open Spec.Frodo.Params open Spec.Frodo.Encode open Spec.Frodo.Pack open Spec.Frodo.Sample module LSeq = Lib.Sequence module Matrix = Spec.Matrix module KG = Spec.Frodo.KEM.Ke...
{ "checked_file": "/", "dependencies": [ "Spec.Matrix.fst.checked", "Spec.Frodo.Sample.fst.checked", "Spec.Frodo.Random.fst.checked", "Spec.Frodo.Params.fst.checked", "Spec.Frodo.Pack.fst.checked", "Spec.Frodo.Lemmas.fst.checked", "Spec.Frodo.KEM.KeyGen.fst.checked", "Spec.Frodo.Enco...
[ { "abbrev": true, "full_module": "Spec.Frodo.KEM.KeyGen", "short_module": "KG" }, { "abbrev": true, "full_module": "Spec.Matrix", "short_module": "Matrix" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_mo...
{ "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: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a -> mu: Lib.ByteSequence.lbytes (Spec.Frodo.Params.bytes_mu a) -> pk: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_publickeybytes a) -> seed_se: Lib.ByteSequence.lbytes (Spec.Frodo.Params.crypto_bytes a) -> Lib.ByteSequenc...
Prims.Tot
[ "total" ]
[]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.bytes_mu", "Spec.Frodo.Params.crypto_publickeybytes", "Spec.Frodo.Params.crypto_bytes", "Spec.Matrix.matrix", "Spec.Frodo.Params.params_nbar", "Spec.Frodo.Params.params_n", "Lib.Sequence.l...
[]
false
false
false
false
false
let crypto_kem_enc_ct a gen_a mu pk seed_se =
expand_crypto_publickeybytes a; let seed_a = LSeq.sub pk 0 bytes_seed_a in let b = LSeq.sub pk bytes_seed_a (publicmatrixbytes_len a) in let sp_matrix, ep_matrix, epp_matrix = get_sp_ep_epp_matrices a seed_se in let c1 = crypto_kem_enc_ct_pack_c1 a gen_a seed_a sp_matrix ep_matrix in let c2 = crypto_kem_enc_ct_pack_c2 ...
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qsquare_times_lemma
val qsquare_times_lemma: a:S.qelem -> b:nat -> Lemma (qsquare_times a b == M.pow a (pow2 b) % S.q)
val qsquare_times_lemma: a:S.qelem -> b:nat -> Lemma (qsquare_times a b == M.pow a (pow2 b) % S.q)
let qsquare_times_lemma a b = SE.exp_pow2_lemma mk_nat_mod_concrete_ops a b; LE.exp_pow2_lemma nat_mod_comm_monoid a b; assert (qsquare_times a b == LE.pow nat_mod_comm_monoid a (pow2 b)); M.lemma_pow_nat_mod_is_pow #S.q a (pow2 b)
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 45, "start_col": 0, "start_line": 41 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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: Spec.K256.PointOps.qelem -> b: Prims.nat -> FStar.Pervasives.Lemma (ensures Hacl.Spec.K256.Qinv.qsquare_times a b == Lib.NatMod.pow a (Prims.pow2 b) % Spec.K256.PointOps.q)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.K256.PointOps.qelem", "Prims.nat", "Lib.NatMod.lemma_pow_nat_mod_is_pow", "Spec.K256.PointOps.q", "Prims.pow2", "Prims.unit", "Prims._assert", "Prims.eq2", "Prims.l_or", "Prims.b2t", "Prims.op_LessThan", "Hacl.Spec.K256.Qinv.qsquare_times", "Lib.Exponentiation.Definition.pow", "Lib.N...
[]
true
false
true
false
false
let qsquare_times_lemma a b =
SE.exp_pow2_lemma mk_nat_mod_concrete_ops a b; LE.exp_pow2_lemma nat_mod_comm_monoid a b; assert (qsquare_times a b == LE.pow nat_mod_comm_monoid a (pow2 b)); M.lemma_pow_nat_mod_is_pow #S.q a (pow2 b)
false
Platform.Error.fst
Platform.Error.invertOptResult
val invertOptResult : a:Type -> b:Type -> Lemma (requires True) (ensures (forall (x:optResult a b). Error? x \/ Correct? x)) [SMTPat (optResult a b)]
val invertOptResult : a:Type -> b:Type -> Lemma (requires True) (ensures (forall (x:optResult a b). Error? x \/ Correct? x)) [SMTPat (optResult a b)]
let invertOptResult a b = allow_inversion (optResult a b)
{ "file_name": "ucontrib/Platform/fst/Platform.Error.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 57, "end_line": 27, "start_col": 0, "start_line": 27 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Platform.Error.fst" }
[ { "abbrev": false, "full_module": "Platform", "short_module": null }, { "abbrev": false, "full_module": "Platform", "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
a: Type -> b: Type -> FStar.Pervasives.Lemma (ensures forall (x: Platform.Error.optResult a b). Error? x \/ Correct? x) [SMTPat (Platform.Error.optResult a b)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "FStar.Pervasives.allow_inversion", "Platform.Error.optResult", "Prims.unit" ]
[]
true
false
true
false
false
let invertOptResult a b =
allow_inversion (optResult a b)
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.lemma_pow_mod_1
val lemma_pow_mod_1: f:S.qelem -> Lemma (f == M.pow f 1 % S.q)
val lemma_pow_mod_1: f:S.qelem -> Lemma (f == M.pow f 1 % S.q)
let lemma_pow_mod_1 f = M.lemma_pow1 f; Math.Lemmas.small_mod f S.q; assert_norm (pow2 0 = 1); assert (f == M.pow f 1 % S.q)
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 31, "end_line": 138, "start_col": 0, "start_line": 134 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
f: Spec.K256.PointOps.qelem -> FStar.Pervasives.Lemma (ensures f == Lib.NatMod.pow f 1 % Spec.K256.PointOps.q)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.K256.PointOps.qelem", "Prims._assert", "Prims.eq2", "Prims.int", "Prims.op_Modulus", "Lib.NatMod.pow", "Spec.K256.PointOps.q", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.pow2", "FStar.Math.Lemmas.small_mod", "Lib.NatMod.lemma_pow1" ]
[]
true
false
true
false
false
let lemma_pow_mod_1 f =
M.lemma_pow1 f; Math.Lemmas.small_mod f S.q; assert_norm (pow2 0 = 1); assert (f == M.pow f 1 % S.q)
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.qinv_is_qinv_lemma
val qinv_is_qinv_lemma: f:S.qelem -> Lemma (qinv f == S.qinv f)
val qinv_is_qinv_lemma: f:S.qelem -> Lemma (qinv f == S.qinv f)
let qinv_is_qinv_lemma f = qinv_lemma f; assert (qinv f == M.pow f (S.q - 2) % S.q); M.lemma_pow_mod #S.q f (S.q - 2)
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 34, "end_line": 378, "start_col": 0, "start_line": 375 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
f: Spec.K256.PointOps.qelem -> FStar.Pervasives.Lemma (ensures Hacl.Spec.K256.Qinv.qinv f == Spec.K256.PointOps.qinv f)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.K256.PointOps.qelem", "Lib.NatMod.lemma_pow_mod", "Spec.K256.PointOps.q", "Prims.op_Subtraction", "Prims.unit", "Prims._assert", "Prims.eq2", "Prims.int", "Hacl.Spec.K256.Qinv.qinv", "Prims.op_Modulus", "Lib.NatMod.pow", "Hacl.Spec.K256.Qinv.qinv_lemma" ]
[]
true
false
true
false
false
let qinv_is_qinv_lemma f =
qinv_lemma f; assert (qinv f == M.pow f (S.q - 2) % S.q); M.lemma_pow_mod #S.q f (S.q - 2)
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.lemma_pow_mod_mul
val lemma_pow_mod_mul: f:S.qelem -> a:nat -> b:nat -> Lemma (S.qmul (M.pow f a % S.q) (M.pow f b % S.q) == M.pow f (a + b) % S.q)
val lemma_pow_mod_mul: f:S.qelem -> a:nat -> b:nat -> Lemma (S.qmul (M.pow f a % S.q) (M.pow f b % S.q) == M.pow f (a + b) % S.q)
let lemma_pow_mod_mul f a b = calc (==) { S.qmul (M.pow f a % S.q) (M.pow f b % S.q); (==) { Math.Lemmas.lemma_mod_mul_distr_l (M.pow f a) (M.pow f b % S.q) S.q; Math.Lemmas.lemma_mod_mul_distr_r (M.pow f a) (M.pow f b) S.q } M.pow f a * M.pow f b % S.q; (==) { M.lemma_pow_add f a b } ...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 152, "start_col": 0, "start_line": 143 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
f: Spec.K256.PointOps.qelem -> a: Prims.nat -> b: Prims.nat -> FStar.Pervasives.Lemma (ensures Spec.K256.PointOps.qmul (Lib.NatMod.pow f a % Spec.K256.PointOps.q) (Lib.NatMod.pow f b % Spec.K256.PointOps.q) == Lib.NatMod.pow f (a + b) % Spec.K256.PointOps.q)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.K256.PointOps.qelem", "Prims.nat", "FStar.Calc.calc_finish", "Prims.eq2", "Spec.K256.PointOps.qmul", "Prims.op_Modulus", "Lib.NatMod.pow", "Spec.K256.PointOps.q", "Prims.op_Addition", "Prims.Cons", "FStar.Preorder.relation", "Prims.Nil", "Prims.unit", "FStar.Calc.calc_step", "FStar...
[]
false
false
true
false
false
let lemma_pow_mod_mul f a b =
calc ( == ) { S.qmul (M.pow f a % S.q) (M.pow f b % S.q); ( == ) { (Math.Lemmas.lemma_mod_mul_distr_l (M.pow f a) (M.pow f b % S.q) S.q; Math.Lemmas.lemma_mod_mul_distr_r (M.pow f a) (M.pow f b) S.q) } M.pow f a * M.pow f b % S.q; ( == ) { M.lemma_pow_add f a b } M.pow f (a + b) % S.q; }
false
Hacl.Spec.K256.Qinv.fst
Hacl.Spec.K256.Qinv.lemma_pow_pow_mod_mul
val lemma_pow_pow_mod_mul: f:S.qelem -> a:nat -> b:nat -> c:nat -> Lemma (S.qmul (M.pow (M.pow f a % S.q) b % S.q) (M.pow f c % S.q) == M.pow f (a * b + c) % S.q)
val lemma_pow_pow_mod_mul: f:S.qelem -> a:nat -> b:nat -> c:nat -> Lemma (S.qmul (M.pow (M.pow f a % S.q) b % S.q) (M.pow f c % S.q) == M.pow f (a * b + c) % S.q)
let lemma_pow_pow_mod_mul f a b c = calc (==) { S.qmul (M.pow (M.pow f a % S.q) b % S.q) (M.pow f c % S.q); (==) { M.lemma_pow_mod_base (M.pow f a) b S.q; Math.Lemmas.lemma_mod_mul_distr_l (M.pow (M.pow f a) b) (M.pow f c % S.q) S.q; Math.Lemmas.lemma_mod_mul_distr_r (M.pow (M.pow f a) b) (M...
{ "file_name": "code/k256/Hacl.Spec.K256.Qinv.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 169, "start_col": 0, "start_line": 157 }
module Hacl.Spec.K256.Qinv open FStar.Mul module SE = Spec.Exponentiation module LE = Lib.Exponentiation module M = Lib.NatMod module S = Spec.K256 #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = { ...
{ "checked_file": "/", "dependencies": [ "Spec.K256.fst.checked", "Spec.Exponentiation.fsti.checked", "prims.fst.checked", "Lib.NatMod.fsti.checked", "Lib.Exponentiation.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FSt...
[ { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.NatMod", "short_module": "M" }, { "abbrev": true, "full_module": "Lib.Exponentiation", "short_module": "LE" }, { "abbrev": true, "full_module": "Spec.Exp...
{ "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
f: Spec.K256.PointOps.qelem -> a: Prims.nat -> b: Prims.nat -> c: Prims.nat -> FStar.Pervasives.Lemma (ensures Spec.K256.PointOps.qmul (Lib.NatMod.pow (Lib.NatMod.pow f a % Spec.K256.PointOps.q) b % Spec.K256.PointOps.q) (Lib.NatMod.pow f c % Spec.K256.PointOps.q) == Lib.NatMod.pow f...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.K256.PointOps.qelem", "Prims.nat", "FStar.Calc.calc_finish", "Prims.eq2", "Spec.K256.PointOps.qmul", "Prims.op_Modulus", "Lib.NatMod.pow", "Spec.K256.PointOps.q", "Prims.op_Addition", "FStar.Mul.op_Star", "Prims.Cons", "FStar.Preorder.relation", "Prims.Nil", "Prims.unit", "FStar.Ca...
[]
false
false
true
false
false
let lemma_pow_pow_mod_mul f a b c =
calc ( == ) { S.qmul (M.pow (M.pow f a % S.q) b % S.q) (M.pow f c % S.q); ( == ) { (M.lemma_pow_mod_base (M.pow f a) b S.q; Math.Lemmas.lemma_mod_mul_distr_l (M.pow (M.pow f a) b) (M.pow f c % S.q) S.q; Math.Lemmas.lemma_mod_mul_distr_r (M.pow (M.pow f a) b) (M.pow f c) S.q) } M.pow (M.pow f a) b * M.pow ...
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.load_felem
val load_felem: #s:field_spec -> f:felem s -> u64s:lbuffer uint64 4ul -> Stack unit (requires fun h -> live h f /\ live h u64s /\ disjoint f u64s /\ v (LSeq.index (as_seq h u64s) 3) < pow2 63) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ state_inv_t h1 f /\ as_nat h1 f ==...
val load_felem: #s:field_spec -> f:felem s -> u64s:lbuffer uint64 4ul -> Stack unit (requires fun h -> live h f /\ live h u64s /\ disjoint f u64s /\ v (LSeq.index (as_seq h u64s) 3) < pow2 63) (ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\ state_inv_t h1 f /\ as_nat h1 f ==...
let load_felem #s f b = match s with | M51 -> F51.load_felem f b | M64 -> F64.load_felem f b
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 29, "end_line": 51, "start_col": 0, "start_line": 48 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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
f: Hacl.Impl.Curve25519.Fields.Core.felem s -> u64s: Lib.Buffer.lbuffer Lib.IntTypes.uint64 4ul -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Hacl.Impl.Curve25519.Fields.Core.felem", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.Curve25519.Field51.load_felem", "Prims.unit", "Hacl.Impl.Curve25519.Field64.load_felem" ]
[]
false
true
false
false
false
let load_felem #s f b =
match s with | M51 -> F51.load_felem f b | M64 -> F64.load_felem f b
false
Fibonacci.fst
Fibonacci.fib
val fib (n: nat) : nat
val fib (n: nat) : nat
let rec fib (n:nat) : nat = if n <= 1 then 1 else fib (n - 1) + fib (n - 2)
{ "file_name": "share/steel/examples/pulse/Fibonacci.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 32, "end_line": 24, "start_col": 0, "start_line": 22 }
(* Copyright 2023 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": [ "Pulse.Lib.Pervasives.fst.checked", "Pulse.Lib.BoundedIntegers.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Fibonacci.fst" }
[ { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "Pulse.Lib.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_m...
{ "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
n: Prims.nat -> Prims.nat
Prims.Tot
[ "total" ]
[]
[ "Prims.nat", "Prims.op_LessThanOrEqual", "Prims.bool", "Prims.op_Addition", "Fibonacci.fib", "Prims.op_Subtraction" ]
[ "recursion" ]
false
false
false
true
false
let rec fib (n: nat) : nat =
if n <= 1 then 1 else fib (n - 1) + fib (n - 2)
false
Fibonacci.fst
Fibonacci.fib_mono
val fib_mono (n: nat) (m: nat{m <= n}) : Lemma (ensures fib m <= fib n)
val fib_mono (n: nat) (m: nat{m <= n}) : Lemma (ensures fib m <= fib n)
let rec fib_mono (n:nat) (m:nat { m <= n}) : Lemma (ensures fib m <= fib n) = if n = m then () else fib_mono (n - 1) m
{ "file_name": "share/steel/examples/pulse/Fibonacci.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 27, "end_line": 30, "start_col": 0, "start_line": 26 }
(* Copyright 2023 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": [ "Pulse.Lib.Pervasives.fst.checked", "Pulse.Lib.BoundedIntegers.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Fibonacci.fst" }
[ { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "Pulse.Lib.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_m...
{ "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
n: Prims.nat -> m: Prims.nat{m <= n} -> FStar.Pervasives.Lemma (ensures Fibonacci.fib m <= Fibonacci.fib n)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_Equality", "Prims.bool", "Fibonacci.fib_mono", "Prims.op_Subtraction", "Prims.unit", "Prims.l_True", "Prims.squash", "Fibonacci.fib", "Prims.Nil", "FStar.Pervasives.pattern" ]
[ "recursion" ]
false
false
true
false
false
let rec fib_mono (n: nat) (m: nat{m <= n}) : Lemma (ensures fib m <= fib n) =
if n = m then () else fib_mono (n - 1) m
false
Hacl.Impl.Curve25519.Fields.fst
Hacl.Impl.Curve25519.Fields.store_felem
val store_felem: #s:field_spec -> b:lbuffer uint64 4ul -> f:felem s -> Stack unit (requires fun h -> live h f /\ live h b /\ disjoint f b /\ state_inv_t h f) (ensures fun h0 _ h1 -> modifies (loc b |+| loc f) h0 h1 /\ as_seq h1 b == BSeq.nat_to_intseq_le 4 (feval h0 f))
val store_felem: #s:field_spec -> b:lbuffer uint64 4ul -> f:felem s -> Stack unit (requires fun h -> live h f /\ live h b /\ disjoint f b /\ state_inv_t h f) (ensures fun h0 _ h1 -> modifies (loc b |+| loc f) h0 h1 /\ as_seq h1 b == BSeq.nat_to_intseq_le 4 (feval h0 f))
let store_felem #s b f = match s with | M51 -> F51.store_felem b f | M64 -> F64.store_felem b f
{ "file_name": "code/curve25519/Hacl.Impl.Curve25519.Fields.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 30, "end_line": 67, "start_col": 0, "start_line": 64 }
module Hacl.Impl.Curve25519.Fields open FStar.HyperStack open FStar.HyperStack.All open FStar.Mul open Lib.IntTypes open Lib.Buffer include Hacl.Impl.Curve25519.Fields.Core module ST = FStar.HyperStack.ST module BSeq = Lib.ByteSequence module LSeq = Lib.Sequence module P = Spec.Curve25519 module F51 = Hacl.Impl.Cu...
{ "checked_file": "/", "dependencies": [ "Spec.Curve25519.fst.checked", "prims.fst.checked", "Meta.Attribute.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Curve25519.Fields.Core.fsti.chec...
[ { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field64", "short_module": "F64" }, { "abbrev": true, "full_module": "Hacl.Impl.Curve25519.Field51", "short_module": "F51" }, { "abbrev": true, "full_module": "Spec.Curve25519", "short_module": "P" }, { "abbrev...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "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: Lib.Buffer.lbuffer Lib.IntTypes.uint64 4ul -> f: Hacl.Impl.Curve25519.Fields.Core.felem s -> FStar.HyperStack.ST.Stack Prims.unit
FStar.HyperStack.ST.Stack
[]
[]
[ "Hacl.Impl.Curve25519.Fields.Core.field_spec", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.Curve25519.Fields.Core.felem", "Hacl.Impl.Curve25519.Field51.store_felem", "Prims.unit", "Hacl.Impl.Curve25519.Field64.store_felem" ]
[]
false
true
false
false
false
let store_felem #s b f =
match s with | M51 -> F51.store_felem b f | M64 -> F64.store_felem b f
false
Hacl.Impl.SHA3.fst
Hacl.Impl.SHA3.absorb_last
val absorb_last: delimitedSuffix:byte_t -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> rem:size_t{v rem < v rateInBytes} -> input:lbuffer uint8 rem -> s:state -> Stack unit (requires fun h -> live h s /\ live h input /\ disjoint s input) (ensures fun h0 _ h1 -> modifies...
val absorb_last: delimitedSuffix:byte_t -> rateInBytes:size_t{0 < v rateInBytes /\ v rateInBytes <= 200} -> rem:size_t{v rem < v rateInBytes} -> input:lbuffer uint8 rem -> s:state -> Stack unit (requires fun h -> live h s /\ live h input /\ disjoint s input) (ensures fun h0 _ h1 -> modifies...
let absorb_last delimitedSuffix rateInBytes rem input s = push_frame(); let h0 = ST.get() in let lastBlock_ = create 200ul (u8 0) in let lastBlock = sub lastBlock_ 0ul rateInBytes in let h1 = ST.get () in assert (as_seq h1 lastBlock `Seq.equal` Lib.Sequence.create (v rateInBytes) (u8 0)); let open Lib.Raw...
{ "file_name": "code/sha3/Hacl.Impl.SHA3.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 13, "end_line": 419, "start_col": 0, "start_line": 404 }
module Hacl.Impl.SHA3 open FStar.HyperStack.All open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open LowStar.Buffer open LowStar.BufferOps open Lib.IntTypes open Lib.Buffer open Lib.ByteBuffer open Spec.SHA3.Constants module ST = FStar.HyperStack.ST module B = LowStar.Buffer module LSeq = Lib.Sequenc...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.Equivalence.fst.checked", "Spec.SHA3.Constants.fst.checked", "Spec.SHA3.fst.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", ...
[ { "abbrev": true, "full_module": "Spec.SHA3.Equivalence", "short_module": "Equiv" }, { "abbrev": true, "full_module": "Spec.SHA3", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loop" }, { "abbrev": true, "full_...
{ "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
delimitedSuffix: Lib.IntTypes.byte_t -> rateInBytes: Lib.IntTypes.size_t{0 < Lib.IntTypes.v rateInBytes /\ Lib.IntTypes.v rateInBytes <= 200} -> rem: Lib.IntTypes.size_t{Lib.IntTypes.v rem < Lib.IntTypes.v rateInBytes} -> input: Lib.Buffer.lbuffer Lib.IntTypes.uint8 rem -> s: Hacl.Impl.SHA3.s...
FStar.HyperStack.ST.Stack
[]
[]
[ "Lib.IntTypes.byte_t", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Hacl.Impl.SHA3.state", "FStar.HyperStack.ST.pop_frame", "Prims.u...
[]
false
true
false
false
false
let absorb_last delimitedSuffix rateInBytes rem input s =
push_frame (); let h0 = ST.get () in let lastBlock_ = create 200ul (u8 0) in let lastBlock = sub lastBlock_ 0ul rateInBytes in let h1 = ST.get () in assert ((as_seq h1 lastBlock) `Seq.equal` (Lib.Sequence.create (v rateInBytes) (u8 0))); let open Lib.RawIntTypes in update_sub lastBlock (size 0) rem input; lastBlock.(re...
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.bezout_prop'
val bezout_prop' (n l: nat) (d: pos) (q_n q_l: nat) (u_n u_l: int) : Tot prop
val bezout_prop' (n l: nat) (d: pos) (q_n q_l: nat) (u_n u_l: int) : Tot prop
let bezout_prop' (n: nat) (l: nat) (d: pos) (q_n: nat) (q_l: nat) (u_n: int) (u_l: int) : Tot prop = n == d * q_n /\ l == d * q_l /\ d == n * u_n + l * u_l
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 24, "end_line": 91, "start_col": 0, "start_line": 80 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.nat -> l: Prims.nat -> d: Prims.pos -> q_n: Prims.nat -> q_l: Prims.nat -> u_n: Prims.int -> u_l: Prims.int -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "Prims.nat", "Prims.pos", "Prims.int", "Prims.l_and", "Prims.eq2", "FStar.Mul.op_Star", "Prims.op_Addition", "Prims.prop" ]
[]
false
false
false
true
true
let bezout_prop' (n l: nat) (d: pos) (q_n q_l: nat) (u_n u_l: int) : Tot prop =
n == d * q_n /\ l == d * q_l /\ d == n * u_n + l * u_l
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.int_semiring
val int_semiring : _: Prims.unit -> FStar.Tactics.Effect.Tac Prims.unit
let int_semiring () = FStar.Tactics.CanonCommSemiring.int_semiring (); FStar.Tactics.trefl (); FStar.Tactics.qed ()
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 22, "end_line": 68, "start_col": 0, "start_line": 65 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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 -> FStar.Tactics.Effect.Tac Prims.unit
FStar.Tactics.Effect.Tac
[]
[]
[ "Prims.unit", "FStar.Tactics.V1.Derived.qed", "FStar.Tactics.V1.Derived.trefl", "FStar.Tactics.CanonCommSemiring.int_semiring" ]
[]
false
true
false
false
false
let int_semiring () =
FStar.Tactics.CanonCommSemiring.int_semiring (); FStar.Tactics.trefl (); FStar.Tactics.qed ()
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.bezout_prop
val bezout_prop (n l: nat) (b: bezout_t) : Tot prop
val bezout_prop (n l: nat) (b: bezout_t) : Tot prop
let bezout_prop (n: nat) (l: nat) (b: bezout_t) : Tot prop = bezout_prop' n l b.d b.q_n b.q_l b.u_n b.u_l
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 46, "end_line": 98, "start_col": 0, "start_line": 93 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.nat -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout_t -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout_t", "Steel.ST.GenArraySwap.Proof.bezout_prop'", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_l", "Steel.ST.GenArraySwap.Pro...
[]
false
false
false
true
true
let bezout_prop (n l: nat) (b: bezout_t) : Tot prop =
bezout_prop' n l b.d b.q_n b.q_l b.u_n b.u_l
false
FStar.Map.fst
FStar.Map.sel
val sel: #key:eqtype -> #value:Type -> t key value -> key -> Tot value
val sel: #key:eqtype -> #value:Type -> t key value -> key -> Tot value
let sel #key #value m k = m.mappings k
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 38, "end_line": 38, "start_col": 0, "start_line": 38 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m: FStar.Map.t key value -> k: key -> value
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Map.__proj__Mkt__item__mappings" ]
[]
false
false
false
false
false
let sel #key #value m k =
m.mappings k
false
FStar.Map.fst
FStar.Map.domain
val domain: #key:eqtype -> #value:Type -> t key value -> Tot (S.set key)
val domain: #key:eqtype -> #value:Type -> t key value -> Tot (S.set key)
let domain #key #value m = m.domain
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 35, "end_line": 54, "start_col": 0, "start_line": 54 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m: FStar.Map.t key value -> FStar.Set.set key
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Map.__proj__Mkt__item__domain", "FStar.Set.set" ]
[]
false
false
false
false
false
let domain #key #value m =
m.domain
false
FStar.Map.fst
FStar.Map.const
val const: #key:eqtype -> #value:Type -> value -> Tot (t key value)
val const: #key:eqtype -> #value:Type -> value -> Tot (t key value)
let const #key #value v = { mappings = F.on key (fun _ -> v); domain = complement empty }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 52, "start_col": 0, "start_line": 49 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
v: value -> FStar.Map.t key value
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.Mkt", "FStar.FunctionalExtensionality.on", "FStar.Set.complement", "FStar.Set.empty", "FStar.Map.t" ]
[]
false
false
false
false
false
let const #key #value v =
{ mappings = F.on key (fun _ -> v); domain = complement empty }
false
FStar.Map.fst
FStar.Map.contains
val contains: #key:eqtype -> #value:Type -> t key value -> key -> Tot bool
val contains: #key:eqtype -> #value:Type -> t key value -> key -> Tot bool
let contains #key #value m k = mem k m.domain
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 45, "end_line": 56, "start_col": 0, "start_line": 56 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m: FStar.Map.t key value -> k: key -> Prims.bool
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Set.mem", "FStar.Map.__proj__Mkt__item__domain", "Prims.bool" ]
[]
false
false
false
false
false
let contains #key #value m k =
mem k m.domain
false
FStar.Map.fst
FStar.Map.upd
val upd: #key:eqtype -> #value:Type -> t key value -> key -> value -> Tot (t key value)
val upd: #key:eqtype -> #value:Type -> t key value -> key -> value -> Tot (t key value)
let upd #key #value m k v = { mappings = F.on key (fun x -> if x = k then v else m.mappings x); domain = S.union m.domain (singleton k) }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 46, "start_col": 0, "start_line": 43 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m: FStar.Map.t key value -> k: key -> v: value -> FStar.Map.t key value
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Map.Mkt", "FStar.FunctionalExtensionality.on", "Prims.op_Equality", "Prims.bool", "FStar.Map.__proj__Mkt__item__mappings", "FStar.Set.union", "FStar.Map.__proj__Mkt__item__domain", "FStar.Set.singleton" ]
[]
false
false
false
false
false
let upd #key #value m k v =
{ mappings = F.on key (fun x -> if x = k then v else m.mappings x); domain = S.union m.domain (singleton k) }
false
FStar.Map.fst
FStar.Map.concat
val concat: #key:eqtype -> #value:Type -> t key value -> t key value -> Tot (t key value)
val concat: #key:eqtype -> #value:Type -> t key value -> t key value -> Tot (t key value)
let concat #key #value m1 m2 = { mappings = F.on key (fun x -> if mem x m2.domain then m2.mappings x else m1.mappings x); domain = union m1.domain m2.domain }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 62, "start_col": 0, "start_line": 59 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m1: FStar.Map.t key value -> m2: FStar.Map.t key value -> FStar.Map.t key value
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Map.Mkt", "FStar.FunctionalExtensionality.on", "FStar.Set.mem", "FStar.Map.__proj__Mkt__item__domain", "FStar.Map.__proj__Mkt__item__mappings", "Prims.bool", "FStar.Set.union" ]
[]
false
false
false
false
false
let concat #key #value m1 m2 =
{ mappings = F.on key (fun x -> if mem x m2.domain then m2.mappings x else m1.mappings x); domain = union m1.domain m2.domain }
false
FStar.Map.fst
FStar.Map.map_val
val map_val: #val1:Type -> #val2:Type -> f:(val1 -> val2) -> #key:eqtype -> t key val1 -> Tot (t key val2)
val map_val: #val1:Type -> #val2:Type -> f:(val1 -> val2) -> #key:eqtype -> t key val1 -> Tot (t key val2)
let map_val #_ #_ f #key m = { mappings = F.on key (fun x -> f (m.mappings x)); domain = m.domain }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 67, "start_col": 0, "start_line": 64 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
f: (_: val1 -> val2) -> m: FStar.Map.t key val1 -> FStar.Map.t key val2
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "FStar.Map.Mkt", "FStar.FunctionalExtensionality.on", "FStar.Map.__proj__Mkt__item__mappings", "FStar.Map.__proj__Mkt__item__domain" ]
[]
false
false
false
false
false
let map_val #_ #_ f #key m =
{ mappings = F.on key (fun x -> f (m.mappings x)); domain = m.domain }
false
FStar.Map.fst
FStar.Map.map_literal
val map_literal (#k:eqtype) (#v:Type) (f: k -> Tot v) : t k v
val map_literal (#k:eqtype) (#v:Type) (f: k -> Tot v) : t k v
let map_literal #k #v f = { mappings = F.on k f; domain = complement empty; }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 77, "start_col": 0, "start_line": 74 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
f: (_: k -> v) -> FStar.Map.t k v
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.Mkt", "FStar.FunctionalExtensionality.on", "FStar.Set.complement", "FStar.Set.empty", "FStar.Map.t" ]
[]
false
false
false
false
false
let map_literal #k #v f =
{ mappings = F.on k f; domain = complement empty }
false
FStar.Map.fst
FStar.Map.restrict
val restrict: #key:eqtype -> #value:Type -> S.set key -> t key value -> Tot (t key value)
val restrict: #key:eqtype -> #value:Type -> S.set key -> t key value -> Tot (t key value)
let restrict #key #value s m = { mappings = m.mappings; domain = intersect s m.domain }
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 1, "end_line": 72, "start_col": 0, "start_line": 69 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
s: FStar.Set.set key -> m: FStar.Map.t key value -> FStar.Map.t key value
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Set.set", "FStar.Map.t", "FStar.Map.Mkt", "FStar.Map.__proj__Mkt__item__mappings", "FStar.Set.intersect", "FStar.Map.__proj__Mkt__item__domain" ]
[]
false
false
false
false
false
let restrict #key #value s m =
{ mappings = m.mappings; domain = intersect s m.domain }
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_iter_mod_d
val jump_iter_mod_d (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x % b.d == x % b.d)) (decreases k)
val jump_iter_mod_d (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x % b.d == x % b.d)) (decreases k)
let rec jump_iter_mod_d (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x % b.d == x % b.d)) (decreases k) = if k = 0 then () else begin jump_mod_d n l b x; jump_iter_mod_d n l b (jump n l x) (k - 1) end
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 5, "end_line": 234, "start_col": 0, "start_line": 220 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> k: Prims.nat -> FStar.Pervasives.Lemma (ensures Steel.ST.GenArraySwap.Proof.iter_fun (Steel.ST.GenArraySwap.Proof.jump n l) k x % Mkbezout_t?.d b == ...
FStar.Pervasives.Lemma
[ "lemma", "" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Prims.op_Equality", "Prims.int", "Prims.bool", "Steel.ST.GenArraySwap.Proof.jump_iter_mod_d", "Steel.ST.GenArraySwap.Proof.jump", "Prims.op_Subtraction", "Prims.unit", "Steel.ST.GenArraySw...
[ "recursion" ]
false
false
true
false
false
let rec jump_iter_mod_d (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x % b.d == x % b.d)) (decreases k) =
if k = 0 then () else (jump_mod_d n l b x; jump_iter_mod_d n l b (jump n l x) (k - 1))
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.bezout_pos_le
val bezout_pos_le (n: pos) (l: nat) (b: bezout n l) : Lemma (b.d <= n /\ b.q_n > 0) [SMTPat (bezout_prop n l b)]
val bezout_pos_le (n: pos) (l: nat) (b: bezout n l) : Lemma (b.d <= n /\ b.q_n > 0) [SMTPat (bezout_prop n l b)]
let bezout_pos_le (n: pos) (l: nat) (b: bezout n l) : Lemma (b.d <= n /\ b.q_n > 0) [SMTPat (bezout_prop n l b)] = lemma_pos_mul_pos_args b.q_n b.d
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 34, "end_line": 264, "start_col": 0, "start_line": 257 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> FStar.Pervasives.Lemma (ensures Mkbezout_t?.d b <= n /\ Mkbezout_t?.q_n b > 0) [SMTPat (Steel.ST.GenArraySwap.Proof.bezout_prop n l b)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.lemma_pos_mul_pos_args", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.l_and",...
[]
true
false
true
false
false
let bezout_pos_le (n: pos) (l: nat) (b: bezout n l) : Lemma (b.d <= n /\ b.q_n > 0) [SMTPat (bezout_prop n l b)] =
lemma_pos_mul_pos_args b.q_n b.d
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.iter_fun
val iter_fun (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : GTot t (decreases n)
val iter_fun (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : GTot t (decreases n)
let rec iter_fun (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : GTot t (decreases n) = if n = 0 then x else iter_fun f (n - 1) (f x)
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 31, "end_line": 187, "start_col": 0, "start_line": 178 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
f: (_: t -> Prims.GTot t) -> n: Prims.nat -> x: t -> Prims.GTot t
Prims.GTot
[ "sometrivial", "" ]
[]
[ "Prims.nat", "Prims.op_Equality", "Prims.int", "Prims.bool", "Steel.ST.GenArraySwap.Proof.iter_fun", "Prims.op_Subtraction" ]
[ "recursion" ]
false
false
false
false
false
let rec iter_fun (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : GTot t (decreases n) =
if n = 0 then x else iter_fun f (n - 1) (f x)
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_coverage_strong
val jump_coverage_strong (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Ghost nat (requires True) (ensures (fun k -> x == iter_fun (jump n l) k (x % b.d) /\ (forall (k': nat). k' < k ==> (~(x == iter_fun (jump n l) k' (x % b.d))))))
val jump_coverage_strong (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Ghost nat (requires True) (ensures (fun k -> x == iter_fun (jump n l) k (x % b.d) /\ (forall (k': nat). k' < k ==> (~(x == iter_fun (jump n l) k' (x % b.d))))))
let jump_coverage_strong (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Ghost nat (requires True) (ensures (fun k -> x == iter_fun (jump n l) k (x % b.d) /\ (forall (k': nat) . k' < k ==> (~ (x == iter_fun (jump n l) k' (x % b.d)))) )) = let k' = jump_coverage n l b x in minimal_exists (fu...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 66, "end_line": 349, "start_col": 0, "start_line": 337 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> Prims.Ghost Prims.nat
Prims.Ghost
[]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Steel.ST.GenArraySwap.Proof.minimal_exists", "Prims.op_Equality", "Steel.ST.GenArraySwap.Proof.iter_fun", "Steel.ST.GenArraySwap.Proof.jump", "Prims.op_Modulus", "Steel.ST.GenArraySwap.Proof._...
[]
false
false
false
false
false
let jump_coverage_strong (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Ghost nat (requires True) (ensures (fun k -> x == iter_fun (jump n l) k (x % b.d) /\ (forall (k': nat). k' < k ==> (~(x == iter_fun (jump n l) k' (x % b.d)))))) =
let k' = jump_coverage n l b x in minimal_exists (fun k -> x = iter_fun (jump n l) k (x % b.d)) k'
false
FStar.Map.fst
FStar.Map.equal
val equal (#key:eqtype) (#value:Type) (m1:t key value) (m2:t key value) : prop
val equal (#key:eqtype) (#value:Type) (m1:t key value) (m2:t key value) : prop
let equal (#key:eqtype) (#value:Type) (m1:t key value) (m2:t key value) : Type0 = F.feq m1.mappings m2.mappings /\ S.equal m1.domain m2.domain
{ "file_name": "ulib/FStar.Map.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 31, "end_line": 98, "start_col": 0, "start_line": 96 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Set.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.FunctionalExtensionality.fsti.checked" ], "interface_file": true, "source_file": "FStar.Map.fst" }
[ { "abbrev": true, "full_module": "FStar.FunctionalExtensionality", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.Set", "short_module": "S" }, { "abbrev": false, "full_module": "FStar.FunctionalExtensionality", "short_module": null }, { "abbrev": f...
{ "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
m1: FStar.Map.t key value -> m2: FStar.Map.t key value -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "Prims.eqtype", "FStar.Map.t", "Prims.l_and", "FStar.FunctionalExtensionality.feq", "FStar.Map.__proj__Mkt__item__mappings", "FStar.Set.equal", "FStar.Map.__proj__Mkt__item__domain", "Prims.prop" ]
[]
false
false
false
false
true
let equal (#key: eqtype) (#value: Type) (m1 m2: t key value) : Type0 =
F.feq m1.mappings m2.mappings /\ S.equal m1.domain m2.domain
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.bezout_q_eq
val bezout_q_eq (n l: nat) (bz: bezout n l) : Lemma (bz.q_n == n / bz.d) [SMTPat (bezout_prop n l bz); SMTPat bz.q_n]
val bezout_q_eq (n l: nat) (bz: bezout n l) : Lemma (bz.q_n == n / bz.d) [SMTPat (bezout_prop n l bz); SMTPat bz.q_n]
let bezout_q_eq (n: nat) (l: nat) (bz: bezout n l) : Lemma (bz.q_n == n / bz.d) [SMTPat (bezout_prop n l bz); SMTPat bz.q_n] = cancel_mul_div bz.q_n bz.d
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 28, "end_line": 176, "start_col": 0, "start_line": 169 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.nat -> l: Prims.nat -> bz: Steel.ST.GenArraySwap.Proof.bezout n l -> FStar.Pervasives.Lemma (ensures Mkbezout_t?.q_n bz == n / Mkbezout_t?.d bz) [SMTPat (Steel.ST.GenArraySwap.Proof.bezout_prop n l bz); SMTPat (Mkbezout_t?.q_n bz)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "FStar.Math.Lemmas.cancel_mul_div", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.eq2", "Prims.int", "Prims.op_Divisio...
[]
true
false
true
false
false
let bezout_q_eq (n l: nat) (bz: bezout n l) : Lemma (bz.q_n == n / bz.d) [SMTPat (bezout_prop n l bz); SMTPat bz.q_n] =
cancel_mul_div bz.q_n bz.d
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.minimal_exists'
val minimal_exists' (p: (nat -> GTot bool)) (n i: nat) : Ghost nat (requires (p n == true /\ i <= n /\ (forall (j: nat). j < i ==> p j == false))) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false))) (decreases (n - i))
val minimal_exists' (p: (nat -> GTot bool)) (n i: nat) : Ghost nat (requires (p n == true /\ i <= n /\ (forall (j: nat). j < i ==> p j == false))) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false))) (decreases (n - i))
let rec minimal_exists' (p: (nat -> GTot bool)) (n: nat) (i: nat) : Ghost nat (requires ( p n == true /\ i <= n /\ (forall (j: nat) . j < i ==> p j == false) )) (ensures (fun k -> p k == true /\ (forall (j: nat) . j < k ==> p j == false) )) (decreases (n - i)) = if p i then i els...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 34, "end_line": 318, "start_col": 0, "start_line": 301 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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: (_: Prims.nat -> Prims.GTot Prims.bool) -> n: Prims.nat -> i: Prims.nat -> Prims.Ghost Prims.nat
Prims.Ghost
[ "" ]
[]
[ "Prims.nat", "Prims.bool", "Steel.ST.GenArraySwap.Proof.minimal_exists'", "Prims.op_Addition", "Prims.l_and", "Prims.eq2", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.l_Forall", "Prims.l_imp", "Prims.op_LessThan" ]
[ "recursion" ]
false
false
false
false
false
let rec minimal_exists' (p: (nat -> GTot bool)) (n i: nat) : Ghost nat (requires (p n == true /\ i <= n /\ (forall (j: nat). j < i ==> p j == false))) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false))) (decreases (n - i)) =
if p i then i else minimal_exists' p n (i + 1)
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.array_swap_outer_invariant
val array_swap_outer_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i: nat) : Tot prop
val array_swap_outer_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i: nat) : Tot prop
let array_swap_outer_invariant // hoisting necessary because "Let binding is effectful" (#t: Type0) (s0: Seq.seq t) (n: nat) (l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i: nat) : Tot prop = 0 < l /\ l < n /\ i <= bz.d /\ n == Seq.length s0 /\ n == Seq.length s /\ (forall (i': nat_up_to bz.d) . // this i...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 4, "end_line": 655, "start_col": 0, "start_line": 639 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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.Seq.Base.seq t -> n: Prims.nat -> l: Prims.nat -> bz: Steel.ST.GenArraySwap.Proof.bezout n l -> s: FStar.Seq.Base.seq t -> i: Prims.nat -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "FStar.Seq.Base.seq", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Prims.op_LessThanOrEqual", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Prims.eq2", "FStar.Seq.Base.length", "Prims.l_Forall", "Steel.ST.GenArraySwap.Proof....
[]
false
false
false
false
true
let array_swap_outer_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i: nat) : Tot prop =
0 < l /\ l < n /\ i <= bz.d /\ n == Seq.length s0 /\ n == Seq.length s /\ (forall (i': nat_up_to bz.d). Seq.index s i' == Seq.index s (iter_fun #(nat_up_to (n)) (jump (n) (l)) 0 i')) /\ (forall (i': nat_up_to bz.d). (forall (j: nat_up_to bz.q_n). let idx = iter_fun #(nat_up_to (n)) (jump (n) (l)) j i' i...
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.array_swap_post
val array_swap_post (#t: Type) (s0: Seq.seq t) (n l: nat) (s: Seq.seq t) : Tot prop
val array_swap_post (#t: Type) (s0: Seq.seq t) (n l: nat) (s: Seq.seq t) : Tot prop
let array_swap_post (#t: Type) (s0: Seq.seq t) (n: nat) (l: nat) (s: Seq.seq t) : Tot prop = n == Seq.length s0 /\ 0 <= l /\ l <= n /\ s `Seq.equal` (Seq.slice s0 l n `Seq.append` Seq.slice s0 0 l)
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 66, "end_line": 605, "start_col": 0, "start_line": 594 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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.Seq.Base.seq t -> n: Prims.nat -> l: Prims.nat -> s: FStar.Seq.Base.seq t -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "FStar.Seq.Base.seq", "Prims.nat", "Prims.l_and", "Prims.eq2", "FStar.Seq.Base.length", "Prims.b2t", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.equal", "FStar.Seq.Base.append", "FStar.Seq.Base.slice", "Prims.prop" ]
[]
false
false
false
true
true
let array_swap_post (#t: Type) (s0: Seq.seq t) (n l: nat) (s: Seq.seq t) : Tot prop =
n == Seq.length s0 /\ 0 <= l /\ l <= n /\ s `Seq.equal` ((Seq.slice s0 l n) `Seq.append` (Seq.slice s0 0 l))
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.iter_succ_l
val iter_succ_l (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : Lemma (f (iter_fun f n x) == iter_fun f (n + 1) x) [SMTPat (f (iter_fun f n x))]
val iter_succ_l (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : Lemma (f (iter_fun f n x) == iter_fun f (n + 1) x) [SMTPat (f (iter_fun f n x))]
let iter_succ_l (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : Lemma (f (iter_fun f n x) == iter_fun f (n + 1) x) [SMTPat (f (iter_fun f n x))] = iter_fun_add f 1 n x
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 22, "end_line": 576, "start_col": 0, "start_line": 568 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
f: (_: t -> Prims.GTot t) -> n: Prims.nat -> x: t -> FStar.Pervasives.Lemma (ensures f (Steel.ST.GenArraySwap.Proof.iter_fun f n x) == Steel.ST.GenArraySwap.Proof.iter_fun f (n + 1) x) [SMTPat (f (Steel.ST.GenArraySwap.Proof.iter_fun f n x))]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.nat", "Steel.ST.GenArraySwap.Proof.iter_fun_add", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.eq2", "Steel.ST.GenArraySwap.Proof.iter_fun", "Prims.op_Addition", "Prims.Cons", "FStar.Pervasives.pattern", "FStar.Pervasives.smt_pat", "Prims.Nil" ]
[]
true
false
true
false
false
let iter_succ_l (#t: Type) (f: (t -> GTot t)) (n: nat) (x: t) : Lemma (f (iter_fun f n x) == iter_fun f (n + 1) x) [SMTPat (f (iter_fun f n x))] =
iter_fun_add f 1 n x
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_iter_mod_q_inj_weak
val jump_iter_mod_q_inj_weak (n l: pos) (b: bezout n l) (x: nat_up_to n) (k1 k2: nat) : Lemma (requires (iter_fun (jump n l) k1 x == iter_fun (jump n l) k2 x)) (ensures (b.q_n > 0 /\ k1 % b.q_n == k2 % b.q_n))
val jump_iter_mod_q_inj_weak (n l: pos) (b: bezout n l) (x: nat_up_to n) (k1 k2: nat) : Lemma (requires (iter_fun (jump n l) k1 x == iter_fun (jump n l) k2 x)) (ensures (b.q_n > 0 /\ k1 % b.q_n == k2 % b.q_n))
let jump_iter_mod_q_inj_weak (n: pos) (l: pos) (b: bezout n l) (x: nat_up_to n) (k1 k2: nat) : Lemma (requires ( iter_fun (jump n l) k1 x == iter_fun (jump n l) k2 x )) (ensures ( b.q_n > 0 /\ k1 % b.q_n == k2 % b.q_n )) = jump_iter n l x k1; jump_iter n l x k2; let kn = mod_eq_elim n ...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 29, "end_line": 475, "start_col": 0, "start_line": 456 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.pos -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> k1: Prims.nat -> k2: Prims.nat -> FStar.Pervasives.Lemma (requires Steel.ST.GenArraySwap.Proof.iter_fun (Steel.ST.GenArraySwap.Proof.jump n l) k1 x == ...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Prims.nat", "Steel.ST.GenArraySwap.Proof.mod_eq_intro", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Prims.int", "Steel.ST.GenArraySwap.Proof.gauss", "Prims.op_Addition", "Prims.op_Minus",...
[]
false
false
true
false
false
let jump_iter_mod_q_inj_weak (n l: pos) (b: bezout n l) (x: nat_up_to n) (k1 k2: nat) : Lemma (requires (iter_fun (jump n l) k1 x == iter_fun (jump n l) k2 x)) (ensures (b.q_n > 0 /\ k1 % b.q_n == k2 % b.q_n)) =
jump_iter n l x k1; jump_iter n l x k2; let kn = mod_eq_elim n (x + k1 * l) (x + k2 * l) in FStar.Tactics.Effect.assert_by_tactic ((k1 + - k2) * l == (k1 * l + - (k2 * l))) (fun _ -> (); (int_semiring ())); let kq = gauss n l b (k1 + - k2) kn in mod_eq_intro b.q_n k1 k2 kq
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.minimal_exists
val minimal_exists (p: (nat -> GTot bool)) (n: nat) : Ghost nat (requires (p n == true)) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false)))
val minimal_exists (p: (nat -> GTot bool)) (n: nat) : Ghost nat (requires (p n == true)) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false)))
let minimal_exists (p: (nat -> GTot bool)) (n: nat) : Ghost nat (requires ( p n == true )) (ensures (fun k -> p k == true /\ (forall (j: nat) . j < k ==> p j == false) )) = minimal_exists' p n 0
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 23, "end_line": 333, "start_col": 0, "start_line": 322 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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: (_: Prims.nat -> Prims.GTot Prims.bool) -> n: Prims.nat -> Prims.Ghost Prims.nat
Prims.Ghost
[]
[]
[ "Prims.nat", "Prims.bool", "Steel.ST.GenArraySwap.Proof.minimal_exists'", "Prims.eq2", "Prims.l_and", "Prims.l_Forall", "Prims.l_imp", "Prims.b2t", "Prims.op_LessThan" ]
[]
false
false
false
false
false
let minimal_exists (p: (nat -> GTot bool)) (n: nat) : Ghost nat (requires (p n == true)) (ensures (fun k -> p k == true /\ (forall (j: nat). j < k ==> p j == false))) =
minimal_exists' p n 0
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.array_swap_inner_invariant
val array_swap_inner_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i j idx: nat) : Tot prop
val array_swap_inner_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i j idx: nat) : Tot prop
let array_swap_inner_invariant (#t: Type0) (s0: Seq.seq t) (n: nat) (l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i: nat) (j: nat) (idx: nat) : Tot prop = 0 < l /\ l < n /\ n == Seq.length s0 /\ i < bz.d /\ j < bz.q_n /\ idx == iter_fun #(nat_up_to (n)) (jump (n) (l)) (j) (i) /\ n == Seq.length s /\ (...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 4, "end_line": 672, "start_col": 0, "start_line": 657 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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.Seq.Base.seq t -> n: Prims.nat -> l: Prims.nat -> bz: Steel.ST.GenArraySwap.Proof.bezout n l -> s: FStar.Seq.Base.seq t -> i: Prims.nat -> j: Prims.nat -> idx: Prims.nat -> Prims.prop
Prims.Tot
[ "total" ]
[]
[ "FStar.Seq.Base.seq", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Prims.eq2", "FStar.Seq.Base.length", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Steel.ST.GenArr...
[]
false
false
false
false
true
let array_swap_inner_invariant (#t: Type0) (s0: Seq.seq t) (n l: nat) (bz: bezout (n) (l)) (s: Seq.seq t) (i j idx: nat) : Tot prop =
0 < l /\ l < n /\ n == Seq.length s0 /\ i < bz.d /\ j < bz.q_n /\ idx == iter_fun #(nat_up_to (n)) (jump (n) (l)) (j) (i) /\ n == Seq.length s /\ (forall (i': nat_up_to bz.d). (forall (j': nat_up_to bz.q_n). let idx = iter_fun #(nat_up_to (n)) (jump (n) (l)) j' i' in Seq.index s idx == Seq.i...
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump
val jump (n: pos) (l: nat) (x: nat_up_to n) : GTot (nat_up_to n)
val jump (n: pos) (l: nat) (x: nat_up_to n) : GTot (nat_up_to n)
let jump (n: pos) (l: nat) (x: nat_up_to n) : GTot (nat_up_to n) = (x + l) % n
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 13, "end_line": 196, "start_col": 0, "start_line": 191 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> Prims.GTot (Steel.ST.GenArraySwap.Proof.nat_up_to n)
Prims.GTot
[ "sometrivial" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Prims.op_Modulus", "Prims.op_Addition" ]
[]
false
false
false
false
false
let jump (n: pos) (l: nat) (x: nat_up_to n) : GTot (nat_up_to n) =
(x + l) % n
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_coverage_strong_bound
val jump_coverage_strong_bound (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (b.q_n > 0 /\ jump_coverage_strong n l b x < b.q_n) [SMTPat (jump_coverage_strong n l b x)]
val jump_coverage_strong_bound (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (b.q_n > 0 /\ jump_coverage_strong n l b x < b.q_n) [SMTPat (jump_coverage_strong n l b x)]
let jump_coverage_strong_bound (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (b.q_n > 0 /\ jump_coverage_strong n l b x < b.q_n ) [SMTPat (jump_coverage_strong n l b x)] = let k = jump_coverage_strong n l b x in jump_iter_mod_q n l b (x % b.d) k
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 35, "end_line": 384, "start_col": 0, "start_line": 373 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> FStar.Pervasives.Lemma (ensures Mkbezout_t?.q_n b > 0 /\ Steel.ST.GenArraySwap.Proof.jump_coverage_strong n l b x < Mkbezout_t?.q_n b) [SMTPat (Steel....
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Steel.ST.GenArraySwap.Proof.jump_iter_mod_q", "Prims.op_Modulus", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__d", "Steel.ST.GenArraySwap.Proof.jump_coverage_strong", "Prims.unit", "...
[]
true
false
true
false
false
let jump_coverage_strong_bound (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (b.q_n > 0 /\ jump_coverage_strong n l b x < b.q_n) [SMTPat (jump_coverage_strong n l b x)] =
let k = jump_coverage_strong n l b x in jump_iter_mod_q n l b (x % b.d) k
false
Functor.fst
Functor.functor_list
[@@ FStar.Tactics.Typeclasses.tcinstance] val functor_list:functor list
[@@ FStar.Tactics.Typeclasses.tcinstance] val functor_list:functor list
instance functor_list : functor list = { fmap = List.Tot.map }
{ "file_name": "examples/typeclasses/Functor.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 62, "end_line": 25, "start_col": 0, "start_line": 25 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Typeclasses.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Functor.fst" }
[ { "abbrev": false, "full_module": "FStar.Tactics.Typeclasses", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_mod...
{ "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
Functor.functor Prims.list
Prims.Tot
[ "total" ]
[]
[ "Functor.Mkfunctor", "Prims.list", "FStar.List.Tot.Base.map" ]
[]
false
false
false
true
false
[@@ FStar.Tactics.Typeclasses.tcinstance] let functor_list:functor list =
{ fmap = List.Tot.map }
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_iter
val jump_iter (n: pos) (l: nat) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x == (x + k * l) % n)) (decreases k)
val jump_iter (n: pos) (l: nat) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x == (x + k * l) % n)) (decreases k)
let rec jump_iter (n: pos) (l: nat) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x == (x + k * l) % n)) (decreases k) = if k = 0 then begin assert (eq2 #int (x + 0 * l) x) by (int_semiring ()); small_mod x n end else begin let k' = k - 1 in assert (eq2...
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 5, "end_line": 255, "start_col": 0, "start_line": 238 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> k: Prims.nat -> FStar.Pervasives.Lemma (ensures Steel.ST.GenArraySwap.Proof.iter_fun (Steel.ST.GenArraySwap.Proof.jump n l) k x == (x + k * l) % n) (decreases k)
FStar.Pervasives.Lemma
[ "lemma", "" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Prims.op_Equality", "Prims.int", "FStar.Math.Lemmas.small_mod", "Prims.unit", "FStar.Tactics.Effect.assert_by_tactic", "Prims.eq2", "Prims.op_Addition", "FStar.Mul.op_Star", "Steel.ST.GenArraySwap.Proof.int_semiring", "Prims...
[ "recursion" ]
false
false
true
false
false
let rec jump_iter (n: pos) (l: nat) (x: nat_up_to n) (k: nat) : Lemma (ensures (iter_fun #(nat_up_to n) (jump n l) k x == (x + k * l) % n)) (decreases k) =
if k = 0 then (FStar.Tactics.Effect.assert_by_tactic (eq2 #int (x + 0 * l) x) (fun _ -> (); (int_semiring ())); small_mod x n) else let k' = k - 1 in FStar.Tactics.Effect.assert_by_tactic (eq2 #int (x + (k' + 1) * l) ((x + l) + k' * l)) (fun _ -> (); (int_semiring...
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_if
val jump_if (n: pos) (l: nat) (sq: squash (l < n)) (idx: nat_up_to n) : Lemma (jump n l idx == (if idx + l >= n then idx - (n - l) else idx + l))
val jump_if (n: pos) (l: nat) (sq: squash (l < n)) (idx: nat_up_to n) : Lemma (jump n l idx == (if idx + l >= n then idx - (n - l) else idx + l))
let jump_if (n: pos) (l: nat) (sq: squash (l < n)) (idx: nat_up_to n) : Lemma (jump n l idx == (if idx + l >= n then idx - (n - l) else idx + l)) = let idx' = (if idx + l >= n then idx - (n - l) else idx + l) in small_mod idx n; small_mod idx' n; lemma_mod_plus (idx + l) (-1) n
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 33, "end_line": 542, "start_col": 0, "start_line": 532 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> sq: Prims.squash (l < n) -> idx: Steel.ST.GenArraySwap.Proof.nat_up_to n -> FStar.Pervasives.Lemma (ensures Steel.ST.GenArraySwap.Proof.jump n l idx == (match idx + l >= n with | true -> idx - (n - l) | _ -> idx + l))
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Prims.squash", "Prims.b2t", "Prims.op_LessThan", "Steel.ST.GenArraySwap.Proof.nat_up_to", "FStar.Math.Lemmas.lemma_mod_plus", "Prims.op_Addition", "Prims.op_Minus", "Prims.unit", "FStar.Math.Lemmas.small_mod", "Prims.op_GreaterThanOrEqual", "Prims.op_Subtraction", ...
[]
false
false
true
false
false
let jump_if (n: pos) (l: nat) (sq: squash (l < n)) (idx: nat_up_to n) : Lemma (jump n l idx == (if idx + l >= n then idx - (n - l) else idx + l)) =
let idx' = (if idx + l >= n then idx - (n - l) else idx + l) in small_mod idx n; small_mod idx' n; lemma_mod_plus (idx + l) (- 1) n
false
Functor.fst
Functor.functor_id
[@@ FStar.Tactics.Typeclasses.tcinstance] val functor_id:functor id
[@@ FStar.Tactics.Typeclasses.tcinstance] val functor_id:functor id
instance functor_id : functor id = { fmap = fun #_ #_ f a -> f a }
{ "file_name": "examples/typeclasses/Functor.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 66, "end_line": 26, "start_col": 0, "start_line": 26 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Typeclasses.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Functor.fst" }
[ { "abbrev": false, "full_module": "FStar.Tactics.Typeclasses", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_mod...
{ "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
Functor.functor (fun x -> x <: Type)
Prims.Tot
[ "total" ]
[]
[ "Functor.Mkfunctor" ]
[]
false
false
false
false
false
[@@ FStar.Tactics.Typeclasses.tcinstance] let functor_id:functor id =
{ fmap = fun #_ #_ f a -> f a }
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.jump_iter_q
val jump_iter_q (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (ensures (iter_fun (jump n l) b.q_n x == x))
val jump_iter_q (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (ensures (iter_fun (jump n l) b.q_n x == x))
let jump_iter_q (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (ensures ( iter_fun (jump n l) b.q_n x == x )) = cancel_mul_mod 1 b.q_n; jump_iter_mod_q n l b x b.q_n
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 31, "end_line": 554, "start_col": 0, "start_line": 544 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> l: Prims.nat -> b: Steel.ST.GenArraySwap.Proof.bezout n l -> x: Steel.ST.GenArraySwap.Proof.nat_up_to n -> FStar.Pervasives.Lemma (ensures Steel.ST.GenArraySwap.Proof.iter_fun (Steel.ST.GenArraySwap.Proof.jump n l) (Mkbezout_t?.q_n b) x == x)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Steel.ST.GenArraySwap.Proof.bezout", "Steel.ST.GenArraySwap.Proof.nat_up_to", "Steel.ST.GenArraySwap.Proof.jump_iter_mod_q", "Steel.ST.GenArraySwap.Proof.__proj__Mkbezout_t__item__q_n", "Prims.unit", "FStar.Math.Lemmas.cancel_mul_mod", "Prims.l_True", "Prims.squash", "...
[]
true
false
true
false
false
let jump_iter_q (n: pos) (l: nat) (b: bezout n l) (x: nat_up_to n) : Lemma (ensures (iter_fun (jump n l) b.q_n x == x)) =
cancel_mul_mod 1 b.q_n; jump_iter_mod_q n l b x b.q_n
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.mod_eq_intro
val mod_eq_intro (n: pos) (x1 x2 k: int) : Lemma (requires (x1 - x2 == k * n)) (ensures (x1 % n == x2 % n))
val mod_eq_intro (n: pos) (x1 x2 k: int) : Lemma (requires (x1 - x2 == k * n)) (ensures (x1 % n == x2 % n))
let mod_eq_intro (n: pos) (x1 x2: int) (k: int) : Lemma (requires (x1 - x2 == k * n)) (ensures (x1 % n == x2 % n)) = lemma_mod_plus x2 k n
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 23, "end_line": 412, "start_col": 0, "start_line": 405 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
n: Prims.pos -> x1: Prims.int -> x2: Prims.int -> k: Prims.int -> FStar.Pervasives.Lemma (requires x1 - x2 == k * n) (ensures x1 % n == x2 % n)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.int", "FStar.Math.Lemmas.lemma_mod_plus", "Prims.unit", "Prims.eq2", "Prims.op_Subtraction", "FStar.Mul.op_Star", "Prims.squash", "Prims.op_Modulus", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let mod_eq_intro (n: pos) (x1 x2 k: int) : Lemma (requires (x1 - x2 == k * n)) (ensures (x1 % n == x2 % n)) =
lemma_mod_plus x2 k n
false
Functor.fst
Functor.comp
[@@ FStar.Tactics.Typeclasses.tcinstance] val comp: #ff: _ -> #gg: _ -> functor ff -> functor gg -> functor (compose ff gg)
[@@ FStar.Tactics.Typeclasses.tcinstance] val comp: #ff: _ -> #gg: _ -> functor ff -> functor gg -> functor (compose ff gg)
instance comp #ff #gg (_ : functor ff) (_ : functor gg) : functor (compose ff gg) = { fmap = (fun #a #b f x -> fmap #ff (fmap #gg f) x) }
{ "file_name": "examples/typeclasses/Functor.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 55, "end_line": 31, "start_col": 0, "start_line": 30 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Typeclasses.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Functor.fst" }
[ { "abbrev": false, "full_module": "FStar.Tactics.Typeclasses", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_mod...
{ "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
_: Functor.functor ff -> _: Functor.functor gg -> Functor.functor (Functor.compose ff gg)
Prims.Tot
[ "total" ]
[]
[ "Functor.functor", "Functor.Mkfunctor", "Functor.fmap", "Functor.compose" ]
[]
false
false
false
false
false
[@@ FStar.Tactics.Typeclasses.tcinstance] let comp #ff #gg (_: functor ff) (_: functor gg) : functor (compose ff gg) =
{ fmap = (fun #a #b f x -> fmap #ff (fmap #gg f) x) }
false
Functor.fst
Functor.compose
val compose : t1: (_: _ -> _) -> t2: (_: _ -> _) -> x: _ -> _
let compose t1 t2 = fun x -> t1 (t2 x)
{ "file_name": "examples/typeclasses/Functor.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 38, "end_line": 28, "start_col": 0, "start_line": 28 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Typeclasses.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Functor.fst" }
[ { "abbrev": false, "full_module": "FStar.Tactics.Typeclasses", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_mod...
{ "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
t1: (_: _ -> _) -> t2: (_: _ -> _) -> x: _ -> _
Prims.Tot
[ "total" ]
[]
[]
[]
false
false
false
true
false
let compose t1 t2 =
fun x -> t1 (t2 x)
false
Functor.fst
Functor.t2
val t2 : Functor.compose Prims.list Prims.list Prims.int
let t2 = fmap #(compose list list) (fun x -> x + 1) [[1] ; [2 ; 3]]
{ "file_name": "examples/typeclasses/Functor.fst", "git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
{ "end_col": 67, "end_line": 35, "start_col": 0, "start_line": 35 }
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Typeclasses.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Functor.fst" }
[ { "abbrev": false, "full_module": "FStar.Tactics.Typeclasses", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_mod...
{ "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
Functor.compose Prims.list Prims.list Prims.int
Prims.Tot
[ "total" ]
[]
[ "Functor.fmap", "Functor.compose", "Prims.list", "Functor.comp", "Functor.functor_list", "Prims.int", "Prims.op_Addition", "Prims.Cons", "Prims.Nil" ]
[]
false
false
false
true
false
let t2 =
fmap #(compose list list) (fun x -> x + 1) [[1]; [2; 3]]
false
Steel.ST.GenArraySwap.Proof.fst
Steel.ST.GenArraySwap.Proof.iter_fun_add
val iter_fun_add (#t: Type) (f: (t -> GTot t)) (n1 n2: nat) (x: t) : Lemma (ensures (iter_fun f n1 (iter_fun f n2 x) == iter_fun f (n1 + n2) x)) (decreases n2)
val iter_fun_add (#t: Type) (f: (t -> GTot t)) (n1 n2: nat) (x: t) : Lemma (ensures (iter_fun f n1 (iter_fun f n2 x) == iter_fun f (n1 + n2) x)) (decreases n2)
let rec iter_fun_add (#t: Type) (f: (t -> GTot t)) (n1 n2: nat) (x: t) : Lemma (ensures (iter_fun f n1 (iter_fun f n2 x) == iter_fun f (n1 + n2) x)) (decreases n2) = if n2 = 0 then () else iter_fun_add f n1 (n2 - 1) (f x)
{ "file_name": "lib/steel/Steel.ST.GenArraySwap.Proof.fst", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 39, "end_line": 566, "start_col": 0, "start_line": 556 }
module Steel.ST.GenArraySwap.Proof open FStar.Math.Lemmas open FStar.Mul let lemma_mod_lt (a:int) (b:pos) : Lemma (let r = a % b in 0 <= r /\ r < b) [SMTPat (a % b)] = () let lemma_mul_nat_nat_is_nat (a b: nat) : Lemma (a * b >= 0) [SMTPat (a * b)] = () let lemma_pos_mul_pos_args (a: nat) (b: nat) ...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiring.fst.checked", "FStar.Tactics.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked"...
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.GenArraySwap", "short_module": null }, { "abbrev": false, "full_mo...
{ "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
f: (_: t -> Prims.GTot t) -> n1: Prims.nat -> n2: Prims.nat -> x: t -> FStar.Pervasives.Lemma (ensures Steel.ST.GenArraySwap.Proof.iter_fun f n1 (Steel.ST.GenArraySwap.Proof.iter_fun f n2 x) == Steel.ST.GenArraySwap.Proof.iter_fun f (n1 + n2) x) (decreases n2)
FStar.Pervasives.Lemma
[ "lemma", "" ]
[]
[ "Prims.nat", "Prims.op_Equality", "Prims.int", "Prims.bool", "Steel.ST.GenArraySwap.Proof.iter_fun_add", "Prims.op_Subtraction", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.eq2", "Steel.ST.GenArraySwap.Proof.iter_fun", "Prims.op_Addition", "Prims.Nil", "FStar.Pervasives.pattern" ]
[ "recursion" ]
false
false
true
false
false
let rec iter_fun_add (#t: Type) (f: (t -> GTot t)) (n1 n2: nat) (x: t) : Lemma (ensures (iter_fun f n1 (iter_fun f n2 x) == iter_fun f (n1 + n2) x)) (decreases n2) =
if n2 = 0 then () else iter_fun_add f n1 (n2 - 1) (f x)
false