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.Spec.K256.GLV.fst | Hacl.Spec.K256.GLV.qmul_shift_384_lemma | val qmul_shift_384_lemma (a b:S.qelem) : Lemma (qmul_shift_384 a b < S.q) | val qmul_shift_384_lemma (a b:S.qelem) : Lemma (qmul_shift_384 a b < S.q) | let qmul_shift_384_lemma a b =
assert_norm (S.q < pow2 256);
Math.Lemmas.lemma_mult_lt_sqr a b (pow2 256);
Math.Lemmas.pow2_plus 256 256;
assert (a * b < pow2 512);
Math.Lemmas.lemma_div_lt_nat (a * b) 512 384;
assert (a * b / pow2 384 < pow2 128);
assert_norm (pow2 128 < S.q) | {
"file_name": "code/k256/Hacl.Spec.K256.GLV.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 107,
"start_col": 0,
"start_line": 100
} | module Hacl.Spec.K256.GLV
open FStar.Mul
module S = Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
(**
This module implements the following two functions from libsecp256k1:
secp256k1_scalar_split_lambda [1] and secp256k1_ecmult_endo_split [2].
For the secp256k1 curve, we can replace the EC scalar mul... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Spec.K256.GLV.fst"
} | [
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec... | {
"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: Spec.K256.PointOps.qelem
-> FStar.Pervasives.Lemma (ensures Hacl.Spec.K256.GLV.qmul_shift_384 a b < Spec.K256.PointOps.q) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Spec.K256.PointOps.qelem",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Spec.K256.PointOps.q",
"Prims.unit",
"Prims._assert",
"Prims.op_Division",
"FStar.Mul.op_Star",
"FStar.Math.Lemmas.lemma_div_lt_nat",
"FStar.Math.Lemmas.pow2_plus",
"FStar.Math.Lemmas... | [] | true | false | true | false | false | let qmul_shift_384_lemma a b =
| assert_norm (S.q < pow2 256);
Math.Lemmas.lemma_mult_lt_sqr a b (pow2 256);
Math.Lemmas.pow2_plus 256 256;
assert (a * b < pow2 512);
Math.Lemmas.lemma_div_lt_nat (a * b) 512 384;
assert (a * b / pow2 384 < pow2 128);
assert_norm (pow2 128 < S.q) | false |
Hacl.Spec.K256.GLV.fst | Hacl.Spec.K256.GLV.b2 | val b2:S.qelem | val b2:S.qelem | let b2 : S.qelem = 0x3086d221a7d46bcde86c90e49284eb15 | {
"file_name": "code/k256/Hacl.Spec.K256.GLV.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 53,
"end_line": 69,
"start_col": 0,
"start_line": 69
} | module Hacl.Spec.K256.GLV
open FStar.Mul
module S = Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
(**
This module implements the following two functions from libsecp256k1:
secp256k1_scalar_split_lambda [1] and secp256k1_ecmult_endo_split [2].
For the secp256k1 curve, we can replace the EC scalar mul... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Spec.K256.GLV.fst"
} | [
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec... | {
"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.K256.PointOps.qelem | Prims.Tot | [
"total"
] | [] | [] | [] | false | false | false | true | false | let b2:S.qelem =
| 0x3086d221a7d46bcde86c90e49284eb15 | false |
Hacl.Spec.K256.GLV.fst | Hacl.Spec.K256.GLV.qmul_shift_384 | val qmul_shift_384 : a: Prims.int -> b: Prims.int -> Prims.int | let qmul_shift_384 a b =
a * b / pow2 384 + (a * b / pow2 383 % 2) | {
"file_name": "code/k256/Hacl.Spec.K256.GLV.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 97,
"start_col": 0,
"start_line": 96
} | module Hacl.Spec.K256.GLV
open FStar.Mul
module S = Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
(**
This module implements the following two functions from libsecp256k1:
secp256k1_scalar_split_lambda [1] and secp256k1_ecmult_endo_split [2].
For the secp256k1 curve, we can replace the EC scalar mul... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Spec.K256.GLV.fst"
} | [
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.int -> b: Prims.int -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Prims.int",
"Prims.op_Addition",
"Prims.op_Division",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Modulus"
] | [] | false | false | false | true | false | let qmul_shift_384 a b =
| a * b / pow2 384 + (a * b / pow2 383 % 2) | false | |
Hacl.Spec.K256.GLV.fst | Hacl.Spec.K256.GLV.scalar_split_lambda | val scalar_split_lambda (k: S.qelem) : S.qelem & S.qelem | val scalar_split_lambda (k: S.qelem) : S.qelem & S.qelem | let scalar_split_lambda (k:S.qelem) : S.qelem & S.qelem =
qmul_shift_384_lemma k g1;
qmul_shift_384_lemma k g2;
let c1 : S.qelem = qmul_shift_384 k g1 in
let c2 : S.qelem = qmul_shift_384 k g2 in
let c1 = S.(c1 *^ minus_b1) in
let c2 = S.(c2 *^ minus_b2) in
let r2 = S.(c1 +^ c2) in
let r1 = S.(k +^ r2... | {
"file_name": "code/k256/Hacl.Spec.K256.GLV.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 8,
"end_line": 121,
"start_col": 0,
"start_line": 110
} | module Hacl.Spec.K256.GLV
open FStar.Mul
module S = Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
(**
This module implements the following two functions from libsecp256k1:
secp256k1_scalar_split_lambda [1] and secp256k1_ecmult_endo_split [2].
For the secp256k1 curve, we can replace the EC scalar mul... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Spec.K256.GLV.fst"
} | [
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec... | {
"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 | k: Spec.K256.PointOps.qelem -> Spec.K256.PointOps.qelem * Spec.K256.PointOps.qelem | Prims.Tot | [
"total"
] | [] | [
"Spec.K256.PointOps.qelem",
"FStar.Pervasives.Native.Mktuple2",
"Spec.K256.PointOps.op_Plus_Hat",
"Spec.K256.PointOps.op_Star_Hat",
"Hacl.Spec.K256.GLV.minus_lambda",
"Hacl.Spec.K256.GLV.minus_b2",
"Hacl.Spec.K256.GLV.minus_b1",
"Hacl.Spec.K256.GLV.qmul_shift_384",
"Hacl.Spec.K256.GLV.g2",
"Hacl.S... | [] | false | false | false | true | false | let scalar_split_lambda (k: S.qelem) : S.qelem & S.qelem =
| qmul_shift_384_lemma k g1;
qmul_shift_384_lemma k g2;
let c1:S.qelem = qmul_shift_384 k g1 in
let c2:S.qelem = qmul_shift_384 k g2 in
let c1 = let open S in c1 *^ minus_b1 in
let c2 = let open S in c2 *^ minus_b2 in
let r2 = let open S in c1 +^ c2 in
let r1 = let open S in k +^ r2 *^ minus_lambda in
r1, r2 | false |
Steel.ST.GenElim1.fst | Steel.ST.GenElim1.compute_gen_elim_nondep_correct11 | val compute_gen_elim_nondep_correct11 (i0: gen_elim_i) (t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11]) | val compute_gen_elim_nondep_correct11 (i0: gen_elim_i) (t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11]) | let compute_gen_elim_nondep_correct11
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11])
= fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _) (exists_ (fun x1 -> exists_ (fun x2 -> e... | {
"file_name": "lib/steel/Steel.ST.GenElim1.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 7,
"end_line": 682,
"start_col": 0,
"start_line": 661
} | module Steel.ST.GenElim1
let gen_elim_f
(p: vprop)
(a: Type)
(q: (a -> vprop))
(post: (a -> prop))
: Tot Type
= ((opened: inames) -> STGhost a opened p q True post)
module U = FStar.Universe
let gen_unit_elim_t (i: gen_unit_elim_i) : Tot Type =
gen_elim_f (compute_gen_unit_elim_p i) (U.raise_t u#_ u#1 unit... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Universe.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.GenElim1.f... | [
{
"abbrev": true,
"full_module": "FStar.Universe",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.GenElim1.Base",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"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 |
i0: Steel.ST.GenElim1.Base.gen_elim_i ->
t1: Type ->
t2: Type ->
t3: Type ->
t4: Type ->
t5: Type ->
t6: Type ->
t7: Type ->
t8: Type ->
t9: Type ->
t10: Type ->
t11: Type
-> Steel.ST.GenElim1.compute_gen_elim_nondep_correct_t i0
[t1; t2; t3; t4; t5; t6; t7; t8; ... | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.GenElim1.Base.gen_elim_i",
"Steel.ST.GenElim1.Base.curried_function_type",
"Prims.Cons",
"Prims.Nil",
"FStar.Universe.raise_t",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Prims.prop",
"Steel.ST.GenElim1.vprop_rewrite",
"Steel.ST.GenElim1.Base.compute_gen_elim_p",
"Steel.ST.GenElim1.ge... | [] | false | false | false | false | false | let compute_gen_elim_nondep_correct11 (i0: gen_elim_i) (t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11]) =
| fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _)
(exists_ (fun x1 ->
exists_ (fun x2 ->
exists_ (fun x3 ->
exists_ (fun x4 ->
exists_ (fun x5 ->
exists_ (fun x6 ->
... | false |
Steel.ST.GenElim1.fst | Steel.ST.GenElim1.compute_gen_elim_nondep_correct12 | val compute_gen_elim_nondep_correct12
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12]) | val compute_gen_elim_nondep_correct12
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12]) | let compute_gen_elim_nondep_correct12
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12])
= fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _) (exists_ (fun x1 -> exists_ (fu... | {
"file_name": "lib/steel/Steel.ST.GenElim1.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 7,
"end_line": 706,
"start_col": 0,
"start_line": 684
} | module Steel.ST.GenElim1
let gen_elim_f
(p: vprop)
(a: Type)
(q: (a -> vprop))
(post: (a -> prop))
: Tot Type
= ((opened: inames) -> STGhost a opened p q True post)
module U = FStar.Universe
let gen_unit_elim_t (i: gen_unit_elim_i) : Tot Type =
gen_elim_f (compute_gen_unit_elim_p i) (U.raise_t u#_ u#1 unit... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Universe.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.GenElim1.f... | [
{
"abbrev": true,
"full_module": "FStar.Universe",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.GenElim1.Base",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"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 |
i0: Steel.ST.GenElim1.Base.gen_elim_i ->
t1: Type ->
t2: Type ->
t3: Type ->
t4: Type ->
t5: Type ->
t6: Type ->
t7: Type ->
t8: Type ->
t9: Type ->
t10: Type ->
t11: Type ->
t12: Type
-> Steel.ST.GenElim1.compute_gen_elim_nondep_correct_t i0
[t1; t2; t3; t4;... | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.GenElim1.Base.gen_elim_i",
"Steel.ST.GenElim1.Base.curried_function_type",
"Prims.Cons",
"Prims.Nil",
"FStar.Universe.raise_t",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Prims.prop",
"Steel.ST.GenElim1.vprop_rewrite",
"Steel.ST.GenElim1.Base.compute_gen_elim_p",
"Steel.ST.GenElim1.ge... | [] | false | false | false | false | false | let compute_gen_elim_nondep_correct12
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12]) =
| fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _)
(exists_ (fun x1 ->
exists_ (fun x2 ->
exists_ (fun x3 ->
exists_ (fun x4 ->
exists_ (fun x5 ->
exists_ (fun x6 ->
... | false |
Steel.ST.GenElim1.fst | Steel.ST.GenElim1.compute_gen_elim_nondep_correct13 | val compute_gen_elim_nondep_correct13
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13]) | val compute_gen_elim_nondep_correct13
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13]) | let compute_gen_elim_nondep_correct13
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13])
= fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _) (exists_ (fun x1 -> ex... | {
"file_name": "lib/steel/Steel.ST.GenElim1.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 7,
"end_line": 731,
"start_col": 0,
"start_line": 708
} | module Steel.ST.GenElim1
let gen_elim_f
(p: vprop)
(a: Type)
(q: (a -> vprop))
(post: (a -> prop))
: Tot Type
= ((opened: inames) -> STGhost a opened p q True post)
module U = FStar.Universe
let gen_unit_elim_t (i: gen_unit_elim_i) : Tot Type =
gen_elim_f (compute_gen_unit_elim_p i) (U.raise_t u#_ u#1 unit... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Universe.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.GenElim1.f... | [
{
"abbrev": true,
"full_module": "FStar.Universe",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.GenElim1.Base",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"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 |
i0: Steel.ST.GenElim1.Base.gen_elim_i ->
t1: Type ->
t2: Type ->
t3: Type ->
t4: Type ->
t5: Type ->
t6: Type ->
t7: Type ->
t8: Type ->
t9: Type ->
t10: Type ->
t11: Type ->
t12: Type ->
t13: Type
-> Steel.ST.GenElim1.compute_gen_elim_nondep_correct_t i0
... | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.GenElim1.Base.gen_elim_i",
"Steel.ST.GenElim1.Base.curried_function_type",
"Prims.Cons",
"Prims.Nil",
"FStar.Universe.raise_t",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Prims.prop",
"Steel.ST.GenElim1.vprop_rewrite",
"Steel.ST.GenElim1.Base.compute_gen_elim_p",
"Steel.ST.GenElim1.ge... | [] | false | false | false | false | false | let compute_gen_elim_nondep_correct13
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13]) =
| fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _)
(exists_ (fun x1 ->
exists_ (fun x2 ->
exists_ (fun x3 ->
exists_ (fun x4 ->
exists_ (fun x5 ->
exists_ (fun x6 ->
... | false |
Steel.ST.GenElim1.fst | Steel.ST.GenElim1.compute_gen_elim_nondep_correct14 | val compute_gen_elim_nondep_correct14
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0
[t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13; t14]) | val compute_gen_elim_nondep_correct14
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0
[t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13; t14]) | let compute_gen_elim_nondep_correct14
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13; t14])
= fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _) (exists_ (fun... | {
"file_name": "lib/steel/Steel.ST.GenElim1.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 7,
"end_line": 757,
"start_col": 0,
"start_line": 733
} | module Steel.ST.GenElim1
let gen_elim_f
(p: vprop)
(a: Type)
(q: (a -> vprop))
(post: (a -> prop))
: Tot Type
= ((opened: inames) -> STGhost a opened p q True post)
module U = FStar.Universe
let gen_unit_elim_t (i: gen_unit_elim_i) : Tot Type =
gen_elim_f (compute_gen_unit_elim_p i) (U.raise_t u#_ u#1 unit... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Universe.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.GenElim1.f... | [
{
"abbrev": true,
"full_module": "FStar.Universe",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.GenElim1.Base",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"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 |
i0: Steel.ST.GenElim1.Base.gen_elim_i ->
t1: Type ->
t2: Type ->
t3: Type ->
t4: Type ->
t5: Type ->
t6: Type ->
t7: Type ->
t8: Type ->
t9: Type ->
t10: Type ->
t11: Type ->
t12: Type ->
t13: Type ->
t14: Type
-> Steel.ST.GenElim1.compute_gen_elim_nondep_c... | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.GenElim1.Base.gen_elim_i",
"Steel.ST.GenElim1.Base.curried_function_type",
"Prims.Cons",
"Prims.Nil",
"FStar.Universe.raise_t",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Prims.prop",
"Steel.ST.GenElim1.vprop_rewrite",
"Steel.ST.GenElim1.Base.compute_gen_elim_p",
"Steel.ST.GenElim1.ge... | [] | false | false | false | false | false | let compute_gen_elim_nondep_correct14
(i0: gen_elim_i)
(t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14: Type)
: Tot
(compute_gen_elim_nondep_correct_t i0
[t1; t2; t3; t4; t5; t6; t7; t8; t9; t10; t11; t12; t13; t14]) =
| fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _)
(exists_ (fun x1 ->
exists_ (fun x2 ->
exists_ (fun x3 ->
exists_ (fun x4 ->
exists_ (fun x5 ->
exists_ (fun x6 ->
... | false |
Steel.ST.Printf.fst | Steel.ST.Printf.print_frag | val print_frag (hd: frag_t) : STT unit (live_frag hd) (fun _ -> live_frag hd) | val print_frag (hd: frag_t) : STT unit (live_frag hd) (fun _ -> live_frag hd) | let print_frag (hd: frag_t) : STT unit (live_frag hd) (fun _ -> live_frag hd)
=
(match hd with
| Inl s -> print_string s
| Inr (| Base t, Lift value |) ->
(match t with
| Bool -> print_bool value
| Char -> print_char value
| String -> print_string value
... | {
"file_name": "lib/steel/Steel.ST.Printf.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 23,
"end_line": 424,
"start_col": 0,
"start_line": 392
} | (*
Copyright 2008-2022 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Array.fsti.checked",
"Steel.Effect.Common.fsti.checked",
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Steel.ST.Array",
"short_module": "A"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": "Ste... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hd: Steel.ST.Printf.frag_t -> Steel.ST.Effect.STT Prims.unit | Steel.ST.Effect.STT | [] | [] | [
"Steel.ST.Printf.frag_t",
"Prims.string",
"Steel.ST.Printf.print_string",
"Prims.unit",
"Steel.ST.Printf.base_typ",
"Steel.ST.Printf.base_typ_as_type",
"Steel.ST.Printf.print_bool",
"Steel.ST.Printf.print_char",
"Steel.ST.Printf.print_u8",
"Steel.ST.Printf.print_u16",
"Steel.ST.Printf.print_u32"... | [] | false | true | false | false | false | let print_frag (hd: frag_t) : STT unit (live_frag hd) (fun _ -> live_frag hd) =
| (match hd with
| Inl s -> print_string s
| Inr (| Base t , Lift value |) ->
(match t with
| Bool -> print_bool value
| Char -> print_char value
| String -> print_string value
| U8 -> print_u8 value
| U16 -> print_u16 value
| U32 -> print_u32 value
| U64 -> print_u64 val... | false |
HaclExample2.fst | HaclExample2.test | val test (#v: Ghost.erased (typeof comp)) (p: ref comp)
: ST (Ghost.erased (typeof comp))
(p `pts_to` v)
(fun v' -> p `pts_to` v')
(full comp v)
(fun v' -> full comp v') | val test (#v: Ghost.erased (typeof comp)) (p: ref comp)
: ST (Ghost.erased (typeof comp))
(p `pts_to` v)
(fun v' -> p `pts_to` v')
(full comp v)
(fun v' -> full comp v') | let test
(#v: Ghost.erased (typeof comp))
(p: ref comp)
: ST (Ghost.erased (typeof comp))
(p `pts_to` v)
(fun v' -> p `pts_to` v')
(full comp v)
(fun v' -> full comp v')
= let q = struct_field p "limbs" #_ #(base_array0 five (scalar U64.t) 5sz) () in
let a = array_of_base q in
let r = struct_fie... | {
"file_name": "share/steel/examples/steelc/HaclExample2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 10,
"end_line": 127,
"start_col": 0,
"start_line": 105
} | module HaclExample2
open Steel.ST.GenElim
open Steel.ST.C.Types
open Steel.C.Typenat
open Steel.C.Typestring
module SZ = FStar.SizeT
module U64 = FStar.UInt64
(** In this file we demonstrate how Steel could be used to manipulate the following data type used in Hacl*:
https://github.com/project-everest/hacl-star... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.GenElim.fsti.checked",
"Steel.ST.C.Types.fst.checked",
"Steel.C.Typestring.fsti.checked",
"Steel.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FSt... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Steel.C.Typestring",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"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: Steel.ST.C.Types.Base.ref HaclExample2.comp
-> Steel.ST.Effect.ST (FStar.Ghost.erased (Steel.ST.C.Types.Base.typeof HaclExample2.comp)) | Steel.ST.Effect.ST | [] | [] | [
"FStar.Ghost.erased",
"Steel.ST.C.Types.Base.typeof",
"Steel.ST.C.Types.Struct.struct_t0",
"HaclExample2.comp_name",
"Steel.ST.C.Types.Fields.field_t_cons",
"Steel.C.Typestring.string_cons",
"Steel.C.Typestring.cl",
"Steel.C.Typestring.ci",
"Steel.C.Typestring.cm",
"Steel.C.Typestring.cb",
"Stee... | [] | false | true | false | false | false | let test (#v: Ghost.erased (typeof comp)) (p: ref comp)
: ST (Ghost.erased (typeof comp))
(p `pts_to` v)
(fun v' -> p `pts_to` v')
(full comp v)
(fun v' -> full comp v') =
| let q = struct_field p "limbs" #_ #(base_array0 five (scalar U64.t) 5sz) () in
let a = array_of_base q in
let r = struct_field p "precomp" #_ #(base_array0 twenty (scalar U64.t) 20sz) () in
let _ = vpattern_replace (pts_to p) in
let b = array_of_base r in
let _ = do_something_with_limbs a in
let _ = do_something_with_p... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.